This project researches general classes of the assignment problem. It provides an explanation of what
assignment problems are, how and when they are used, and how they are solved. Models are can be created
to solve large real -world problems, but unfortunately some classes of the assignment problem are generally
considered too hard to solve using general purpose algorithms. The project concentrates on two classes of
the assignment problem, the generalised assignment problem and the multi
-level gen eralised assignment
problem.
The potential of a commercial integer programming package is investigated to see how well it can solve
difficult, large sized problems. The commercial software package used is XPRESS
variety of algorithmic
-MP, which offers a
choices for solving mathematical programming problems. Therefore, although
XPRESS-MP does not use specialised algorithms for solving problems, it has flexible algorithmic choices,
with which it is possible to ‘fine tune’ how a problem is solved. The aim
was to evaluate how well a
standard general purpose commercial integer programming package can find solutions to generalised
assignment problems and multi -level generalised assignment problems. It was desired to discover if
commercial integer programming packages can produce just as good results as specialised algorithms can.
General models were built to represent the two assignment problems. By building these models to not be
problem specific, numerous different problem instances can be tested and evalua ted. Several optimisation
algorithms were tested in XPRESS -MP by solving assignment problems. The results drew the conclusion
that XPRESS -MP is a powerful commercial integer programming package. The algorithmic functions
available enabled many large difficult problems to be optimally solved. In addition the results obtained for a
real-world problem that has been solved by several other researchers is the best solution found to date.
i
I would like to express my gratitude to Dr Les
Proll, my project supervisor, for his continued help and
guidance throughout the project. I would also like to thank Dr Sarah Fores for her helpful advice throughout
this project and my four years at University. And finally to my housemates, who have be en a great support
to me.
ii
Chapter 1
Linear Programming
1.1
Introduction to Linear Programming
1-1
1.2
Applications of Linear Programming
1-1
1.3
Definition of Linear Programming
1-1
1.3.1
1.4
Integer Linear Programming
1.4.1
1.5
Methods for solving Linear Programming problems
1-5
Difficulties with solving integer linear programmes
Significant properties of LP problems
Chapter 2
1-3
1-5
1-7
The Assignment Family
2.1
Definition of the Assignment family
2-8
2.2
Definition of the Linear Assignment Problem
2-8
2.3
Solving linear assignment problems
2-9
2.3.1
Methods used for solving linear assignment problems
2-10
2.4
Applications of the Linear Assignment Problem
2-11
2.5
Several important subclasses of the Assignment Family
2-12
Chapter 3
The Generalised Assignment Problem
3.1
Definition of the generalised assignment problem
3-15
3.2
Difficulties with solving the generalised assignment problem
3-16
3.3
Applications of the generalised assignment problem
3-16
iii
Chapter 4
The Multi-Level Generalised Assignment Problem
4.1
Definition of the multi-level generalised assignment problem
4-19
4.2
Difficulties with solving multi-level generalised assignment problems
4-20
4.3
Applications of the multi-level generalised assignment problem
4-20
Chapter 5
Modelling problems using a commercial integer programming package
5.1
Introduction to XPRESS-MP, a commercial integer programming package
5-22
5.2
Building a general model using XPRESS –MP
5-22
5.2.1
Stage 1, a general model for the linear assignment problem
5-23
5.2.2
Stage 2, a general model for the generalized assignment problem
5-26
5.2.3
Stage 3, Improvements to the general model
5-27
5.2.4
Stage 4, a general model for the MLGAP
5-29
Chapter 6
Optimisation with a Commercial Integer Programming Package
6.1
Optimisation of the general models
6-32
6.2
Optimisation commands
6-32
6.2.1
6.3
6.4
Presolve
6-32
Optimising integer programming problems
6-34
6.3.1
Cutting planes algorithm
6-34
6.3.2
Branch and Bound
6-37
Different algorithmic choices for solving the GAP and MLGAP
iv
6-39
Chapter 7
Results & Evaluation of XPRESS-MP Solving Capabilities
7.1
Test Data for the GAP
7-40
7.2
Test data for the MLGAP
7-41
7.3
Controls used for the different algorithms
7-41
7.4
Results
7-42
7.5
Suggestions for improvement
7-47
Chapter 8
Conclusion
8-49
References
50
Bibliography
53
Appendix A
54
Appendix B
55
Appendix C
56
Appendix D
57
Appendix E
58
Appendix F
59
Appendix G
60
Appendix H
61
Appendix I
62
Appendix J
63
Appendix K
65
Appendix L
66
Appendix M
69
v
1.1
Introduction to Linear Programming
Linear programming (LP) can be defined as ‘ a mathematical method of determining an optimum assignment
of interdependent activities, given the availability of resources’, (Loomba, 1964). LP formulations were first
recognised in the late 1940’s when G.B. Dantzig designed the ‘simplex method’ for solving problems arising
within the US Air Force, (Chevátal, 1983 and Ignizio, 1982). Since then, the development of LPs has made
it an extensively used technique for solving a wide range of managerial problems.
1.2
Applications of Linear Programming
LP models may be constructed for various reasons. They are often used to provide insight into problems,
conduct experimentation without expensive or dangerous changes to the real problem and propose efficient
use of resources. Generally, managers are required to make decisions, whilst optimising an overall objective
of the problem, i.e. profit or cost. Managers often have to decide a level at which to conduct activities given
that there are possible resource allocation restrictions, and othe
r constraints imposed on the activities.
Solutions to these LP problems provide suggestions for improvements to help organisations increase
efficiency.
LP techniques are used in a range of industries for example agricultural economics and management,
transportation, petrochemicals, industrial industries, military operations, public and financial sectors,
(Loomba, 1964). Appendix B shows some examples of real world problems and how linear programming is
used to arrive at the best possible decision to solv e that problem. There are numerous journals available, for
example Computers and Operations research, Management Science, that provide detailed accounts of how
different real life problems have been solved using LP methods.
1.3
Definition of Linear Programming
An LP model ‘ is a structured set of mathematical relationships (e.g. equalities, logical conditions) which
represent an abstraction of the real world problem under consideration’, (Williams, 1995). It is important to
ensure that the mathematical relat ionships represent the real world problem as closely as possible. Real
world problems that have similar characteristics and instances can be grouped together into classes. These
classes often have an idealistic structure that closely represents the type of problem. For example, travelling
salesman problems and set covering problems both have ideal structures which can be used to solve practical
applications.
All LP problems involve optimisation. Optimisation requires the model to contain four key objects.
1-1
• data or parameters
These are
• variables (continuous, semi-continuous, free, binary, integer)
• constraints (equalities, inequalities)
• objective function
There is a conventional mathematical representation of a linear programming problem.
p
Maximise or Minimise
cj xj
Objective Function
j=1
subject to
p
aij xj (≤, or ≥, or =) bi
i = 1, 2, …, m
Constraints
j = 1, 2, …, p
Bounds on the
j=1
xj ≥ 0
decision variables
Figure 1.1
‘where c j, aij and b i are known constants for all i and j, and x
Kallrath and Wilson, 1997). Therefore, ‘
j
are non -negative variables ’, (Taha, 1975,
linear programming can be c
onsidered as the problem of
maximising a “linear function” cx (commonly referred to as the “objective function”) over a polyhedron P =
{x : Ax ≤ b}. Geometrically, this can be seen as shifting a hyperplane to its “highest” level, under the
condition that it intersects P’, (Cook et al, 1998, Schrijver, 1988).
Feasible Region, P
6
Objective Function
Max z = 3x + 2y
5
4
Optimal solution at
x = 1, y = 3
3
Y
-x + 4y ≥ 2
2
1
Figure 1.2
1
2
3
Z=6
Z=8
4
5
Z=9
x+y≤4
2x + y ≤ 5
X
1-2
1.3.1
Methods for solving Linear Programming problems
Linear programming is a very broad definition covering a wide range of problems. There has been a great
deal of research into disc overing and proving efficient methods for solving these problems. The simplex
method has proved highly efficient for solving LPs but various problem classes can be solved more
efficiently using other methods. For highly structured classes of problems, th e structure can often be used to
improve the performance of the algorithm. This has led to the development of special purpose algorithms for
solving LPs, for example the Hungarian algorithm is far more efficient than the simplex method in solving
assignment problems, (Williams, 1995). However, the commercial integer programming package used in
this project will only employ the simplex algorithm for solving LP problems.
The simplex method uses a matrix format to manipulate the equalities defining the pro blem. Problems are
adjusted to fit into a matrix which can subsequently be solved using the simplex algorithm. Kallrath and
Wilson (1997), explain how the constraints of problems can be converted into equations by adding a slack
variable if the inequalit y is of type ≤, and subtracting a surplus variable if the equality is of type
≥. This
enables LPs to be put into matrix form:
Maximise or Minimise
z = cTx
subject to
Ax = b
x≥0
Figure 1.3
where c is an n-row vector of z-coefficients, A is an m*n matrix of constraint coefficients, b is an m -column
vector of right -hand side constants, and x is an n
-row vector of variables. After every iteration of the
simplex algorithm there will be a feasible solution, even if its not the optimum solution. This is an advantage
for large problems where the cost of obtaining an optimal solution may be so large that a ‘good’ feasible
solution will do just as well.
‘Observation over years of practical experience, shows that sim
plex algorithms are very robust and
efficient’, (Nemhauser and Wolsey, 1988). Nemhauser and Wolsey, (1988) show that for every feasible
instance of an LP that is not unbounded, the simplex algorithm can find an optimal solution in a finite
number of operations. Therefore simplex algorithms are frequently found in commercial software packages
as they are practical and efficient to use.
To explain how the simplex algorithm reaches optimality consider the problem pictured in figure 1.2. The
set of linear e qualities defining the problem produces a feasible region which is a polyhedron, P. The
simplex algorithm progressively moves from one vertex of the polyhedron to another vertex by advancing
along one edge at a time, providing the move improves the objective function (or at least leaves it as before).
1-3
This is far more efficient than looking at every point in the feasible region. Figure 1.2 shows that the optimal
value is found at a vertex of P. Williams (1995) and Kallrath and Wilson (1997) explain how
the linear
properties of LPs cause the optimal value to always occur at a vertex of the feasible region. Therefore the
number of feasible solutions to be considered optimal can be restricted to those found at a vertex. As ‘
the
simplex algorithm works by only examining vertex solutions (rather than the generally infinite set of feasible
solutions)’, (Williams, 1995), it greatly reduces the amount of work needed to find the optimal solution.
To explain how the simplex algorithm terminates in a finite number
of steps, consider the computational
complexity of the algorithm. Computational efficiency is very important when attempting to optimise a
combination of resources. Numerous ‘computational complexity’ theories have been established which aim
to yield an insight into how difficult a problem is to solve. Complexity is ‘ a measure of computer time or
space to solve a problem by an algorithm as a function of the problem’s dimensions
’, (Greenberg). One
concern of the theory is ‘ whether or not the number of ar ithmetic operations required by an algorithm can
always be bounded by a polynomial in the parameters of the problem ’, (Shapiro, 1979). The time taken and
computational difficulty to solve LPs is dependent on the number of constraints (
Therefore as the problem increases in size,
m) and variables ( n).
m and n may increase to an extent that makes the problem
computational difficult to solve. There are some classes of LPs for which the simplex algorithm takes
exponential time, thus implying that the simplex algorithm is not a polynomial time algorithm. Nemhauser
and Wolsey (1988) demonstrate how the running time of some problems using the simplex algorithm can
grow exponentially with the size of the input. Theoretically this implies that the simplex algorit
hm has
difficultly solving large problems. However evidence shows that the simplex method solves the majority of
problems in fewer iterations than the worst case scenario and has proved to be ‘ enormously successful in the
solution of real-world instances’, (Nemhauser and Wolsey, 1988). Therefore it is assumed that ‘the expected
running time of the simplex method is bounded by a polynomial in m and n’, (Nemhauser and Wolsey, 1988),
and is thus an efficient algorithm for optimally solving LPs. Although Nem
hauser and Wolsey (1988)
present several polynomial timed algorithms for LPs, only the simplex algorithm will be used for solving
problems in this project.
There are several variations of the ‘simplex’ method. Generally the two important aspects are the ‘
primal
simplex’ method and ‘dual simplex’ method. The primal problem and dual problem are closely related and
are often used together to solve problems.
(Primal)
Max z = cTx
s.t.
Min v = bTu
Ax ≤ b
s.t.
x≥0
(Dual)
ATu ≥ c
u≥0
Nemhauser and Wolsey (1988) explain how the ‘duality theorem’ proves that ‘Max z ≤ Min v’ for all feasible
solutions and ‘ Max z = Min v ’ for optimal solutions. Therefore the optimal solution of one provides all the
1-4
information needed t o determine the optimal solution of the other without having to re
-solve the problem.
Using the dual problem has many advantages and is often used to infer economic interpretations of the
problem. For example the dual problem is used in sensitivity analysis, which investigates how small changes
in the input data affect the solution. The dual simplex method is useful for solving integer programming
problems with the branch and bound algorithm.
1.4
Integer Linear Programming
There are many situations where va riables are required to be discrete, for example problems involving
indivisible objects such as people or machines. Integer linear programming (ILP or IP) can be split into two
classes, Pure integer programming (PIP) and Mixed integer programming (MIP).
The former requires all
variables to take integer values whilst the latter requires only some variables to be integer. PIP typically
arises in combinatorial problems such as timetabling, vehicle routing and scheduling. A useful feature of IP
models is th at they ‘ can allow variables to denote decisions which are not strictly quantitative ’, (Kallrath
and Wilson, 1997). Decision variables can be used to model ‘yes
-no’ decisions, logical implications (if
product A is produced then product B must also be produced), counting (number of containers, ships needed)
and simple non -linear functions. Williams (1995) suggests some good modelling principles to accurately
model similar recurring IP problems.
1.4.1
Difficulties with solving integer linear programmes
The integr ality condition of IP problems makes them much harder to solve than LPs. ‘
Unlike the simplex
algorithm with LP, no one good IP algorithm has emerged. Different algorithms prove better with different
types of problem, often exploiting the structure of spe cial classes of problems ’, Williams (1995). The most
successful (general purpose) method to date is an enumerative approach called ‘branch and bound’ (B&B).
A tree of LP problems is constructed and searched systematically. Initially the IP is solved as
an LP by
removing the integrality constraints. This is known as the ‘ LP-relaxation’ of the IP and forms the root node
of the tree. If the solution is not integer, the LP -relaxation is branched into two IP sub-problems which are
subsequently relaxed and s olved as LP problems. Upper and lower
bounds are created to circumvent an
exhaustive search. The algorithm continues until there are no more unexplored active nodes, or until the
value of the best lower (or upper) bound is no better than that of the best feasible integer solution. The B&B
algorithm enables a proven optimal solution to be found (if one exists). The B&B algorithm will be
explained in more depth in Chapter 6.
Another useful IP algorithm that will be used in Chapter 6 is the ‘cutting plan
es’ algorithm. Again the
algorithm begins by solving the LP -relaxation of the IP. If the solution is not integer, extra constraints
(cutting planes ) are systematically added to the problem in order to constrict the feasible region. These
cutting planes cut off parts of the LP feasible region without cutting off any integer solutions.
1-5
8
Optimal solution to IP
Feasible region of LP -
problem , z*IP
relaxation P1
7
Feasible region of
Optimal solution to
6
IP problem
LP-relaxation, z*LP
5
•
•
4
•
•
•
•
3
•
•
•
•
2
•
1
P2
• Integer feasible points
Convex Hull
Figure 1.3
A cut is an inequality which is valid for the IP but not for its LP relaxation. Once appropriate cuts have been
added, the new LP r elaxation can be solved and more cuts can be added. These additional constraints will
define a convex set nearer to the convex hull. Figure 1.3 shows how tightening the feasible region of the LPrelaxation brings the solution space closer to the convex h ull of feasible integer points. The convex hull of
an IP is ‘the smallest convex set containing all the feasible integer solutions’, (Williams, 1995). Kallrath and
Wilson (1997) explain that adding new cuts after each iteration will eventually lead to an
integer solution.
They continue to say that the cutting planes algorithm takes a relatively long time to find a proven integer
solution and thus is rarely used by commercial software. More frequently it is used in combination with
other algorithms.
Branch and cut algorithms have evolved from the previous two algorithms. There are several variations of
this algorithm which can be used in combination with each other. Cuts may be added to the LP before the
B&B algorithm begins and use this LP relaxation w ith cuts in the root node of the tree. Alternatively, the
algorithm can proceed as a tree search but at each node, before branching, add appropriate cuts to the
problem.
It can be seen that these IP algorithms require solving the LP relaxation first. Th erefore when solving IPs,
LPs often occur as sub -problems. This can be seen in figure 1.3. P
1
is a relaxation of P
2
if the feasible
region of P 1 contains the feasible region of P 2. It can also be seen that the objective value of P 1 will always
be better than that of P 2. Therefore these LP sub -problems provide an upper or lower bound on the optimal
value that the corresponding IP problem can have. This gives IP algorithms a good starting point. There are
several ways of relaxing a LP, for example dropping integer restrictions or aggregating constraints.
Chapter 6 provides more detailed explanations of how these methods are used to solve IP problems quickly
and efficiently. There are other methods for solving IP problems, for example ‘Pseudo
1-6
-Boolean’ an d
‘Dynamic Programming’, although these are not as practical and therefore not found in commercial software
packages, (Kallrath and Wilson, 1997, Williams, 1995).
1.5
Significant properties of LP problems
There are several certain features that apply to all linear programming problems regardless of whether its an
LP, PIP or MIP. Firstly the objective function and all the constraints must be
linear. Non -linear
programming models are usually far more difficult to solve than correspondingly sized linear model s. ‘If an
optimal solution exists to an LP problem, the constraints of that problem form a convex set……and this
optimal solution exists at the extreme points of this set’, (Ignizio, 1982). In other words if there is an optimal
solution, it will always li e on the boundary of the feasible region, and most likely it will lie at a vertex. For
an IP problem the optimal solution will lie on the convex hull. This occurs due to the linearity of the
problem creating a convex set of straight lines. If the model
has non -linear functions then the objective
function and feasible region may not be bounded by straight lines and the optimal solution can lie anywhere
within the feasible region. Therefore the search for an optimal solution may be infinite as it cannot b
e
assumed that the optimal solution lies at a vertex. Thus if a problem has non-linear functions they must either
be converted into a linear nature or solved using different techniques.
Another important property is that all the data representing the probl em are rational real independent values
known with certainty. Often historical cost data or reliable processing times are used. However, in the real
world it is not always possible to obtain precise predictions of costs involved. If the data is not accurate then
the results cannot accurately represent the real solution. Therefore results should always be subject to
scrutiny. It was very hard to find test data for real world problems to use in this project. Therefore
statistically generated data sets w ill be used to test problems. It is preferable to use large data sets as these
will be harder to solve and are more representative of real-world problems than small problems are.
None of the constraints are permitted to have < or > equalities. Williams (
1995) presents an easy way to
model these equalities as ≤ or ≥ equalities. This can present difficulties when integer values are required,
thus care should be taken in modifying < or > equalities. Generally all variables in LP models are non
-
negative. I t is impossible to have a negative number of objects! Commercial programming packages have
functions assuming non-negativity.
This chapter has provided a background understanding of LP and IP problems which is necessary in order to
fully understand the class of linear programming known as the assignment family.
1-7
3
1
0
/
.
-
,
+
*
)
(
'
&
%
$
#
"
!
-
-
2
1
0
0
3
1
2
1
6
0
5
/
.
.
6
5
.
-
,
+
+
+
*
)
(
'
&
%
$
#
"
!
4
4
2.1
Definition of the Assignment family
There is a well known class of LP problems which are commonly referred to as the ‘assignment family’.
The assignment family is a large c lass of problems which can generally be defined as an application used to
assign “individuals” to “tasks” (or tasks to machines, etc.), subject to restrictions, with the objective of
minimising the total cost of the assignments made.
2.2
Definition of the Linear Assignment Problem
The classic assignment problem (also referred to as the linear assignment problem) can be regarded as the
most basic sub -class in the assignment family. The classic assignment problem requires all the tasks to be
assigned to agents on a one-to-one basis, in the best combination in order to minimise cost. Therefore it is
assumed that each task can only be assigned once to an agent and each agent can only undertake one task.
The other sub-classes in the assignment family can often b e seen as an extension of the classical assignment
problem. These sub-classes will be further explained in Chapter 2.4.
All classes of the assignment problem have the following characteristics:
• The overall objective is to minimise the cost of assigning tasks.
• Binary decision variables are used to indicate when a task is completed.
• Each task can only be assigned once.
• Functions must be linear, or have the ability to be converted into a linear nature.
The linear assignment problem (LAP) can be expressed as:
Minimise Z =
cij xij
[2.1]
i∈I j∈J
Subject to the constraints
xij = 1
for all i ∈ I
[2.2]
xij = 1
for all j ∈ J
[2.3]
for all i ∈ I, j ∈ J
[2.4]
j∈J
i∈I
xij = 1, 0
2-8
where
I ≡ {1, 2, … , m} a set of agent indices
J ≡ {1, 2, … , n} a set of task indices
m = number of agents i
n = number of tasks j
cij = cost of having agent i do task j.
xij =
1, if agent i performs task j
0, otherwise
Figure 2.1
[2.1] in the mathematical formulation is the objective function that the assignment problem is aiming to
minimise. Typically assignment problems are minimisation problems although maximisation problems do
occur and are easily convertible to the former case. The cost is usually representative of the monetary value
or time taken for the agent to complete the job. Constraint [2.2] implies that each agent must complete only
one task. Similarly, constraint [2.3] i mplies that each task must be completed only once. [2.2] and [2.3]
require that there are enough tasks for all the agents, and similarly enough agents to complete all the tasks.
Therefore the problem must be balanced, i.e. m=n. If the LAP is unbalanced,
dummy variables must be
added to balance the problem. All the dummy variables will all be assigned the same costs, normally a cost
of 0. For example, if an agent is assigned to a dummy task, the agent in effect does nothing at a cost of
nothing. Constraint [2.4] denotes the binary variables which informs whether an agent completes a task (1)
or does not complete a task (0). Therefore, figure 2.1 shows how the LAP aims to minimise the total cost
involved with assigning all agents to tasks on a one-to-one basis.
2.3
Solving linear assignment problems
The LAP is a class of problems where the constraints naturally define the convex hull. Therefore the optimal
value of the LP relaxation will automatically be integer feasible, provided all coefficients are inte gers. This
is due to several properties inherent in the structure of LAPs. Firstly, the coefficient matrix of all LAPs is
unimodular. Unimodularity is a property of a matrix if every square sub-matrix has a determinant of +1, 0 or
–1. This can be illustrated with a small example:
Let m=3, n=3. The coefficient matrix of an m*n LAP is
1 1 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0
≡ constraint [2.2]
0 0 0 0 0 0 1 1 1
1 0 0 1 0 0 1 0 0
0 1 0 0 1 0 0 1 0
Figure 2.2
≡ constraint [2.3]
0 0 1 0 0 1 0 0 1
2-9
Taking any square sub -matrix from the matrix in figure 2.2 will result in a determinant of +1, 0 or
–1.
However evaluating determinants is operationally useless and a waste of time. Williams (1995) explains
how the identification of three properties will guarantee a unimodular matrix. These properties, referred to
as ‘Property P’ are easier to detect than evaluating numerous determinants. However a gene ralisation must
not be made as there are some unimodular matrixes that do not have Property P. A matrix has Property P if:
• Every non-zero element is +1 or –1.
• There are at most 2 non-zero elements in each column. Therefore every variable can only appear
in two constraints.
• The rows can be partitioned into two distinct subsets S1 and S2 such that
If a column contains 2 non -zero elements of the same sign, one element is in each of
the subsets.
If a column contains 2 non -zero elements of opposite sign , both elements are in the
same subset.
This can also be applied to partitioning the columns (instead of rows) into two subsets.
Williams (1995)
It can be seen from figure 2.2 that the coefficient matrix of the LAP has Property P and therefore is
unimodular. ‘A problem for which unimodularity exists will always provide a strictly integer solution when
solved by simplex. That is, such a problem has optimal extreme points that are all strictly integer valued
’,
(Ignizio, 1982). Schrijver, (1988) explains th e theories and proves that if a LP constraint matrix is totally
unimodular, and the right-sides of all the constraints are integer values, then all basic feasible solutions to the
LP problem are integer values. Therefore LAPs are relatively easy to solve as the structure of the problem
guarantees that the solution will all automatically provide integer variables.
2.3.1
Methods used for solving linear assignment problems
There are numerous methods for solving LAPs from the general simplex algorithm to very specif
ic
techniques. However the more efficient polynomial methods tend to exploit the special structure of the
problem. The most famous specific algorithm for the assignment problem is the ‘Hungarian Algorithm’
created by Kuhn. This is named after the Hungari an mathematician König, who in 1916 proved a theorem
necessary for the development of this method. It has been proved that ‘ the Hungarian algorithm solves the
LAP for a complete bipartite graph with 2n nodes in O(n³) arithmetic operations
’, (Papadimitriou s and
Steiglitz, 1982). Schrijver (1988) shows how a matrix of an undirected graph, G, is totally unimodular if and
only if G is bipartite. Therefore we know an integer solution is automatically guaranteed. O(n³) is a low
order polynomial computation time and scientists agree that ‘ an algorithm is a practically useful solution to
2-10
a computational problem only if its complexity grows polynomially with respect to the size of the input
’,
(Papadimitrious and Steiglitz, 1982). Therefore a polynomial -timed algorithm is guaranteed to terminate
with a number of steps which is a polynomial function of the size of the problem. Therefore LAPs are
theoretically easy to solve as they naturally produce integer solutions in O(n³) arithmetic operations.
Therefore, reg ardless of the problem size, computers are able to optimally solve LAPs quickly and
efficiently.
2.4
Applications of the Linear Assignment Problem
‘The famous physician who discovered a cure for which there was no known disease has his parallel in many
operational research discoveries of solutions, for which there is no known problem. Outstanding among
these is the assignment problem. It provides an attractive introduction to linear programming because the
model is so simple and the Hungarian method provides such elegant solutions’, (Machol, 1961). There are a
limited number of examples involving the assignment problem, with some more practical than others. The
majority of Management Science text books refer to the linear assignment problem using the example
of
assigning jobs to agents or jobs to machines with minimal cost.
A more practically useful application of the assignment problem, presented by Machol (1969), is one of
assigning swimmers to a team. A coach must pick from his squad only four swimmers
to swim in a relay
match. Each swimmer is required to swim a different stroke and each stroke is only completed once. An
automatic approach would be to assign each swimmer to the stroke in which s/he excels, but this will not
necessarily produce the opt imal solution. One of the swimmers chosen may be the best in more than one
stroke, or much better in one stroke than other strokes. An assignment problem can be easily created, using
the average swim time for each stroke by each swimmer. The LAP will mi nimise the swim time for all four
strokes, whilst ensuring that a swimmer swims only one stroke.
In real life situations it is extremely unlikely that each agent or machine will only undertake one job as this
would be very expensive for a company. Thus, there are a limited number of practical problems when the
assignment problem is confined to the most rigorous definition. ‘More frequently, we encounter problems in
which the assignment problem is embedded within the problem of interest. On other occasions we encounter
problems that are not assignment problems but for which we may apply many of the concepts that form the
methodology of approach for the assignment model
’, (Ignizio, 1982). This can be shown by a more
complicated example of assigning swimm ers to events in a championship swimming meet, (Hannan and
McKeown, 1979). Similarly, the objective is to assign swimmers to races in order to score the most points
and win the competition. However, the classical assignment problem is too rigid in struct ure to model this
problem. Although swimmers can still only swim one race a day, the coach can enter as many swimmers as
he wants into one event. This results in swimmers from the same team competing against each other for
points from one event. This cr
eates non -linear constraints which are surrogated with
2-11
ad hoc linear
constraints so that 0 -1 linear programming methods can be used to solve the problem. The model is further
complicated by several other conditions associated with this problem. The assig nment problem can be seen
embedded within the final model for this problem. ‘ This method is sufficiently general to be applied to any
problem involving the assignment of swimmers to events in a championship meet ’, (Hannan and McKeown,
1979).
Another usefu l application of the assignment problem is seen in constructing timetables for parent
-teacher
interviews in schools, (Parker et al, 1989). The main objective is to minimise the waiting time between
successive interviews for both parents and teachers. How
ever calculating the length of gaps between
interviews is essentially non -linear in nature and so another approach is used. Half of the problem is solved
using scheduling heuristics to form an initial timetable and then the solution is iteratively optimis
other sub -problems are treated as multi
ed. The
-criteria assignment problems. By using a goal programming
approach, differential weights are attached to the constraints to reflect their priority. Using these weights to
calculate penalties, the sub-problems are transformed to standard assignment problems in which the elements
of the cost matrix represent the penalties. The assignment problems are then solved using an algorithm of
Carpaneto and Toth. A computer is then able to find the optimal timetable solution in a relatively short time.
‘All the year tutors have reported that they feel the total waiting time between interviews has been reduced to
a level below which they would have achieved manually. Additionally the total staff time to construct the
timetable has been reduced from days to hours
’, (Parker et al, 1989). Therefore having the assignment
problem embedded into the model enables the school to find an improved solution using the restricting
computing resources available.
The assignment problem is commonly used to aid different types of timetable scheduling. This is because it
is easy to represent timetabling as a 0-1 assignment of activities to resources. However using the assignment
problem to timetable a schedule is not as straightforward as the problem in figure 2.1. It often involves using
the 3-dimensional assignment problem or quadratic assignment problem, (Bovet, 1982, Frieze and Yadegar,
1981, Ferland and Roy, 1983).
2.5
Several important subclasses of the Assignment Family
As mentioned in section 2.2, there are numerous extensions to the assignment problem, which can be viewed
as sub-classes of the classical assignment problem. Several of the most frequently used subclasses will be
briefly explained.
Firstly it is important to realis
e that the assignment problem is itself a sub
-class of the transportation
problem. The assignment problem is generic of the transportation problem, whereby the flows from source
to destination are by a single task or agent. Essentially the assignment problem is the transportation problem
with all demands and supplies equal to one. Burkard (1979) explains how ‘ assignment problems are special
cases of three different important classes of combinatorial problems, namely of flows in networks, of
2-12
matching pro blems, and of matroid intersection problems. Therefore any algorithm for such a problem
yields also an algorithm for assignment problems ’. The assignment problem is quite frequently seen in
travelling salesman problems (TSP). The TSP aims to find the sh
ortest round trip for visiting a series of
cities, starting at a particular point and ensuring that each city is only visited once. Taha (1975) explains
how the ‘ assignment problem model can be adapted to yield a particularly appealing formulation of the
TSP’. Additionally, Wren (1971) refers to a transport scheduling computer programme that treats the TSP as
an assignment problem.
A very simple extension to the LAP is the bottleneck linear assignment problem. Although the assignment
problem aims to minimise the total cost, there may one extremely high cost involved in the optimal solution.
If the cost data is not 100% accurate then this high cost may be even higher in practice, causing the
assignments to no longer be optimal. Therefore the bottleneck assignment problem aims to produce a ‘fairer’
more ‘even’ assignment. The bottleneck assignment problem has the constraints [2.2], [2.3] and [2.4] as
before but has a different objective function:
Minimise (maximum cij xij )
[2.5]
i ∈ I, j ∈ J
Martello & Toth, (1987)
[2.5] aims to minimise the maximum cost used in a feasible solution. This approach no longer assigns the
cheapest possible assignments but ensures that the worst assignment cost is as low as possible.
The multidimensional assignment problem is another subclass in the assignment family. This is a problem of
assigning one job to one agent at one point in time, whilst aiming to minimise the total cost of assignments.
This model has none of the original constraints but does undertake a similar structure. Figure 2.3 is a model
for the 3-dimensional assignment problem.
m
n
l
Minimise Z =
cijk xijk
[2.6]
i=1 j=1 k=1
Subject to
m
n
xijk = 1
k = 1, 2, …….., l
[2.7]
xijk = 1
j = 1, 2, …….., n
[2.8]
xijk = 1
i = 1, 2, …….., m
[2.9]
i=1 j=1
m
l
i=1 k=1
n
l
j=1 k=1
2-13
xijk = 1, 0
for all i, j, k
[2.10]
Figure 2.3
Where Cijk is the cost of assigning agent i to job j at time k. ‘The general idea behind the multidimensional
assignment problem is that there are often additional scheduling dimensions besides just scheduling men to
jobs that should be taken into consideration in making the optimal allocation. These additional dimensions
may be time, or space, or some other factors perhaps qualitative in nature
’, (Pierskalla, 1967). As
mentioned in 2.4 multi -dimensional problems have been found helpfu l in constructing timetables, (Burkard,
1979).
Another subclass in the assignment family is the quadratic assignment problem. This is a more complicated
extension of the assignment problem and is ‘
one of the most difficult combinatorial problems known in
mathematical programming. This problem occurs where the ‘cost of an assignment’ is not independent of
other assignments’, (Williams, 1995). This causes the objective function to become a quadratic expression
involving binary variables. This problem is therefore non -linear and cannot be solved like the assignment
problem. Thus it is necessary to convert the quadratic terms into linear constraints so that the problem can
be modelled as an integer programming problem, (Williams, 1995).
There are two other important subclasses in the assignment family, the generalised assignment problem and
the multi-level generalised assignment problem. These will be covered in more depth in the following two
chapters.
2-14
0
0
5
5
.
.
8
9
+
*
)
7
'
&
%
$
#
"
!
8
+
+
+
+
-
-
:
9
+
+
:
+
*
)
7
'
&
%
$
#
"
!
4
4
;
1
0
/
.
-
,
-
-
2
1
0
0
;
1
2
1
0
5
/
=
.
<
-
9
,
+
5
=
<
9
+
3.1
+
+
Definition of the generalised assignment problem
The Generalised Assignment Problem (GAP) is an important extension of the LAP. Its model structure
provides an efficient way to portray numerous problems. However, the structure of GAP problems makes
them generally hard to solve.
GAP problems are assignment problems which require all the tasks to be assigned to agents on a
one-to-
many basis. Therefore each task is still only completed once, but an agent can perform more than one task.
However, the number of tasks each a gent can complete is limited by the total amount of resources available
e.g. time, materials. The GAP accounts for differences in the performance efficiencies of agents and allows
them to complete multiple tasks.
The mathematical formulation of the GAP is:
m
n
Minimise Z =
cij xij
[3.1]
i=1 j=1
Subject to
n
rij xij ≤ bi
i = 1, 2, …….., m
[3.2]
xij = 1
j = 1, 2, …….., n
[3.3]
j=1
m
i=1
xij = 1, 0
where
[3.4]
m = number of agents i
n = number of tasks j
cij = cost of having agent i do task j.
rij = resource required by agent i to perform task j
bi = resource availability of agent i
xij = 1, if agent i performs task j
0, otherwise
Figure 3.1
3-15
It can be seen from figures 2.1 and 3.1 that the GAP is very similar to the LAP. The only constraint that
differs is [2.2], which becomes constraint [3.2] in the GAP. Each ta
resource depending on the agent completing it (r
ij),
sk requires a different amount of
and each agent has capacity restrictions on the total
resources s/he can use (b i). Thus constraint [3.2] ensures that an agent only undertakes as many tasks as s/he
has the capacity to complete. This problem allows the number of agents to be greater than the number of
tasks. Therefore unlike the LAP, m ≠ n, thus eradicating any need for dummy variables.
3.2
Difficulties with solving the generalised assignment problem
Unfortunately, unlike LAPs, GAPs are hard to solve. Numerous academics explain how the GAP is an NP hard combinatorial optimisation problem, (Martello & Toth, 1987, Cattrysse & Wassenhove, 1990). NP
-
hard problems are ‘a complexity class of problems that are intrinsically harder than those that can be solved
by a nondeterministic Turing machine in polynomial time.
When a decision version of a combinatorial
optimization problem is proven to belong to the class of NP-complete problems, an optimization version is
NP-hard’, (National Institute of Standards and Technology). Therefore as the GAP is NP-hard, it is expected
to be difficult to solve, especially if the problem is large. This poses a problem given that real -life problems
are usually of substantial size.
‘NP-completeness of a problem is generally accepted as strong evidence against the existence of a good
algorithm and consequently as a justification for the use of enumerative optimization methods such as
branch and bound or of approximation algorithm s’, (Lenstra & Rinnooy Kan, 1979). Thus there is not an
efficient polynomially bounded algorithm for solving all GAP problems. There has been a large amount of
interest from researchers into the development of efficient algorithms and heuristics for solv
ing the GAP.
There are numerous special purpose algorithms for the GAP but nobody has yet discovered an efficient
general purpose algorithm that can solve all GAP problems of reasonable size to optimality. Large sized
problems are often tackled by applyi
ng heuristics to obtain approximate solutions. There are various
efficient algorithms for solving the GAP ‘based on branch and bound techniques and on the relaxation of the
assignment or the knapsack constraints’, (Cattrysse & Wassenhove, 1990). These are techniques which will
be employed to solve GAP problems in Chapter 7.
3.3
Applications of the generalised assignment problem
There are numerous applications that have been modelled and solved as a GAP. Several instances that can
be accurately represented by the GAP were repeatedly mentioned in different research papers. Some of these
real-life GAPs are ‘resource scheduling, scheduling of project networks, storage space allocation, designing
communications networks with node capacity constraints, assigning
software development tasks to
programmers, assigning jobs in computer networks, scheduling variable length television or radio
commercials into time slots, scheduling of payments on accounts where ‘lump sum’ payments are specified ’,
(Cattrysse & Wassenhove, 1990, Ross & Soland, 1973, Jörnsten & Näsberg, 1986). Unfortunately no further
3-16
exact information is available on these applications or how they are solved as they were either published in
journals missing from the Leeds University library or were part of working papers.
Another frequently referenced problem using GAP is facility location problems. Facility location problems
arise when a set of facilities, e.g. warehouses or office sites, need to be located whilst ensuring that clients
are supplied with goods from these locations in the most efficient way possible. There are several variations
of facility location problems which slightly effect how they are solved. For example there may be a finite or
infinite number of supply centres. It may be a priv ate sector location problem, in which case the objective
will be to minimise cost or maximise profit. In contrast a public sector model will wish to maximise a
measure of public social utility, for example average weighted travel time between demand centr es and their
assigned supply centres. Ross and Soland, 1977 show how facility location problems are equivalent to, and
therefore solvable as GAPs. Generally the tasks will represent centres of demand for a good or service and
the agents will represent supply centres which will supply the good or service. Each of these demand centres
must be assigned to one of a specified set of supply centres in such a way to minimise the total cost. This is
analogous to the constraints [3.1], [3.3] and [3.4]. Constrai nt [3.2] provides a limit on the amount of goods
or services that the respective centres can supply. A limit may be a maximal distance allowed between
respective demand and supply centres, or it could be a capacity of the supply centre.
An extension of the facility location problem, which can also be modelled as a GAP, is the maximal covering
location problem. Klastorin, (1979) shows how the maximal covering location problem is applied when
there are insufficient resources to allow the
within the allocated limit. In this case ‘
construction of e nough facilities to serve all demand centres
the location problem is restated in order to locate the budgeted
facilities to maximise the number of demand centres (or serviced population) ’, (Klastorin, 1979). Usin g the
GAP to represent this problem allows numerous extensions to the model, which will more accurately depict
the problem. For example the model can easily include additional capacity or budget constraints. Ross and
Soland, (1977) indicate that ‘the GAP approach to modelling and solving facility location problems will offer
a good combination of modelling flexibility and reasonable computational requirements. There are few
computer codes available which offer this modelling flexibility for facility loca tion problems’.
Another type of location problem which uses the GAP is determining the optimal districting in urban
emergency services. The time it takes for emergency services to reach their destination is critical thus
districting is considered to be a
very important problem for emergency services. Bertolazzi, Bianco, and
Ricciardelli (1977) defines the districting problem as: ‘ given a region with a known spatial distribution of
demands for service and given N response units, whose location is also know
n; how should the region be
partitioned into areas of primary responsibility (districts), so that the quality service be the best possible? ’.
In this problem the emergency units were considered to be the resources available and various predefined
region p oints were considered to be the demand for the emergency units. This problem was successfully
applied to the emergency fire services of Rome, Italy. Therefore by using the GAP to help model the
3-17
problem and a transportation algorithm to solve it, there wa s a reduction in the overall emergency response
time of 26%.
The GAP has also been used in the scheduling of space mission plans. The ROSAT observatory is a joint
British, US, American and German space project that provides X
-ray images of the sky. ROSA
T is
considered to be ‘ the most fruitful X -ray astronomy observatory and has made many discoveries of
outstanding scientific relevance’, (X-Ray Astronomy). The mission planning of ROSAT is strongly affected
by a lot of operational constraints. The main o bjective is to find a schedule with the longest duration. There
are also several secondary objectives to consider, for example the schedule also wants to minimise the
number of partially scheduled objects and maximise the number of high priority observati ons. Nowakovski
et al (1996) confine themselves to discuss the most important constraints and show how a relaxation of the
ROSAT problem formulation can be modelled as a GAP. The schedule produced by this relaxed problem is
found to be a good solution of
the original ROSAT problem. Using the GAP formulation to model the
problem and produce a schedule enabled ROAST to work efficiently for nine years.
3-18
2
2
5
5
5
.
5
@
?
+
#
"
!
.
@
C
?
*
)
+
+
C
+
+
+
*
>
'
&
%
$
)
>
'
&
%
$
#
"
!
B
A
B
A
1
0
0
0
5
/
5
.
.
.
8
9
8
+
-
-
-
+
+
9
:
+
+
,
:
-
-
2
1
0
0
2
0
/
.
-
,
+
+
+
4
4
;
;
1
1
5
=
<
9
5
=
<
9
+
+
4.1
Definition of the multi-level generalised assignment problem
The multi-level generalised assignment problem (MLGAP) is an extension of the GAP, whereby agents can
perform tasks at more than one efficiency level. The mathematical formulation of the MLGAP is:
m
n
l
Minimise Z =
cijk xijk
[4.1]
i=1 j=1 k=1
Subject to
n
l
rijk xijk ≤ bi
i = 1, 2, …….., m
[4.2]
xijk = 1
j = 1, 2, …….., n
[4.3]
j=1 k=1
m
l
i=1 k=1
xijk = 1, 0
where
[4.4]
m = number of agents i
n = number of tasks j
l
= number of efficiency levels k
cijk = cost of agent i doing task j at level k
rijk = resource required by agent i to perform task j at level k
bi = resource availability of agent i
xijk = 1, if agent i performs task j at level k
0, otherwise
Figure 4.1
The objective function [4.1] of the MLGAP aims to assign
n tasks to m agents with a maximum of
l
efficiency levels in order to minimise the total cost of assignments. It can be seen that the objective function
of the MLGAP is the same as for the 3
-dimensional assignment problem ([2.6]). Similarly to other
assignment problems, each task can only be assigned once to an agent i at a level k (constraint [4.3]). A task
4-19
will have different resource requirements depending on the agent and level to which it is assigned, (r
ijk).
Constraint [4.2] allows an agent i to perform more than one task at more than one level, providing the sum of
the resources required for these tasks does not exceed the capacity restrictions (b i) of each agent.
4.2
Difficulties with solving multi-level generalised assignment problems
The MLGAP is intrinsically more difficult to solve than the GAP as the number of varia
bles dramatically
increases with the number of efficiently levels. For each additional level of efficiency there will be m*n
more variables than the corresponding GAP. This large number of variables makes it very hard to find an
optimal solution to MLGAP s, even when using powerful commercial optimization packages. ‘
MLGAP
formulations of ‘real -world’ problems contain a large number of binary variables, eliminating (for all
practical purposes) the possibility of finding optimal solutions’, (Laguna et el, 1992). There has been far less
research into algorithms for the MLGAP compared to those available for the GAP. However, Osorio and
Laguna, (1999) report how utilising the structure of the MLGAP model to add knapsack constraints or logic
cuts to the model, before solving it with classical B&B techniques, is a very effective method for solving
MLGAPs. The logic cuts reduce the number of variables which consequently reduce the number of nodes in
the tree. Because the time taken to solve the problem grows ex
ponentially with respect to the number of
nodes to search in the tree, reducing the number of nodes will therefore substantially reduce the time it takes
to solve the problem. Osorio and Laguna, (1999) concluded that this technique worked well on large
problems but did not always reduce the time taken to solve small problems.
4.3
Applications of the multi-level generalised assignment problem
Although numerous researchers have proposed algorithms for solving MLGAPs, it was extremely hard to
find documented rea l life applications involving the MLGAP. The majority of journals reviewed mention
how important manufacturing problems can be modelled as a MLGAP. However the only problem ever
properly referred to was of ‘lot sizing’ by Glover, Hultz and Klingman. Unf ortunately this was in a journal
missing from the University of Leeds library. Laguna et el, 1992, explains how ‘lot sizing’ problems can be
modelled and solved as MLGAPs. ‘
The objective is to minimise the combine cost of production and
inventory holding by determining optimal product lot sizing and optimal assignment of production to
machines. There are a maximum of l possible lot sizes, and the machines work in parallel at different rates
and operational costs. Some general -purpose machines are capabl e of producing several (or all) of the
products while others are more specialised. For this application, c
ijk
represents the combined setup,
production, and holding cost (per unit of time) incurred when product j is assigned to machine i in the k
possible lot slot. Therefore for a particular product
-machine pair, a small lot size results in a large
combined cost and vice versa’, (Laguna et al, 1992).
Another type of GAP, called the Multi
-Resource generalised assignment problem, kept appearing when
searching for MLGAP instances. The Multi -Resource GAP is a generalisation of the GAP where agents
4-20
th
have more than one set of resources available for performing the tasks. This was found to be used in many
applications. One important problem found, concerned
the snow removal in Montréal, (Campbell and
Langevin, 1995). The aim was to find the best assignment of snow removal sectors to snow disposal sites
such that the sum of distances travelled whilst depositing the snow was minimised. This problem model also
accounts for environmental concerns, for example by trying to reduce the volume of snow dumped into the
river. Solving this Multi -Resource GAP using CPLEX, a commercial optimisation package, provided
Montréal with an improved assignment of snow removal.
However better results were found when the
problem was solved using a specialised heuristic algorithm, coded in C and solved on a SUN Sparc 10.
4-21
1
0
5
5
E
0
5
5
/
1
E
.
<
<
=
<
:
9
?
:
0
5
/
.
?
+
0
5
.
=
-
<
@
-
9
-
@
/
/
.
-
+
+
+
D
'
&
%
$
#
"
!
D
'
&
%
$
#
"
!
4
4
1
1
1
2
1
0
5
5
/
.
.
<
2
0
.
<
/
.
9
+
9
9
+
+
+
9
+
F
+
F
4
F
F
4
1
E
1
1
E
1
0
/
.
/
E
/
/
/
.
<
9
E
0
/
<
9
9
9
+
+
G
F
4
G
4
4
F
4
5.1
4
4
Introduction to XPRESS-MP, a commercial integer programming package
There are numerous commercial standard integer programming packages available to help solve ILPs
promptly and efficiently. These packages enable managerial problems, especially those involving large
volumes of data, to be solved ea sily and quickly. Each package has different capabilities and limitations
from the system requirements to the specialised features it offers. The University of Karlsruhe provides a
good summary of commercial integer programmes available.
The University of Leeds uses the XPRESS-MP programming package, by Dash Optimization. XPRESS-MP
is a popular linear and integer programming modelling and optimisation system amongst professional bodies.
For example National Power, a privatised UK utility, has a versio n of XPRESS-MP installed for supporting
decision analysis. Dash Optimization claim that ‘ XPRESS-MP is the world’s leading software product for
modelling and optimization.
XPRESS-MP solves large -scale optimization problems and enables better
business deci sions. It has been applied in sectors as diverse as manufacturing, processing, distribution,
retailing, transport, finance and investment
’. CPLEX is the another popular commercial integer
programming package used in organisations.
5.2
Building a general model using XPRESS –MP
XPRESS-MP has two distinct areas, the model builder and the optimiser. The model builder allows you to
program and debug the model before attempting to solve the problem with the optimiser. This feature allows
easy identification and co
rrection of errors that might occur, especially when programming large
complicated problems. The model builder is activated by running ‘ mp-model’ at the command prompt. The
‘mp-model’ command can read, interrogate, process and export data from and to the
original data source.
The model builder options used in this project will be discussed as they are employed.
An XPRESS -MP model is a .mod text file consisting of a series of sections, which define the problem.
There are 24 possible sections to include,
each one performing a different function. These sections have
extensive capabilities which allow models to have flexible structures. Each section is started with a reserved
keyword and followed by statements defining the problem. When the model is compl ete, it is processed by
the model builder. Running ‘mp-model’ interprets the generic model specification and separates the problem
data from the model structure to create a particular instance of the model. It then writes the problem into a
.mat file which in turn can be interpreted by the optimiser.
5-22
XPRESS-MP is a high level modelling language rather than a general purpose modelling language.
Therefore it is relatively simple to model assignment family problems in XPRESS -MP as they are originally
formulated (like in figures 2.1, 3.1 & 4.1). An aim of this project is to produce a general model for the GAP
and MLGAP. By producing a general model, numerous different problem instances can be tested without
having to continuously rewrite the model.
5.2.1
Stage 1, a general model for the linear assignment problem
As stated in Chapter 2, the GAP and MLGAP are both extensions of the linear assignment problem.
Therefore a model representing the linear assignment problem was built and used as a basis model for
building the GAP and MLGAP models. This was useful as it allowed various problems to be corrected while
the model was small and simple to solve.
A problem specific model was built to solve a 5*5 linear assignment problem. The following sections were
used in the model and form a template for the GAP and MLGAP general models. (The capitalised words are
XPRESS-MP reserved keywords).
MODEL
<filename>.mod
This is used to identify the problem. The filename given will also be used as the default name for any files
generated from this model.
LET
m=5
n=5
This is used to initialise the number of agents and jobs. The entire model works from the two symbols
m
and n, and their assigned values.
VARIABLES
X(m, n)
This is used to define the variables Xij. Constraint [2.4] expresses that these must be a bin
Therefore the BOUNDS section must be included in the model.
5-23
ary variables.
BOUNDS
X ( i=1:m , j=1:n ) .BV.
This implies that every Xij, where i=1, 2, … ,m and j=1, 2, … ,n, must be of type .BV (binary variable).
From Chapter 2.2, it is known that in order to solve the assignment p
roblem there needs to be m*n cost
data’s. Before the model can process any data, it is necessary to define the size of the tables from which the
data is read.
TABLES
cost(m, n)
This defines a table called ‘cost’ of size m*n. Because this is 2 -dimensional, it can be vie wed as a matrix
where m is the line number and n is the column number.
Originally the data was read in directly from the model using the DATA section. The structure of this can be
seen in Appendix C. To make the model less problem specific, the data was
read in from an external file.
The external file is a .dat text file and uses the same data arrangement as before.
DISKDATA
cost = apdata.dat
Now all the values read in from the ‘apdata.dat’ data file are directly placed in the ‘cost’ table. It is worth
noting at this point that the size of the .dat file must be no bigger than the size of its corresponding table,
otherwise there is not adequate space to put the data. However the .dat file may be smaller than the size of
the table as XPRESS-MP just places 0’s in empty matrix spaces.
It is now possible to model the constraints which form the structure of the assignment problem.
5-24
CONSTRAINTS
Cost:
sum (i=1:n, j=1:m) cost(i, j) * X(i, j) $
[5.1]
Agent(i=1:m): sum(j=1:n) X(i, j) = 1.0
[5.2]
Job(j=1:n):
[5.3]
sum(i=1:m) X(i, j) = 1.0
[5.1] is equivalent to the objective function [2.1]. [5.2] & [5.3] are equivalent to constraints [2.2] & [2.3]
respectively.
The GENERATE command is the final keyword in the model. It is used to indicate that the model
specification is complete and produces a mathematical programming matrix where all the information is
systematically reorganised into a standard form. This matrix is
an XMPS m atrix file and will have the
default name of ‘<filename>.mat.’ An MPS file is a very old column orientated format that represents the
problem and its data. A small example of how an MPS file corresponds to a particular instance of a
mathematical model is shown in Appendix K. ‘ The industry standard input form of LP and MILP problems
is MPS format’, (Kallrath & Wilson, 1997, Optimization Technology Centre).
The complete assignment problem model was compiled and solved without any problems. This can be seen
in Appendix D. However, this is not a general model as it is necessary to specify the cost data -file and the
number of m and n from within the model file. This posed a problem as the reference manual was unclear on
how to define parameters from outside the model. Several attempts were made to solve this by following the
two examples explained in the DEFINE section of the reference manual. Example 2 solved a similar
problem but unfortunately the logic of the code did not work in this model. After several trial attempts it was
noticed that all of the examples included ‘% parameter%’ within the model, and that this parameter can be
defined at the command prompt by using ‘ -d ’. After a few experiments with alternative coding structures a
solution to the problem was found. By making the following changes, parameters from within the model can
be defined from outside the model.
LET
m = %agents%
n = %jobs%
DISKDATA
cost = %datafile %
5-25
These parameters can now be defined when the model is input into the model builder rather than from within
the actual model. The model builder command prompt is now as follows:
>> mp-model <model filename>
-dagents = 5
-djobs = 5
-ddatafile = apdata.dat
It is now possible to define all the problem data externally to the model. Appendix E contains the final
general model for the assignment problem. As explained in previous chapters, properties held by the
assignment problem are inherently implicit within both the GAP and MLGAP due to the latter being
evolutions of the former. Therefore this assignment problem model will form a template from which to build
the GAP and MLGAP models.
5.2.2
Stage 2, a general model for the generalized assignment problem
The first change to the template model was to alter the constraints. As previously explained in Chapter 3,
constraint [2.2] in the classical assignment problem changes to become constraint [3.2]. Therefore constraint
[5.2] in the model is altered to become:
Agent(i=1:m): sum(j=1:n) resource(i,j) * X(i,j) < capacity (i)
[5.4]
Note that in XPRESS -MP ‘<’ implies ‘less than or equal to’. This constraint introduces two new data
elements, the resources required by the agents to perform each job and the total resource availability of each
agent. Therefore it is necessary to alter the TABLES and DISKDATA sections accordingly so that this extra
information can be read into the model.
TABLES
cost(m, n)
resource(m, n)
capacity (m)
There are now three tables, two of size m*n, and one of size 1*m.
DISKDATA
cost = %costin %
resource = %resin %
capacity = %capin %
5-26
Similarly, the parameters enclosed in the percentage signs are defined at the model builder command prompt.
>> mp-model <model filename> -dagents = 5
-djobs = 5 -dcostin = cost.dat
-dresin=resource.dat
-dcapin=capacity.dat
Appendix F contains the first general model for the GAP. The model was tested using a small problem
involving 3 agents and 3 jobs, Appendix I. XPRESS
-MP’s solution matched the solution obtained by
manually solving the problem using enumeration. This model was further tested using several instances
from the ‘gap1’ test data, created by J Beasley, Appendix J. All of the optimal objective values calculated by
XPRESS-MP were the same as obtained by Beasley. Therefore this GAP model (Appendix F) is adequately
general to solve any GAP without the need to specify any data changes from within the model.
5.2.3
Stage 3, Improvements to the general model
Although the previous model is sufficiently general enough to solv e any GAP, it is impractical to separate
and write the data into three separate files and read them in one by one. It would be quicker and easier to
read in one file containing all the essential data. It was decided to structure this one data
-file in the same
format as J Beasley’s data because the majority of testing conducted in Chapter 7 will use these data sets.
Therefore the data is read into the model in the following format.
This creates a file with the following structure
number of agents (m), number of tasks (n)
m, n
c11, c12,
…….,c1n
…..
for each agent i (i=1,…m) in turn :
cost of allocating task j to agent i (j=1,…,n)
cm1,cm2, ……, cmn
r11, r12, …….,
r1n
for each agent i (i=1,…,m) in turn:
…..
rm1,rm2, ……,
b1, b2, …….,bm
resource consumed in allocating task j to agent
rmn
i (j=1,…,n)
resource capacity of agent i (i=1,…,m)
Figure 5.1
The original plan was to read in one file structured as figure 5.1, divide it up into the four sections and assign
the data to its appropriate place within the model. As explained in Chapt
er 5.2.1, XPRESS -MP requires
tables to be defined before the data can be read. Figure 5.1 suggests that a table of size ((2*m+2), n) is
required to hold the data. This is because there are (1+m+m+1) rows and at most n columns, assuming that
there will never be more agents than there are jobs i.e. n ≥ m. Therefore if all the data is in one file, it would
be no larger than a matrix of size (2*m+2)*n. However programming this into the model caused a problem
5-27
because the values of m and n are not yet known, but they are needed to define the table size. Therefore, it is
necessary to define m and n before the table can be created, which in turn must be created before the data can
be read in. As m and n are contained in the file to be read in, the format of th
e data file was consequently
altered to exclude the number of agents and jobs, i.e. the first line was removed. M and n are now defined at
the command prompt separately from the rest of the data. It was then possible to read in one file of size
(2*m+1)*n, and divide it up into the three separate data tables. The following changes were made to the
previous model to implement this idea.
TABLE
datain (2*m+1, n)
The other three table elements; cost, resource and capacity remain in the model as before.
DISKDATA
datain = %filein%
ASSIGN
FOR (i=1:m, j=1:n): cost(i, j) = datain(i, j)
FOR (i=1:m, j=1:n): resource(i, j) = datain(m+i, j)
FOR (i=1:m):
capacity(i) = datain((2*m+1), i)
The assign section divides the data-file and assigns the values to the correct place in their appropriate table.
Consequently the input at the command prompt has been reduced to:
>> mp-model <model filename> -dagents = 5
-djobs = 5 -dfilein = alldata.dat
This new model shown in Appendix G is far more practical and easier for the purposes of this project than
the one produced in 5.2.2. Therefore, this will be the GAP model used for testing the capabilities of
XPRESS-MP. However, it should be noted that this model is less generic than the previous model as all the
input data now has to be structured like figure 5.1.
5-28
5.2.4
Stage 4, a general model for the MLGAP
As explained in Chapter 4, the MLGAP is an extension of the GAP. Thus properties held by the GAP are
inherently implicit within the MLGAP. Therefore the GAP model produced in 5.2.3 will be used as the
generic base model. However, it was considerably harder and thus took more time than originally thought to
include the 3rd dimension of the MLGAP into the model.
The first step was to define the number of efficiency levels in the LET section, leaving the agents and tasks
as before.
LET
l = %levels%
The next step was to define the binary variables Xijk and adjust the tables to account for the added dimension.
VARIABLES
X(m, n, l)
BOUNDS
X(i=1:m, j=1:n, k=1:l)
.BV.
TABLES
cost(m, n, l)
resource(m, n, l)
capacity(m)
The constraints section was similarly adjusted to include the 3rd dimension.
CONSTRAINTS
Cost:
sum (i=1:n, j=1:m, k=1:l) cost(i, j, k) * X(i, j, k) $
Agent(i=1:m): sum(j=1:n, k=1:l) resource(i, j, k) * X(i, j, k) < capacity (i)
Job(j=1:n):
sum(i=1:m, k=1:l) X(i, j, k) = 1.0
5-29
As there was only one set of test data for the MLGAP that was already in MPS format, there was no
predefined way of formatting the data file to be read in. Therefore it was d
ecided to structure the file as
follows:
c111,c121, … , c1n1
….
cm11,cm21 … , cmn1
……….
c11l,c12l, … , c12l
….
cm1l,cm2l, … , cmnl
Cost of agent i doing job j at level 1
Cost of agent i doing job j at level 2, 3, …,
Cost of agent i doing job j at level l
r111,r121, … , r1n1
….
rm11,rm21, … , rmn1
Resources required by agent i to perform job j at level 1
………..
Resources required by agent i to perform job j at level 2, 3, …
r11l,r12l, …, r1nl
….
rm11,rm21, … , rmn1
Resources required by agent i to perform job j at level l
b1, b2, … , bm
Capacity of agent i
Figure 5.2
Therefore all the costs are read in together and all the resources are read in together. This requires a table of
size ((2*m*l)+1)*n. However this caused problems when the file had to be divided up and assigned to the
three separate data tables. Sometimes the model was una ble to read the data in or it was allocated to the
wrong place within the tables. This was because the file read in was of size ( ((2*m*l)+1), n) and constraints
[5.8] and [5.9] both require tables of size (m, n, l), thus assignments were being made from a 2-dimensional
table to a 3 -dimensional table. XPRESS -MP does not allow this and generated hundreds of errors.
Therefore the file read in had to represent a 3 -dimensional structure. It can be seen from figure 5.2 that all
the efficiency levels appear i n two sections of the file, once in the costs section and once in the resources
section. The costs will be read in for each level first and then the resources will be read in for each level. As
XPRESS-MP reads in the data by changing the outermost variab le first it was decided that the outermost
index should represent the number of jobs and not the number of levels. Thus a table of dimension
(2*l+1)*m*n was required and meant that every (m, n, l) in the model had to be replaced with (l, m, n).
After several trial assignment statements, it was eventually possible to assign the costs and resources to their
correct place in their table. These were the assign statements used:
FOR (k=1:l, i=1:m, j=1:n): cost(k, i, j) = datain(k, i, j)
FOR (k=1:l, i=1:m, j=1:n): resource(k, i, j) = datain(k+l, i, j)
5-30
It was previously mentioned that XPRESS -MP does not like assigning data betw
een tables of different
dimensions. However it was noticed that it allows assignments from a table of a higher dimension to a table
of a lower dimension. This is done by fixing the 2nd index variable at 1:
FOR (k=1, i=1:m):
capacity(i) = datain((2*l+1), k, i)
The only difference at the model builder comma nd prompt is the number of efficiency levels that are in the
data file. The following is the command line read in:
>> mp-model <model filename> -dagents = 5
-djobs = 5 -dlevels =3 -dfilein = alldata.dat
The final general model for the MLGAP, that will be used for testing the capabilities of XPRESS-MP can be
seen in Appendix H.
5-31
2
E
1
2
2
1
J
2
0
E
2
J
2
0
.
.
.
.
.
-
.
.
-
<
.
<
*
I
H
'
&
%
$
#
"
!
*
I
H
'
&
%
$
#
"
!
4
4
4
1
4
1
1
2
1
L
5
0
L
.
<
2
0
/
5
/
.
<
9
+
9
9
+
+
+
9
+
+
K
K
F
4
F
4
;
;
;
1
1
1
;
1
0
/
0
/
.
<
9
/
/
/
/
.
<
9
9
9
+
+
G
F
4
G
4
4
F
4
6.1
4
4
Optimisation of the general models
As mentioned in Chapter 5.2, XPRESS-MP has two distinct areas, the model builder and the optimiser. Now
the general models are complete, XPRESS -MP can find solutions to any instance of the models. The
GENERATE command in the models created in Chapter 5, produces an XMPS .mat file. This is the file read
into XPRESS-MP’s optimiser by the command ‘mp-opt’:
>> mp-opt <filename>.mat
By examining the MPS file in Appendix K, it is noticeable that there is nothing specifying the direction of
optimisation i.e. whether the problem is maximisation or minimisation. XPRESS-MP allows you to specify
the direction after the model has been read in to the solver. Therefore there is no need to rewrite the data if
the objective function changes from maximisation to minimisation or vice versa.
Therefore the input at the command prompt is:
>>Minimisation or Minim OR
6.2
>>Maximisation or Maxim
Optimisation commands
XPRESS-MP’s optimiser incorporates numerous different linear and integer programming functions that
control how a solution is found. By differing th
ese commands and controls, the efficiency of finding
solutions is altered. This section explains the optimisation controls that will be used in to test the capabilities
of XPRESS-MP in solving difficult problems.
6.2.1
Presolve
The first optimisation control of XPRESS -MP to consider is the presolver. By default mp
-opt will start
presolving the matrix after the minim/maxim command. Presolving the matrix attempts speed up
optimisation by ‘ eliminating fixed variables, attempting to tighten bounds on variables,
and trying to
perform other operations which enable the solvers to operate more efficiently……however commercial
software vendors are usually not very specific about which techniques they have implemented or methods
used’, (Kallrath and Wilson, 1997). The
support offered by Dash Optimisation was very helpful and
friendly, but when asked about the presolve behaviour they did not specify exactly which algorithms are
used. Kallrath and Wilson (1997) explain some of these pre
6-32
-processing methods, for example ro w and
column bounding, disaggregation of constraints, coefficient reduction. If presolve effectively removes
redundancies from the problem XPRESS-MP will report the message ‘LP relaxation tightened’. This results
in the optimal objective value of the LP relaxation for a presolved matrix (z*LPp) to be different from that for
the un -presolved matrix (z *LPu). Presolve creates a stronger, tighter formulation of the problem by
eliminating redundancies, thus providing a z *LP closer to the optimal objective val ue (z *IP). This can be
represented by:
[z*LPp - z*IP]
<
[z*LPu - z*IP]
These two differences are known as the integrality gap of the IP. The smaller the integrality gap is, the
nearer the LP -relaxation is to the optimal solution, thus reducing the se
arch to find the optimal solution.
Therefore the difficulty of solving an IP is known to decrease with decreasing (%) integrality gap, (Kallrath
& Wilson, 1997). Presolving the matrix may reduce the integrality gap, thus making the IP easier and
quicker to solve.
Unless otherwise specified, the optimiser will seek to find the optimal LP solution (z*LP) by using the
primal simplex algorithm. It is possible to use the dual simplex algorithm or the Newton Barrier interior
point algorithm, but as explained in Chapter 1, the simplex algorithm is very efficient for solving LPs.
If the problem is small enough it is likely that presolve will cause the LP relaxation to have an integer
solution without having to using integer optimisation commands. This is demonst rated by a small 3*3 GAP
example shown in Appendix I. When row and column bounding were applied, no changes were made.
There was only one change if presolve used the adjustment of coefficients.
From the problem given in Appendix I, the third constraint is:
5A3J1 + 2A3J2 + 7A3J3 ≤ 8
As this inequality conforms to the rules regarding coefficient reduction (Kallrath and Wilson, 1997) then it
can be reduced to a tighter inequality:
5A3J1 + 2A3J2 + 6A3J3 ≤ 7
An even tighter inequality could be formed:
5A3J1 + 2A3J2 + 7A3J3 ≤ 7
When this constraint is added to the other six already present in the model, and solved manually the solution
is naturally integer. Thus when XPRESS-MP solves this problem with its default settings, an integer feasible
solution (IFS) was generated straight away as opposed to the fractional solution obtained when the presolve
behaviour was turned off.
6-33
6.3
Optimising integer programming problems
XPRESS-MP is capable of fi nding integer solutions by instructing mp -opt to search for the global optimum.
The mp -opt command GLOBAL instructs the optimiser to start a B&B search to locate and prove the
optimal solution.
6.3.1
Cutting planes algorithm
By default XPRESS-MP automatically calls the cutting planes algorithm before commencing with the B&B
search. ‘ The cuts that are generated are valid inequalities derived from standard canonical structures
identified in the matrix’, (XPRESS-MP reference manual). As explained in Chapter 1. 3, the addition of cuts
attempts to tighten the feasible region in order to reduce the number of possible solutions. Adding cuts is
thought to further reduce the integrality gap of the problem by providing a z
*
LP even closer to z *IP. For
example consider a maximisation problem.
z*LPcuts < z*LP
M
[z*LPcuts - z*IP] < [z*LP - z*IP]
As the B&B search uses the LP relaxation solution for bounding the IP solution, adding cuts should improve
this bound, thus allowing the algorithm to obtain the solution fast
er. Sometimes the addition of cuts can
reduce the integrality gap to zero, therefore forcing all the integer variables to integer values and eliminating
the need for a tree search. However, as mentioned in Chapter 1.3, the addition of cuts can be quite t
ime
consuming. Adding cuts increases the size of the problem which thus increases the time to solve each node.
If the cuts have not significantly reduced the number of nodes to search, then the overall solution time will
increase. It is also reported by
the reference manual that ‘ adding cuts can make it harder to find good
integer solutions……it is often worth experimenting using different values for the control variables which
affect cut generation’. Therefore not all cuts found are added into the probl em. XPRESS-MP automatically
outputs how many cuts are added to the matrix.
It was unknown which cutting algorithms XPRESS -MP uses as the reference manual only explains how to
control the cut strategy. It does not mention what type of cuts are used. When
asked, Dash Optimisation
reported to use ‘ Gomory cuts, cover cuts, and others ’, (Appendix L). Gomory cuts are named after the
person who introduced the cutting plane method in 1958. They are not as frequently used as the other cuts so
for a further explanation of how they work refer to Salkin, (1975).
As mentioned in Chapter 1.3, a cut is a valid inequality for the IP problem but not for its LP relaxation.
There are various ways of generating cuts, but as Dash Optimisation said they used covers, this wi
ll be
assumed to be the most prominent cutting algorithm in XPRESS -MP. A cover inequality is said to ‘ usually
apply to 0-1 knapsack problems’, (Kallrath and Wilson, 1997). A knapsack problem is ‘ an IP with a single
constraint’, (Williams, 1995). It was
mentioned in Chapter 4.2 how Osorio and Laguna (1999) used the
structure of the MLGAP model to add knapsack constraints or logic cuts to efficiently solve the MLGAP.
6-34
Therefore it is thought that adding cuts to the problem will help to efficiently solve th
e GAP and MLGAP
problems. The GAP and MLGAP problems can easily be reduced to knapsack problems with one constraint
of the form:
n
rj xj ≤ b
j=1
Cover cuts try to ‘ find certain combinations of binary variables such that the sum of their associate
d
coefficients exceeds the capacity of the knapsack ’, (Kallrath and Wilson, 1997). Kallrath and Wilson (1997)
give a detailed explanation and the mathematical formulation of covers. Minimal covers are inequalities
such that if all the variables are equal to 1, the constraint is violated but if any of the variables are set to zero
the constraint would not be violated. An extended cover is a minimal cover but with extra variables that
have a coefficient bigger than the largest coefficient already present i n the cover. Lifted covers are covers
extended to include variables not already in the cover.
Covers were generated for the small 3*3 example used in Chapter 6.2.1 Appendix I. XPRESS-MP reported
to have 3 cuts in the cut pool which were all added to the
matrix. However it was decided to illustrate the
generation of cuts on a single constraint rather than a problem with six constraints.
10X1 + 9X2
+ 7X3
+ 5X4
≤ 14
[6.1]
An example of covers for the inequality [6.1] are:
X1 + X2 +X4 ≤ 2
X1 + X3 +X4 ≤ 2
X2 + X3 +X4 ≤ 2,
The possible minimal covers are:
X1 + X2 ≤ 1,
X1 + X3 ≤ 1,
X1 + X4 ≤ 1,
X2 + X3 ≤ 1,
An extended cover would be:
X1 + X2 + X3 ≤ 1
It can be seen that all these inequalities together are equivalent to the original constraint. Therefore it would
be a waste to add them all to the problem. A general idea is to find cover inequalities for the original
constraints which are violated at the optimal solution of the LP relaxation.
Clique generation is a method for tightening inequalities with 0-1 variables. A clique is a subset of variables
where at most one can be set to 1. Again consider the small example of [6.1]. A clique of the problem
would be:
X1, X2, X3
i.e. X 1 + X 2 + X 3 ≤ 1. However, this inequality has a lready been found as an
extended cover.
6-35
Integer rounding is another way to tighten the constraints. This is done by dividing the entire constraint by a
coefficient value and then rounding the coefficients down to the nearest integer value. Therefore the
constraint [6.1] would be tightened to:
10/5X1
+ 9/5X2 + 7/5X3 + 5/5X4 ≤ 14/5
≡ 2X1
10/7X1
+ 9/7X2 + 7/7X3 + 5/7X4 ≤ 14/7
≡ X1 + X2 + X3 ≤ 2
10/9X1
+ 9/9X2 + 7/9X3 + 5/9X4 ≤ 14/9
≡ X1 + X2
10/10X1 + 9/10X2
+ 7/10X3
+ 5/10X4
≤ 14/10
≡ X1
+ X2 + X3 + X4 ≤ 2
≤ 1
≤ 1
Although clique generation and integer rounding are very simple and easy to code they are unintelligent and
can potentially generate many valid inequalities. It is therefore assumed that XPRESS -MP uses cover cuts
the majority of the time as the method appears far superior to the other methods mentioned.
However the above example shows how one constraint can generate 8 cover inequalities. Imagine how
many constraints there would be for a problem with only 10 constraints. Findi ng all these constraints would
take quite a long time and is not always justified considering the fact that adding cuts might actually make it
harder to solve the IP. Therefore XPRESS-MP has a ‘cut pool’ which stores a list of valid inequalities to use
when solving the problem. After solving the LP relaxation it is possible to add more cuts to the LP problem,
from the cut pool, which are violated by the LP solution. XPRESS-MP can also remove cuts, made to the LP
problem, that are now slack, i.e. no longe r violated by the LP solution. These removed cuts are placed back
into the ‘cut pool’. Cuts are added and deleted after each time the LP relaxation is solved. XPRESS
-MP
resolves the LP relaxation for a maximum number of 22 iterations by default. After this the optimiser goes
into the B&B algorithm. It is also possible to add and delete cuts from the pool during the tree search.
However time and effort need to be balanced against the progress made. In some situations a ‘good’ solution
is worth more than the time and cost spent to find an optimal solution.
The cutting strategy is thought to improve the objective value and thus potentially improve the ‘bound’ in the
B&B algorithm. Ragsdale and Shapiro (1995) explain how commercial integer programming so
ftware
packages and a number of academic researchers believe that a ‘good’ incumbent solution will improve the
computational efficiency of finding the integer solution. However they prove this to the contrary. ‘
The
misconception is that the computational efficiency of B&B algorithms will be improved (or at least not
degraded) by specifying a ‘good’ initial bound on the objective function value for the problem being solved ’,
(Ragsdale and Shapiro, 1995). Therefore using the cutting strategy may increase t he time taken to solve the
problem as there may be hundreds of additional constraints that actually make it harder for the B&B
algorithm to solve.
6-36
6.3.2
Branch and Bound
Chapter 1.3 briefly explained how the B&B algorithm works. The following diagram by Ragsda
le and
Shapiro, (1995) provides a basic understanding into how the algorithm works for a minimisation problem.
For a detailed explanation of the B&B algorithm refer to Kallrath and Wilson (1997).
START
Z’ = infesible
Initialise
Node List
Yes
List
STOP
Empty?
No
Select Problem
from Node List
Relax & Solve
for ZLP
Yes
Infeasible?
No
Fathom
Node
Yes
Z’ ≤ ZLP ?
No
Yes
Z’ = ZLP
Solution
Integer?
No
Branch & Update
Node List
Figure 6.1
The three main concepts that X PRESS-MP considers in its B&B algorithm are relaxation, separation and
fathoming. Firstly the algorithm looks at the LP relaxation. Each of the nodes of the tree represents an LP
problem. If the solution is infeasible or has an integer feasible solution (IFS) then the node is fathomed i.e.
cut off. Additionally fathomed are any nodes that produce z* out of the ranges:
6-37
z*LP ≥ z* ≥ z*IP
for a maximisation problem
z*LP ≤ z* ≤ z*IP
for a minimisation problem
If a node is not fathomed, it is separated and branched into two sub-problems. This continues until there are
no more nodes to solve.
Branching
Figure 6.1 is a very basic example to show how the B&B algorithm branches. Suppose it is known that the
optimal value of x in the LP-relaxation is 5.26. X must be integer and so adding the constraints x ≤ 5.0 or x
≥ 6.0 respectively to the sub-problems will ensure that no integer values are missed during the search.
Parent Node
x≤5
x≥6
Sub-problem 1
Sub-problem 2
These sub-problems are solved as LPs and either fathomed or further branched upon.
XPRESS-MP has different strategies for deciding which node and variable to branch upon. By default,
XPRESS-MP selects the next node by local first search with each variable having an equal priority for
branching. Kallrath and Wilson (1997) contradicts
this by saying that generally depth first searches are
preferred. However, in both searches, each successive LP can easily be solved using the dual simplex
method on a previous solution. This is much easier and quicker than solving the complete problem
from
scratch. XPRESS -MP is capable of performing breadth first searches, depth first searches or breadth/local
first searches. It also allows the user to choose the branching variable in a variety of different ways.
Bounding
Bounds are created to prevent an exhaustive search. As explained in Chapter 1.4.1, the feasible region of the
IP is wholly contained in the feasible region of the LP relaxation. Thus it is known that the best integer
feasible solution can never be better than z
*
LP. For a maximisati on problem the z *LP provides an upper
bound and for a minimisation problem it provides a lower bound. As the B&B algorithm proceeds, both the
upper and lower bounds will be changed in order to restrict the search and fathom more nodes. The further
down the tree you go the worse the optimal solution becomes. ‘ If the value of the LP relaxation is no better
than the bound then any IP descendent of the node cannot be better than the IP solution value already
6-38
found’, (XPRESS-MP reference manual). Therefore w hen an IFS is found, it will change the bounds of the
problem. This helps to fathom nodes as early as possible, thus reducing the number of nodes to search.
6.4
Different algorithmic choices for solving the GAP and MLGAP
One aim of the project was to investig ate the algorithmic choices available in a standard general purpose
B&B code for integer linear programming. The original idea was to investigate the effect of using different
branching strategies available in XPRESS
-MP on solving some classes of assignme
nt problems. For
example it was to be investigated how the B&B algorithm best selects the next node or variable to search
when solving GAP and MLGAP problems. A lot of time was spent researching and understanding how
different branching strategies affect finding the solutions to GAP and MLGAP problems (Land and Powell,
1979, Ross and Soland, 1975, Lawler and Wood, 1966). However when it came to solving the problems
using XPRESS -MP, it was found that Dash Optimisation had updated the software from Version
10 to
Version 12. Version 10 did not include any presolve or cutting strategies thus, prior to commencing this
project, the B&B algorithm was the only efficient algorithm used for finding IFSs to IP problems. Version
11 introduced the presolve and cutti ng strategy which automatically adds cuts to the problem before the
B&B algorithm commences. Version 12 was improved by adding second generation cutting planes and a
branch and cut algorithm. The primal and dual simplex algorithms were also improved in Version 12, which
Dash Optimisation claim ‘ are both nearly twice as fast on average
’. Therefore instead of investigating
different B&B algorithms as originally planned it was decided to investigate the effect of using the branch
and cut, and presolve capabilities.
6-39
2
2
2
2
5
Q
5
-
Q
-
@
0
5
P
@
-
0
5
.
P
@
-
C
+
R
.
<
@
<
<
R
<
C
+
O
N
'
&
%
$
#
"
!
O
N
'
&
%
$
#
"
!
4
4
4
;
4
;
;
;
T
Q
T
T
T
T
0
T
5
Q
0
5
.
<
?
/
/
.
<
C
?
C
O
O
S
S
A
A
2
E
2
E
5
=
.
=
5
.
.
.
.
.
-
-
+
+
K
K
4
4
4
4
An aim of this project was to investigate the effect of different algorithmic choices, available in a standard
general purpose solver, on some classes of assignment problems. Chapter 5 defined general models for GAP
and MLGAP problems, two NP
-hard combinatorial optimisation problems. Chapter 6 explained the
optimiser capabilities in XPRESS -MP, Version 12, that are used for solving IPs. Now all that is required is
suitable GAP and MLGAP data with which to test the capabilities of XPRESS-MP.
7.1
Test Data for the GAP
Firstly the small 3*3 problem, used in Chapter 6, Appendix I, was created so that a problem could be
manually solved to check that the model was working correctly. ‘ There is still a lack of a representative set
of test problems on which competing enumeration algorithms can be compared
’, (Cattrysse and
Wassenhove, 1990). Unfortunately only one group of test data was found and time did not permit the
creation of more GAP problem instan ces. These sets are used in the journal by Chu and Beasley (1996) and
can be found on Beasley’s web site. Eight sets of data from the small problems were chosen. Half the sets
were chosen at random by the random number generator on a Casio calculator. The other half were sets that
took Chu and Beasley (1996) more than one attempt to obtain the optimal solution. These problem sets
range in size from 5 agents with 15 jobs to 10 agents with 60 jobs. Six other problems were taken from sets
A, B, C, which are considered to be ‘ large-sized problems’, (Chu and Beasley, 1996). These range in size
from 5 to 20 agents with 100 to 200 jobs. These problem are ‘
distributions for costs and resources, such that individual coeffi
generated with independently uniform
cients for costs and resources are not
correlated. This leads to relatively easy problems where binary variables with small costs and small
resources coefficients tend to equal 1, while binary variables with large costs and large resources tend to be
equal to 0’, (Osorio and Laguna, 1999). There is another large problem data set, D, that is considered to be
much harder to solve because the individual costs and resources coefficients are inversely correlated.
However, due to a limited disk space, XPRESS -MP kept abandoning the search prematurely for some of the
large problems. As D is a harder problem, XPRESS -MP would definitely need disk space in excess of what
was available in order to optimally solve these problems. Therefore it was decided to concentra te on the A,
B, C problems as it will be fairer to evaluate results of problems where the optimal solution is found by all
the algorithmic choices used, rather than just some of them.
7-40
The data was copied from the internet into a text editor on a Linux mach
ine and saved as a .dat file. The
formatting of all the files had to be changed i.e. paragraphs had to be removed and commas added, so that
XPRESS-MP could interpret the data correctly.
7.2
Test data for the MLGAP
There was one small set of data in the journa
l by French and Wilson, (2001). This problem was small
enough to check that the MLGAP general model produced in Chapter 5 worked correctly. Other journals
found conducting tests tended to randomly generate their own problem data. The only other set of t est data
that could be found for the MLGAP was that by Laguna et al (1992). This was already in MPS format and
so the general MLGAP model was not required. It was not thought sufficient to evaluate XPRESS
-MP’s
algorithms using only one large problem inst ance of MLGAP. Therefore it was decided to create some
MLGAP test data. This was done by taking several same sized sets from Beasley’s GAP data and
amalgamating them together. Each of the GAP problems represents a different efficiency level in the
MLGAP. Appendix M shows how the MLGAP data was formed from the GAP data. Five MLGAP
problems were created for a range of sizes. At first the agent capacities were taken from the most restricting
capacities of the GAP problems. This was sufficient and provid ed optimal solutions different to any of their
inherent GAP problems. Other capacities were calculated for MLGAP data sets. For example 2/3 and 1/2 of
the total resources required by jobs was calculated, and also arbitrary tight capacity restrictions wer e made.
Unfortunately due to the lengthy calculations involved, there was not enough time to find accurately tight
capacity restrictions.
7.3
Controls used for the different algorithms
By default, XPRESS -MP solves an IP by presolving the matrix and adding cu tting planes before going into
the B&B algorithm. It was decided to see how these two methods effected solving GAPs and MLGAPs
compared to the traditional default B&B approach.
The controls that will be used in the XPRESS
-MP optimiser are those controllin g presolve and cutting
strategies.
IFPRES= 0
no pre-processing done
IFPRES= 1
pre-process (DEFAULT)
IFPRES= 2
pre-process but do not remove the redundant bounds
CUTSTRAT = -1
the cut strategy is selected automatically (DEFAULT)
CUTSTRAT = 0
no cuts are generated
CUTSTRAT = 1, 2
conservative, aggressive cutting strategy
7-41
7.4
Results
Firstly all the test data was solved using XPRESS -MP’s default algorithms. Maxim or minim automatically
presolves the problem to find the LP relaxation optimal value.
After the GLOBAL command, the cutting
algorithm will solve the LP, add and remove cuts and then resolve the LP for a maximum of 22 iterations.
XPRESS-MP will then proceed with B&B.
These tests were compared with problems that were first solved by droppi
ng the integrality constraints to
obtain the optimal value of the LP -relaxation and further solved using the default B&B algorithm. For these
problems the optimiser controls, IFPRES and CUTSTRAT, were set to 0.
The data was originally provided in sets l
abelled from gap1 -gap12 and each set provided 5 sets of data
problems. These data sets have been labelled similarly so that the original data is identifiable. For example
Beasley’s gap6 data and problem number 5 is called gap6.5. The gap problems from 1 -12 are maximisation
problems, whilst the gap problems A-C and MLGAP problems are minimisation problems.
These problems were optimised using XPRESS -MP Version 12 on the Sun OS SPARC workstation at the
University of Leeds, with an allocated disk space of 30
MB. As time is only a relative indication of
performance, comparisons can not be made against the best solution times found by Chu and Beasley (1996)
as different computer software and platforms were used. For this project, the times taken to solve the
problems will be compared internally. For comparisons to other research conducted in this area, it will be
more useful to analyse the amount of work that needs to be done by the solver. Therefore it is important to
consider how many nodes the B&B algorit hm needs to search before it finds the optimal IP solution and
terminates.
All of the tests were conducted twice and an average of the results were noted. It took a lot longer than
originally planned to run these tests. This was because there was a limit ed amount of disk space and if you
attempted to solve two big problems at the same time, the solver would abort before finding the optimal IP.
Therefore all the test runs had to be conducted one by one, and this took quite a long time.
7-42
The important results found are summarised as follows:
Data Set
Agents
gap1.1
gap2.1
gap6.1
gap6.5
gap8.1
gap9.1
gap12.1
gap12.4
gapA.1
gapA.4
gapA.6
gapB.1
gapB.4
gapB.6
gapC.4
5
5
8
8
8
10
10
10
5
10
20
5
10
20
10
Number of
Tasks
Variables
15
20
32
32
48
30
60
60
100
200
200
100
200
200
200
75
100
256
256
384
300
600
600
500
2000
4000
500
2000
4000
2000
Constraints
Value of LP
relaxation
presolve
21
26
41
41
57
41
71
71
106
211
221
106
211
221
211
343.59
444.03
768.23
754.31
1138.51
718.11
1454.07
1450.06
1697.73
2623
2337.33
1831.33
2815.05
2331.14
2795.41
56
91
163
181
278
184
412
391
269
840
1196
304
1159
1804
1105
Iterations
Without presolve
65
78
188
201
317
182
395
409
252
791
1357
280
-1613
-Table 7.1
Data Set
Agents
Tasks
mgap2
mgap7
mgap7.2
mgapABC
mgapABC2
5
8
8
5
10
20
40
40
100
200
Number of
Levels
Variables
3
3
4
3
3
300
960
1280
1500
6000
Constraints
Value of LP
Relaxation
26
49
49
106
211
223.25
604.997
601
1201.4
2163.227
Iterations
presolve Without
presolve
106
128
305
364
357
378
429
433
1309
1435
Table 7.2
A few observations can be made from these results in Tables 7.1 and 7.2. Looking at the output after
presolving the problem showed that all the matrixes are the same as before minus one constraint. The
reference manual states that the one constraint dropped is the integrality constraint, which is changed to a
non-negative variable instead, i.e. X ij ≥ 0. However, the output never displayed the message ‘LP relaxation
tightened’. Therefore presolving the matrix did not alter the problem and all the LP relaxation objective
values were the same regardless of whether presolve was used. It was however noticed that the number of
iterations taken to find the optimal value of the LP
-relaxation was different if p resolve is used. For the
MLGAP problems all of the LP relaxations were found in slightly fewer iterations when the matrix was
presolved first. However no pattern could be seen with the GAP problems. Half the time presolve found the
LP relaxation in fewe r iterations and other times it took longer. However the number of iterations taken to
find the optimal LP relaxation value were relatively close to each other. Experiments were conducted with
presolve off and the cutting strategy on (IFPRES=0, CUTSTRAT=
-1) and all the results found were the
same as solving the problem with both the strategies on. Therefore it can be concluded that presolving GAP
and MLGAP problems does nothing to help find the optimal IP solution.
7-43
Data Set
gap1.1
gap2.1
gap6.1
gap6.5
gap8.1
gap9.1
gap12.1
gap12.4
gapA.1
gapA.4
gapA.6
gapB.1
gapB.4
gapB.6
gapC.4
Number of
cuts added
12
16
27
30
30
37
36
28
1
1
13
18
38
63
38
Objective value
after adding cuts
336.44
435.71
762.24
748.00
1135.23
710.71
1451.23
1447.61
1698
2623
2339
1837.17
2821.90
2338.43
2801.31
Number of nodes searched
to find the optimal solution
With cuts
Without cuts
added
added
21
638
36
2775
402
64230
102
43514
18725
301907*
146
799000*
102
189582*
1283
84831
1
11
1
7
1
2973
15309
54360
38800*
-160
26900*
*
52200
--
Time taken to find the
optimal solution
With cuts
Without cuts
added
added
0
1
0
9
5
617
2
338
337
8508
3
962
6
4184
37
1252
0
0
0
0
1
105
253
757
4987
-58
2066
6258
-Table 7.3
*
indicates that XPRESS -MP ran out of disk space a nd the optimal integer solution was therefore not found.
If this happened on problems using the presolve and cut strategies, then the problem was not re
-tested
without the presolve and cut strategies.
Data Set
mgap2
mgap7
mgap7.2
mgapABC
mgapABC2
Number of
cuts added
15
32
34
4
35
Objective value
after adding cuts
227.54
607
601.25
1202
2164
Number of nodes searched
to find the optimal solution
With cuts
Without cuts
added
added
51
851
1
73192
589
56226
1
53
1
7285
Time taken to find the
optimal solution
With cuts Without cuts
added
added
1
5
1
1175
22
522
0
1
43
461
Table 7.4
Generally it can be seen that the number of variables in the problem impacts the time taken to solve the
problem. On average, as the number of variables increase, so does the number of nodes searched in the B&B
algorithm which subsequently increases the time taken to solve the problem. More precisely it was noticed
how problems with larger ratios of agents to jobs, for example gap8.1, gap12.1, gap12.4, and gapB.4, were
consequently harder to solve as the B&B algorithm had to search more possible solutions.
It can be deduced from these results that the number of nodes searched and time taken to solve problems
where cuts have been added is drastically less than when the pro blem is solved without the cuts added. It is
known that cuts provide an initial bound closer to the optimal integer feasible solution. This causes all of the
problems to search through less nodes in the B&B search when the cutting algorithm is used. On
average,
the number of nodes increases by at least 90% when the cutting algorithm is not used. This is quite an
7-44
increase which in turn increases the time taken to solve problems by at least 60%. It can therefore be
concluded that generating cuts in the m atrix before the B&B search dramatically improves the performance
of solving GAPs and MGAPs.
It can be observed that the number of cuts added to the problem generally increases with the size of the
problem. For every problem tested, the actual number of cut elements in the matrix increased as the number
of variables in the problem increased. Therefore as the problem grows in size, the cutting algorithm will also
increase the number of cuts added to the problem. All the cuts added were shown to bring the optimal value
of the LP relaxation closer to the integer solution thus reducing the integrality gap of the problem. As
mentioned in Chapter 6 the smaller the integrality gap of the problem, the easier the problem is to solve. The
integrality gaps of the problems are shown in table 7.5.
Data Set
Objective value
after adding cuts
Objective value of
LP relaxation
Optimal
integer value
gap1.1
gap2.1
gap6.1
gap6.5
gap8.1
gap9.1
gap12.1
gap12.4
gapA.1
gapA.4
gapA.6
gapB.1
gapB.4
gapB.6
gapC.4
mgap2
mgap7
mgap7.2
MgapABC
MgapABC2
336.44
435.71
762.24
748.00
1135.23
710.71
1451.23
1447.61
1698
2623
2339
1837.17
2821.90
2338.43
2801.31
227.54
607
601.25
1202
2164
343.59
444.03
768.23
754.31
1138.51
718.11
1454.07
1450.06
1697.73
2623
2337.33
1831.33
2815.05
2331.14
2795.41
223.25
604.997
601
1201.4
2163.227
336
434
761
747
1133
709
1451
1447
1698
2623
2339
1843
2831
2339
2814
228
607
602
1202
2164
% Integrality
gap of LP
relaxation
after cuts
0.13%
0.40%
0.16%
0.13%
0.20%
0.24%
0.16%
0.042%
0%
0%
0%
0.32%
0.32%
0.02%
0.45%
0.20%
0%
0.12%
0%
0%
% Integrality
gap of LP
relaxation
2.29%
2.31%
0.95%
0.98%
0.49%
1.29%
0.21%
0.21%
0.016%
0%
0.07%
0.63%
0.56%
0.34%
0.66%
2.08%
0.33%
0.17%
0.05%
0.036%
Table 7.5
It is noticed from table 7.3, 7.4 and 7.5 that where there is a significant difference between the two integrality
gaps, then the cutting algorithm is guaranteed to find an IFS quicker by searching less nodes than it would do
without the cuts.
It was noticed in the results that solving the pr oblem without the cutting algorithm produces more integer
feasible solutions. This is because the B&B algorithm is less restricted and searches more possible solutions.
This may be useful when it is not possible to find the optimal solution, for example
when the problem runs
out of disk space. Some real world problems will be satisfied with ‘good’ feasible solutions if the time and
cost of finding an optimal solution far outweighs the advantages. Therefore in some situations it may be
7-45
better not to use the cutting strategy if a ‘good’ feasible solution will do just as well, as more IFSs will be
found.
These two algorithmic choices were also used on the test data provided by Laguna et al (1992). None of the
journals that solve this problem have reported
an optimal integer value, (Laguna et al, 1992, French and
Wilson, 2001, Osorio and Laguna, 1999). French and Wilson (2001) describe this problem as ‘
a difficult
real-world problem ’, which certainly proved very difficult for XPRESS -MP to solve. The follow ing is a
summary of the results for this problem.
Number of: agents = 7, jobs = 30,
variables = 338,
Objective
value of LP
relaxation
number
of cuts
added
683692.8831
26
levels = 3
constraints = 37
Number of nodes
searched to find the
best solution
with cuts
Without
added
cuts added
68200*
212200*
Number of active
nodes left to
search
without
with
cuts
cuts
added
added
20106
29042
Time taken to
find the optimal
solution
with cuts without
added
cuts
added
1236
7562
This minimisation problem was solved several times and the best IFS found when using the presolve and
cutting algorithms was 686,463. This has an integrality gap of 0.4%, which is quite small. Even after the
algorithm had searched 144,900 nodes, 686,463 rem ained the best IFS that XPRESS -MP could find when it
used the default settings of presolving and adding cuts. The best IFS found when XPRESS -MP did not use
presolve or add cuts to the problem was 686,155. Therefore XPRESS -MP finds a better solution when the
presolve and cutting strategies are not used. However this solution of 686,155 is only 0.0005% better and
took 84% longer to find than the solution of 686,463. As previously mentioned, it is often the case in real
world situations that a ‘good’ feasi ble solution acceptable if the computational costs are much higher to find
the optimal solution, (Kallrath and Wilson, 1997). Therefore it can be concluded that it is not worth the extra
time it takes to find this nominally better solution.
The best sol ution for this problem that Laguna et al (1992) could find was 691,634 in 120.07 CPU seconds
on a DEC station 5000/120. They were unable to obtain any optimal feasible integer solution using CPLEX,
a standard commercial integer programming software, despi te running the problem for more than 50 hours.
The best solution that French and Wilson (2001), could find was 686,839 after searching 28,112 nodes.
They reported to find no better solution after examining 250,000 nodes. They did find optimal values of
714,608 and 703,912 but commented that ‘ the solutions obtained were not as good as that obtained by
Laguna et al ’, (French and Wilson, 2001). Osorio and Laguna, (1999) found a solution of 690,624 by
searching 1,990,161 nodes in 36 hours. They claim that this value has an optimality tolerance of 0.01.
7-46
Thus the solution of 686,463 found using XPRESS -MP’s default strategies is better than any others found to
date. It is better than Osorio and Laguna (1999) results, which suggest that the solution found by XPRESSMP has an optimality tolerance of less than 0.01. It can be concluded from this problem instance that
presolving and adding cutting planes finds a better IFS, in a reasonable amount of time, for a large real-world
problem. Therefore a general pur pose solver has solved a large difficult problem, better than any other
general or specific algorithms used to date.
An overall conclusion from all the results is that presolving and generating cutting planes in addition to using
B&B techniques to solve GA P and MLGAP problems is more efficient than solving IP’s using the B&B
algorithm alone. In all the problems examined the optimal solution is produced in a substantially better time
by the default algorithms of XPRESS-MP . As previously noted, presolving the GAP and MLGAP problems
does not tighten the LP relaxation therefore suggesting that the improved solution time is mainly due to the
cutting planes algorithm.
The default algorithms used by XPRESS-MP have shown that they greatly reduce the trade off between time
spent and finding the optimal solution. It can be concluded that XPRESS
-MP is more computationally
efficient in finding the optimal solution to IP problems than commercial integer programming packages that
only utilise B&B algorithms.
7.5
Suggestions for improvement
Several useful functions of XPRESS-MP were noticed during the testing stages of this project. Firstly it was
noticed that ‘ increasing NRXTRA and NMXTRA before input may improve the best bound ’ was printed on
the output after the cuts
had been generated. The reference manual was very vague about what these
commands do, but the support offered by Dash Optimisation was extremely helpful, (Appendix L).
NRXTRA and NMXTRA define the number of spare rows and columns in the matrix that are u sed to hold
the cuts generated by the cut manager. It is thought that improving the number of spare rows will improve
the solution to the LP -relaxation, thus improving the best bound and reducing the integrality gap of the
problem. By default XPRESS-MP automatically assigns these two commands appropriate values. However
these can be overridden in order to provide more space for generating cuts. However care must be taken not
increase NRXTRA and NMXTRA too much otherwise the generation of extra cuts may actually slow down
the optimisation of the IP problem. Several trial experiments were conducted on the small gap problems
using methods that Dash Optimisation support suggested for changing the NRXTRA and NMXTRA
controls. The majority of the time increas ing these controls increased the number of cuts found and reduced
the number of nodes searched. However it was unfortunate that there was not enough time to find an
effective way of using these controls. Therefore using the suggestions from the Dash Opti misation support,
shown in Appendix L, could improve the default settings that XPRESS -MP uses to solve GAP and MLGAP
problems.
7-47
Another improvement that can be made to the algorithmic choices used by XPRESS-MP in solving GAP and
MLGAP problems is by assigning a percentage cut off value from the optimal LP-relaxation solution. If it is
accepted that the optimal value of the IP problem can be within a certain limit from the LP relaxation, then
XPRESS-MP is able to reduce the search for the optimal IP value by fathoming more nodes. Therefore if a
‘good’ solution is adequate then it is possible to specify how near to the optimal LP -relaxation this value has
to be. This is useful for larger sized problems where the optimal solution may take too long too find.
For
example, adding percentage cuts was tested on the Laguna et al (1992). Setting the percentage cut -off at 1%
resulted in the same optimal solution being found but in a shorter space of time and from searching through
less nodes.
Another improvement would be to create your own test data, for MLGAP problems. Based on the structure
created for this project, mathematical formulas could be used to create tight capacity restrictions to make the
MLGAPs even harder to solve. Data could also be created based on a fact mentioned by Laguna et al (1992)
that ‘in real –world problems, the relationship between cost and resource utilisation for any agent-level-task
assignment is such that if a
ijk’
< a ijk’’ then c ijk’ > c ijk’’’. A few ideas were implemented in this p roject, but
unfortunately time did not permit any conclusive measures.
7-48
0
0
0
5
0
5
<
.
@
<
-
@
.
-
<
<
U
'
&
%
$
#
"
!
U
'
&
%
$
#
"
!
K
K
F
F
GAP and MLGAP are assignment problems often seen embedded in various real
example, scheduling activities, determining optimal districting of services.
-world problems for
Unfortunately the structure of
these problems results in difficult combinatorial optimisation problems. Numerous special purpose
algorithms have been created for solving these problems, but it is not always economically justified for a
company to solve a problem using specialised techniques. If a problem model is to closely represent a real
world situation, it may be subject to changes as few real -world problems are straightforward and clear -cut.
Therefore it is more attractive to have a general purpose package that has flexible capabilities to model and
solve these varying problems. Research to date considers large sized GAP and MLGAP problems difficult to
solve using general purpose algorithms found in commercial optimisation packages.
The first conclu sion that can be made is that XPRESS -MP is a good mathematical optimisation package for
producing general models to integer programming problems. Its high level syntactical structure makes it
easier than using a general purpose programming language, like
C++, to programme IP problems. As the
GAP and MLGAP are more frequently found embedded in other problems, the general models created in this
project would provide a good base template for more exacting problem instances.
XPRESS-MP has extensive optimisati on capabilities for solving mathematically based problems. From the
tests conducted, XPRESS -MP proved to have a very powerful optimisation solver. XPRESS
carefully selected default settings which prove to be very effective. XPRESS
-MP has
-MP’s presolve a nd cutting
planes algorithm combined with the B&B algorithm found solutions better than just using the B&B
algorithm on its own. Users can also ‘fine tune’ the default settings to further improve the performance of
finding a solution. Thus it is conclude d that a commercial integer programming package, such as XPRESS MP, is very useful for solving NP -hard combinatorial optimisations problems like the GAP and MLGAP. It
guarantees you optimal IP solutions of small problems and ‘good’ IP solutions to large s ized problems in a
reasonable amount of time.
8-49
Y
W
&
'
W
&
&
X
'
&
&
Y
X
&
Z
&
Z
&
V
V
Beasley, J.E, URL:http://www.ms.ic.ac.uk/jeb/jeb.html [30th April 2001]
Bertolazzi, Paola, & Bianco, Lucio, & Ricciardelli, Salvatore (1977), A Method for Determining the Optimal
Districting in Urba n Emergency Services, Computers and Operations Research , Pergamon, Vol. 4, pp 1 12, 1977
Bovet, J, (1982), Simple Heuristic for the School Assignment Problem, Journal of Operational Research
Society, Printed in Great Britain, Vol. 33, pp 695-703, 1982
Burkard, Rainer E, (1979),
Travelling Salesman and Assignment Problems
, Annals of Discrete
Mathematics, North-Holland Publishing Company, Vol 4, (1979) pp 193-215
Campbell, James F, & Langevin, André, (1995), The Snow Disposal Assignment Problem , Journal of t he
Operational Research Society, Vol. 46, pp919-929, 1995
Cattrysse, Dirk G, & Wassenhove, Luk N. Van, (1990),
A Survey of algorithms for the Generalised
Assignment Problem, European Journal of Operational Research, Elsevier, North Holland, Vol.60 (1992)
pp 260-272
Chevátal, Vasek, (1983), Linear Programming, Freeman and Company
Chu, P.C, & Beasley, J.E., (1996), A genetic algorithm for the Generalised Assignment Problem, Computers
and Operations Research, Pergamon, Vol.24, No. 1, pp 17-23, 1997
Cook, Willi am J, & Cunningham, William H, & Pulleyblank, William R. & Schrijver, Alexander, (1998)
Combinatorial Optimization, John Wiley & Sons
Dash Optimization, XPRESS-MP Version 11 Reference Manual,
URL: http://www.dash.co.uk/support_manuals.html [31st March 2001]
Dash Optimization, XPRESS-MP Version 12 supplement,
URL: http://www.dash.co.uk/support_manuals.html [31st March 2001]
Ferland, Jaques A, & Roy, Serge, (1983), Timetabling Problem for University as Assignment of Activities to
Resources, Computers and Operations Research, Pergamon, Vol 12, No. 2, pp 207-218, 1985
French, Alan P, & Wilson, John M, (2001),
Heuristic Solution Methods for the Multi -Level Generalised
Assignment Problem, to appear in the Journal of Heuristics in 2001
50
Frieze, A.M, & Yadegar, J, (1981), An Algorithm for Solving the 3 -Dimensional Assignment Problem with
Application to Scheduling a Teaching Practice, Journal of Operational Research Society, Printed in Great
Britain, Vol. 32, pp 989-995, 1981
Greenberg, Harvey J, Waterloo University, Canada,
URL: http://orion.math.uwaterloo.ca/~hwolkowi/mirror.d/glossary/Index.html [10th April 2001]
Hannan, Edward, & McKeown, Patrick, (1979),
Matching Swimmers to Events in a Championship Meet ,
Computer and Operations Research, Pergamon, Vol 6, pp 225-231, 1979
Ignizio, James P., (1982), Linear Programming in single and multiple objective systems
, Prentice-Hall
International, Inc., New Jersey, USA
Jörnsten, K, & Näsberg, M., (1986),
A New Langrangian Rel axation Approach To The Generalized
Assignment Problem , European Journal Of Operational Research , Elsevier,North Holland Vol. 27, pp
313-323, 1986
Kallrath, Josef & Wilson, John M., (1997),
Business Optimisation using Mathematical Programming
,
Macmillan Press Ltd.
Klastorin, T.D, (1979), On The Maximal Covering Location Problem And The Generalized Assignment
Problem, Management Science, printed in the USA, Vol. 25, No. 1
Laguna, M, & Kelly, J.P, & Gonzalez -Verlarde, J.L, & Glover, F, (1992), Tabu Search For The Multilevel
Generalized Assignment Problem , European Journal Of Operational Research , Elsevier, North-Holland,
Vol. 82, pp 176-189, 1995
Lenstra, J.K, & Rinnooy Kan, A.H.G, (1979), Computational complexity of discrete optimization problems,
Annals of Discrete Mathematics, North Holland Publishing Company, Vol. 4 pp 121-140
Loomba, Paul N., (1964), Linear Programming, Mcgraw-Hill
Machol, Robert E. (1961), An Application of the Assignment Problem, Operations Research, ORSA, Vol. 9,
1961
Machol, Robert E. (1969), An Application of the Assignment Problem , Operations Research, ORSA, Vol.
18, No. 4, 1969
Martello, Silvano & Toth, Paolo, (1987), Linear Assignment Problems , Annals of Discrete Mathematics ,
North Holland Publishing Company, Vol. 31 pp 259-282
51
National Institute of Standards and Technology, URL:
http://hissa.nist.gov/dads/terms.html, [14 th April
2001]
Nemhauser, George L. & Wolsey, Laurence A., (1988), Integer and Combinatorial Optimization, Wiley
Nowakovski, Jörg, & Schwärzler, Werner, & T riesch, Eberhard, (1996), Using the generalized assignment
problem in scheduling the ROSAT space telescope , European Journal of Operational Research, Vol 112,
pp531-541, 1999
Optimization Technology Centre, Northwestern University
URL: http://www-unix.mcs.acl.gov/otc/Guide/faq/linear-programming-faq.html [30th April 2001]
Osorio, Maria A, & Laguna, Manuel, (1999), Logic Cuts for Multi-Level Generalized Assignment Problems,
submitted to European Journal of Operational Research in 1999
Papadimitrious, C.H, & Steiglitz, K, (1982),
Combinatorial Optimization; Algorithms and Complexity
,
Prentice-Hall
Parker A.W, & Parker, M.E, & Proll, L.G, (1989), Constructing Timetables For Parent-Teacher Interviews –
A Practical Scheduling Problem, Proceedings of CO89
Pierskalla, W. P, (1967), The Multidimensional Assignment Problem, Operations Research, ORSA, Vol 16,
No. 2, pp 422-431, 1968
Ragsdale, Cliff T, & Shapiro, Gerald W, (1995),
Incumbent Solutions in Branch -and-Bound Algorithms:
setting the record st raight, Computers and Operations Research , Pergamon, Vol 23, No.5, pp 419 -424,
1996
Ross, G.T, & Soland R.M, (1973)
A Branch And Bound Algorithm For The Generalized Assignment
Problem, Mathematical Programming, North-Holland Publishing Company, Vol. 8, 1975
Ross, G.T, & Soland, Richard M, (1977) Modelling Facility Location Problems As Generalized Assignment
Problems, Management Science, printed in the USA, Vol. 24, No. 3
Salkin, Harvey M, (1975), Integer Programming, Addison-Wesley
Schrijver, Alexander, (1998), Theory of linear and integer programming, Wiley, UK
Shapiro, Jeremy F, (1979), Mathematical Programming, Structures and Algorithms, John Wiley and Sons
Taha, Hamdy A, (1975), Integer Programming Theory, Application and Computations, Academic Press
52
University of Karlsruhe, Integer Programming (Commercial), URL:
http://www.wior.uni-
karlsruhe.de/Bibliothek/Software_for_OR/Integer_Programming/com/aacom.html [31st March 2001]
Williams, H.P, (1995), Model Building in Mathematical Programming, Wiley, UK
Wren, Anthony, (1971), Bus Scheduling: An Interactive Computer Method , Transportation Planning and
Technology, Gordon and Breach Science Publishers Ltd., Vol 1, pp 115-122, 1972
X-Ray Astronomy, URL: http://wave.xray.mpe.mpg.de/roast [14th April 2001]
'
'
$
^
`
#
]
^
_
$
]
\
a
`
#
\
"
a
_
"
[
\
\
[
Christofides, Nicos, & Mingozzi, Aristide, & Toth, Paola, & Sandi, Claudio, (1979), Combinatorial
Optimization, Wiley
International Abstracts in Operations Research, Vol. 1 – Vol. 51
Land, A, & Powell, S, (1979), Computer Codes for Problems of Integer Programming, Annals of Discrete
Mathematics, North-Holland Publishing Company, Vol 5, pp 221-269
Lawler, E.L, & Wood, D.E, (1966), Branch-and-Bound Methods: A Survey, Operations Research, ORSA,
Vol. 14, pp 699-719, 1966
Riley, V, & Gass S.I, (1958),
Linear Programming and Associated Techniques; A Comprehensive
Bibliography on Linear, Nonlinear, and Dynamic Programming, Operations Research Office
Ross, G.T, & Soland R.M, (1973), A Branch and Bound Algorithm for the Generalised Assignment Problem,
Mathematical Programming, North-Holland Publishing Company, Vol 8, pp 91-103, 1975
Turban, Efraim, & Meredith, Jack R, Fundamentals of Management Science, Irwin, 6th Edition
Web of Science Database, Science Direct, INSPEC, IEEE Electronic library and IEEE Xplore databases
53
h
g
f
e
d
c
b
c
c
h
g
f
e
d
c
b
b
b
My personal objectives of this project were to learn how to research a practical academic problem and apply
the knowledge gained. As I have always enjoyed the mathematical side of computer science, I decided to
concentrate on Operations Res earch, an area involving mathematics, computer science and management.
However I have found it a big disadvantage that I have only done one mathematics module since A -Levels.
The first part of the project involved background research on assignment proble ms and B&B algorithms. It
originally took me an enormous amount of time to read through the journals found, as I had initial problems
with the mathematical symbols and understanding how the mathematical models represented the problem. It
was also unfortunate that it was only noticed once the testing had begun in the second semester, that many of
the journals I read about B&B techniques were no longer relevant to this project.
This project relates to several computer studies modules, namely PS21 and PS31 . Unfortunately I did not
take PS31 until the second semester, the same time as I was conducting my tests with XPRESS -MP. As the
semester continued I realised that I was understanding a great deal more of the background research due to
knowledge gained from PS31. Knowing that this module was going to be very useful to me, I should have
obtained an exact course outline at the beginning of the year from which to teach myself the relevant
information. Once I had completed PS31, I found all the journals I h ad read in the first semester were much
clearer as I now understood the underlying theory better. Therefore it was unfortunate that I was unable to
write my background research as I was conducting my testing (as I originally planned) as I did not fully
understand how all the problems and the theory linked together.
Testing the problems took a great deal more time than it was originally thought which meant that all the
testing was not finished until the end of semester two. I often found myself experimen
ting with different
functions in XPRESS-MP which consequently left me less time to analyse my results. I should have done all
my testing first, evaluated the results and then experimented with alternative optimisation algorithms.
Therefore I have learnt that time management is very important in conducting a project of this size. I also
underestimated the time it takes, after writing the report, to finalise all the little things for example cross
references and appendices. I have learnt that breaking th e problem down into much smaller milestones than
the milestones mentioned in my mid -term project report would have been more helpful. The building and
testing of the models should have been broken down into more exacting steps. The original milestones fo r
the project were continuously altered to account for the additional time that was required for solving the
problems.
I am very happy with the results I found and feel assured that they will be useful for future research
conducted in this area. More ex
acting models could be built on top of mine and with fine tuning to
optimisation, it will be relatively straightforward to obtain a good solution to a specific instance of an
assignment problem.
54
i
h
g
f
e
d
c
b
c
c
i
h
g
f
e
d
c
b
Examples were linear programming techniques are used:
Optimal package designs, (Domtar Packaging, Ltd.)
Aircraft operations (Air France, Air Canada)
Nuclear fuel optimisation (Ontario Hydo)
APPLICATION
DECISIONS
OBJECTIVE
EXAMPLES OF CONSTRAINTS
Production planning
How much to
Maximize total
For each scarce resource, the total
produce of
profit
amount consumed during production of
each product.
all products cannot exceed the
resource’s availability
Investment Planning
How much to
Maximise
a) In each month, the total amount
invest each
annual return
invested in all stocks and bonds cannot
month in each
on investment
exceed the month’s cash availability.
stock or bond.
b) In each month, no more than say,
30% of the portfolio can be invested in
a specified set of “risky” stocks. (This
may be a government-imposed or a selfimposed restriction).
Product Distribution
How much
Minimize total
a) For each plant, the total shipments
each plant
transportation
from the plant to all customers cannot
should ship to
costs
exceed the plant’s capacity.
each customer.
b) For each customer, the total
shipments to the customer from all
plants must equal or exceed the
customer’s demand.
Personnel Planning
How many
Minimize total
For each one-hour period in the
employees to
payroll costs
workweek, the total number of
assign to each
employees assigned to all work shifts
work shift.
spanning the hour must equal or exceed
the hour’s requirement.
55
q
p
o
n
m
l
k
j
k
k
q
p
o
n
m
l
k
j
MODEL
ASSIGNMENT PROBLEM
LET
m = 5
n = 5
!number of agents
!number of jobs
VARIABLES
X(m,n)
!Xij is 1 if agent i does job j or 0 otherwise
TABLES
tabl(m,n)
DATA
tabl(1,1)
tabl(2,1)
tabl(3,1)
tabl(4,1)
tabl(5,1)
!table of size m*n to represent the cost of doing
job j by agent i
=
=
=
=
=
18, 11, 18, 14, 17
27, 18, 14, 21, 16
11, 16, 17, 11, 12
4, 32, 6, 19, 10
25, 11, 12, 12, 15
!cost of doing job j by agent i
CONSTRAINTS
COST:sum(i=1:n,j=1:m) tabl(i,j) * X(i,j) $
!objective function
AGENT(j=1:m): sum(i=1:n) X(i,j) = 1.0
!each agent only does one
job
JOB(i=1:n): sum(j=1:m) X(i,j) = 1.0
!each job is only done once
by an agent
BOUNDS
X(i=1:n,j=1:m) .BV.
!Xij can only take the
values 0 or 1
GENERATE
!generate the problem
matrix
56
r
p
o
n
m
l
k
j
k
k
r
p
o
n
m
l
k
j
MODEL
ASSIGNMENT PROBLEM
LET
m = 5
n = 5
!number of agents, i
!number of jobs, j
VARIABLES
X(n,m)
!Xij is 1 if agent i does job j or 0 otherwise
TABLES
cost(n,m)
!cost of doing job j by agent i
DISKDATA
cost = apdata.dat
!read in data from external file
CONSTRAINTS
COST:sum(i=1:n,j=1:m) tabl(i,j) * X(i,j) $
!objective function
AGENT(i=1:m): sum(j=1:n) X(i,j) = 1.0
!each agent only does one job
JOB(j=1:n): sum(i=1:m) X(i,j) = 1.0
!each job is only done once by
an agent
BOUNDS
X(i=1:n,j=1:m) .BV.
!Xij can only take the
values 0 or 1
GENERATE
!generate the problem
matrix
57
s
p
o
n
m
l
k
j
k
k
s
p
o
n
m
l
k
j
MODEL
ASSIGNMENT PROBLEM
LET
m = %agents%
n = %jobs%
!number of agents, i
!number of jobs, j
VARIABLES
X(n,m)
!Xij is 1 if agent i does job j or 0 otherwise
TABLES
cost(n,m)
!cost of doing job j by agent i
DISKDATA
cost = %datafile%
!read in data from file
CONSTRAINTS
COST:sum(i=1:n,j=1:m) tabl(i,j) * X(i,j) $
!objective function
AGENT(i=1:m): sum(j=1:n) X(i,j) = 1.0
!each agent only does one job
JOB(j=1:n): sum(i=1:m) X(i,j) = 1.0
!each job is only done once by
an agent
BOUNDS
X(i=1:n,j=1:m) .BV.
!Xij can only take the
values 0 or 1
GENERATE
!generate the problem
matrix
58
t
p
o
n
m
l
k
j
k
k
t
p
o
n
m
l
k
j
MODEL
GAP PROBLEM
LET
m = %agents%
n = %jobs%
!number of agents i
!number of jobs j
VARIABLES
X(m,n)
!Xij is 1 if agent i does job j or 0 otherwise
TABLES
cost(m,n)
resource(m,n)
capacity(m)
DISKDATA
cost = %costin%
resource = %resin%
capacity = %capin%
!cost of agent i doing job j
!resource consumed in allocating job j to agent i
!the amount of resource needed for job i to be completed
by agent j
!read in cost data file
!read in resource data file
!read in capacity data file
CONSTRAINTS
COST: sum(i=1:m,j=1:n) cost(i,j) * X(i,j) $
AGENT(i=1:m): sum(j=1:n) resource(i,j) * X(i,j) < capacity (i) !each agent can
only do a job if
it has enough
resources
JOB(j=1:n): sum(i=1:m) X(i,j) = 1.0
!each job is only
done once by an
agent
BOUNDS
X(i=1:m,j=1:n) .BV.
!Xij can only take the values 0 or 1
GENERATE
!generate the problem matrix
59
u
p
o
n
m
l
k
j
k
k
u
p
o
n
m
l
k
j
MODEL
GAP PROBLEM
LET
m = %agents%
n = %jobs%
!number of agents i
!number of jobs j
VARIABLES
X(m,n)
!Xij is 1 if agent i does job j or 0 otherwise
TABLES
datain(2*m+1,n)
!size of the data table needed to read the file in
DISKDATA
datain = %filein%
!all data is read in from one file
TABLES
cost(m,n)
resource(m,n)
capacity(m)
ASSIGN
FOR (i=1:m,j=1:n):
FOR (i=1:m,j=1:n):
FOR (i=1:m):
!cost of agent i doing job j
!resource consumed in allocating job j to agent i
!the amount of resource needed for job i to be
completed by agent j
cost(i,j) = datain(i,j)
resource(i,j) = datain(m+i,j)
capacity(i) = datain((2*m+1),i)
!assign the data to
the correct table
CONSTRAINTS
COST:sum(i=1:m,j=1:n) cost(i,j) * X(i,j) $
AGENT(i=1:m): sum(j=1:n) resource(i,j) * X(i,j) < capacity (i) !each agent can
only do a job if
it has enough
resources
JOB(j=1:n): sum(i=1:m) X(i,j) = 1.0
!each job is only
done once by an
agent
BOUNDS
X(i=1:m,j=1:n) .BV.
!Xij can only take the values 0 or 1
GENERATE
!generate the problem matrix
60
v
p
o
n
m
l
k
j
k
k
v
p
o
n
m
l
k
j
MODEL
MLGAP PROBLEM
LET
m = %agents%
n = %jobs%
l = %levels%
!number of agents i
!number of jobs j
!number of efficiency levels k
VARIABLES
X(l,m,n)
!Xij is 1 if agent i does job j or 0 otherwise
TABLES
datain((2*l)+1,m,n)
!size of the table required for the data
DISKDATA
datain = %filein%
!all data read in from one file
TABLES
cost(l,m,n)
resource(l,m,n)
capacity(m)
ASSIGN
FOR (k=1:l,i=1:m,j=1:n):
FOR (k=1:l,i=1:m,j=1:n):
FOR (k=1,i=1:m):
!cost of agent i doing job j
!resource consumed in allocating job j to agent i
!the amount of resource needed for job i to be
completed by agent j
cost(k,i,j) = datain(k,i,j)
resource(k,i,j) = datain(k+l,i,j)
capacity(i) = datain(2*l+1,k,i)
CONSTRAINTS
COST:sum(i=1:m,j=1:n,k=1:l) cost(k,i,j) * X(k,i,j) $
!each agent can do as many jobs, on as many levels providing the total resources
needed does not exceed the agents capacity
AGENT(i=1:m): sum(j=1:n,k=1:l) resources(k,i,j) * X(k,i,j) < capacity (i)
JOB(j=1:n): sum(i=1:m,k=1:l)
X(k,i,j) = 1.0
!each job is only done
once by an agent
BOUNDS
X(k=1:l,i=1:m,j=1:n) .BV.
!Xkij can only take the values 0 or 1
GENERATE
!generate the problem matrix
61
w
p
o
n
m
l
k
j
k
k
w
p
o
n
m
l
k
j
Generalised assignment problem created by Rochelle Kaye
Min
6A1J1 +
4A1J2 +
5A1J3 +
5A2J1 +
3A2J2 +
4A2J3 +
2A1J1 +
3A1J2 +
5A1J3
≤
5
[R1]
4A2J1 +
3A2J2 +
6A2J3
≤
6
[R2]
5A3J1 +
2A3J2 +
7A3J3
≤
8
[R3]
A1J1 +
A2J1 +
A3J1
=
1
[R4]
A1J2 +
A2J2 +
A3J2
=
1
[R5]
A1J3 +
A2J3 +
A3J3
=
1
[R6]
3A2J2,
4A2J3,
1A3J1 +
2A3J2 +
1A3J3
S.t.
A1J1, 4A1J2,
5A1J3,
5A2J1,
1A3J1,
2A3J2,
1A3J3
≥
0
Row Bounding
R1
R2
R3
R4
R5
R6
Ui
10
13
14
3
3
3
Li
0
0
0
0
0
0
No changes
Column Bounding
No changes
Minimal cover cuts
R1:
A1J3 +
A1J2
≤
1,
A1J3 +
A1J1
≤
1
R2:
A2J3 +
A2J2
≤
1,
A2J3 +
A2J1
≤
1,
R3:
A3J3 +
A3J2
≤
1,
A3J3 +
A3J1
≤
1
Extended covers
R2:
A2J3 + A2J2 +
A2J1
≤
1
62
A2J2 +
A2J1
≤
1
x
p
o
n
m
l
k
j
k
k
x
p
o
n
m
l
k
j
An example of how Beasley GAP data looks
5
5 15
17 21 22 18 24 15 20 18 19 18 16 22 24 24 16
23 16 21 16 17 16 19 25 18 21 17 15 25 17 24
16 20 16 25 24 16 17 19 19 18 20 16 17 21 24
19 19 22 22 20 16 19 17 21 19 25 23 25 25 25
18 19 15 15 21 25 16 16 23 15 22 17 19 22 24
8 15 14 23 8 16 8 25 9 17 25 15 10 8 24
15 7 23 22 11 11 12 10 17 16 7 16 10 18 22
21 20 6 22 24 10 24 9 21 14 11 14 11 19 16
20 11 8 14 9 5 6 19 19 7 6 6 13 9 18
8 13 13 13 10 20 25 16 16 17 10 10 5 12 23
36 34 38 27 33
5 15
19 23 24 20 20 25 16 21 24 15 17 17 20 20 20
25 24 16 21 19 17 17 19 23 21 21 23 20 15 16
16 21 25 22 24 24 16 17 15 18 15 17 18 24 18
25 24 18 19 15 18 20 22 23 18 16 19 17 15 22
25 19 21 22 20 15 20 19 18 18 17 23 17 25 25
16 12 8 20 18 10 12 8 14 23 19 14 15 15 24
16 18 19 22 13 20 9 7 25 10 20 13 11 15 16
6 20 20 5 14 12 6 15 22 18 13 23 23 18 25
18 23 25 17 25 13 23 23 13 20 20 23 17 19 24
12 17 15 25 22 5 24 19 12 25 23 21 23 19 18
36 37 38 48 44
5 15
22 21 16 17 21 15 17 22 22 25 18 20 24 15 22
23 24 19 15 16 21 15 25 16 21 20 19 16 23 20
21 20 21 25 21 20 21 19 17 16 25 19 15 15 15
17 21 25 25 23 22 20 19 20 25 15 20 21 25 23
15 25 23 19 17 17 25 24 24 17 24 19 18 19 16
23 10 15 13 17 10 13 6 9 21 20 7 9 25 8
17 13 8 23 11 18 7 22 13 5 24 24 15 10 22
22 17 22 23 20 11 17 25 23 9 22 20 15 9 25
5 19 25 16 15 10 18 9 11 20 7 21 15 8 25
22 9 10 23 19 21 17 15 15 17 25 19 10 9 21
32 37 44 35 40
5 15
15 25 20 18 19 21 18 22 24 15 25 17 17 15 22
20 18 25 25 16 24 22 24 17 18 23 25 21 25 24
25 19 18 18 23 18 15 22 23 16 25 22 22 15 16
19 19 23 17 19 19 22 19 23 22 24 22 25 19 16
25 24 17 19 25 19 23 19 25 15 19 21 18 19 22
20 20 18 9 18 5 16 18 13 24 21 23 15 19 9
5 12 18 8 22 19 19 11 7 19 20 17 21 25 5
18 8 8 9 20 20 23 13 15 12 6 12 25 25 23
17 19 24 9 16 22 10 17 12 17 15 21 16 18 6
14 6 20 6 21 5 11 23 20 21 20 18 13 13 21
39 36 37 38 37
5 15
25 25 18 24 20 19 25 24 23 15 18 18 25 15 22
25 18 17 22 21 23 20 23 16 19 15 18 16 23 16
18 16 19 15 15 18 15 20 19 24 22 20 25 16 21
18 21 16 18 17 24 18 23 22 16 17 22 22 18 16
17 18 15 21 23 21 24 23 20 22 19 15 22 22 25
16 20 9 22 17 19 20 22 20 13 6 20 23 19 7
63
12 22 18 18 6 13 17 17 17 14 20 12 17 14 22
5 19 19 14 24 16 7 8 9 22 13 23 24 15 20
20 8 6 9 5 17 23 18 14 12 14 17 15 23 21
6 6 24 24 8 7 5 25 21 18 12 20 20 7 12
40 38 38 35 34
64
y
p
o
n
m
l
k
j
k
k
y
p
o
n
m
l
k
j
Example of an model in MPS format and how it represents an instance of a problem.
Taken from http://www-unix.mcs.acl.gov/otc/Guide/faq/linear-programming-faq.html
NAME
ROWS
N COST
L LIM1
G LIM2
E MYEQN
COLUMNS
XONE
XONE
YTWO
YTWO
ZTHREE
ZTHREE
RHS
RHS1
RHS1
BOUNDS
UP BND1
LO BND1
UP BND1
ENDATA
TESTPROB
COST
LIM2
COST
MYEQN
COST
MYEQN
1
1
4
-1
9
1
LIM1
MYEQN
5
7
XONE
YTWO
YTWO
4
-1
1
LIM1
1
LIM1
1
LIM2
1
LIM2
10
For comparison, here is the same model written out in an equation-oriented format:
Optimize
COST:
XONE + 4 YTWO + 9 ZTHREE
Subject To
LIM1:
XONE + YTWO < = 5
LIM2:
XONE + ZTHREE > = 10
MYEQN:
- YTWO + ZTHREE = 7
Bounds
0 < = XONE < = 4
-1 < = YTWO < = 1
End
65
z
p
o
n
m
l
k
j
k
k
z
p
o
n
m
l
k
j
Email correspondence with Dash Optimisation’s product support
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
From: R M Kaye [mailto:[email protected]]
Sent: 23 March 2001 15:27
To: [email protected]
Subject: Version 12 cutting strategies
Hi, I am working with Xpress MP version 12 to solve Integer programming
problems. I am using the cutting and branching strategies but cannot find
any material explaining
1: the output generated when it generates the cuts
especially what the 'Type' means,
2:the actual cutting strategies that Xpress Mp uses.
Are the cutting strategies further explained somewhere or can
you give me some more information on how they are used.
Thank-you, I look forward to hearing from you soon
Rochelle Kaye
[email protected]
Dear Rochelle
The cut log contains the following information:
Its: the number of iterations (or rounds)
Obj Value: the optimal value of the relaxation after adding the cuts generated
in the current iteration
Type:
K is for cover cuts (and others)
G is for Gomory cuts
Cuts added: the cuts which are added to the matrix
Cuts deleted: the potentially useful cuts which are deleted from the matrix
and added to the cut pool
> 2:the actual cutting strategies that Xpress Mp uses.
I'm not sure what level of detail you'd like here, so I'l give you a general run
down and you can extract what's useful.
A cut is an inequality which is valid for the
relaxation.
So adding cuts to the matrix will cut off the
any integer solutions. This process of adding
then solving the new LP relaxation is denoted
MIP but not for it's LP
LP solution without cutti ng off
one cut or several cuts and
as one iteration or round.
One could execute one round after another until the optimal solution is
integer feasible and thus obtain the optimal MIP solution - but this might take
ages. Instead, after introducing a number of cuts, a branch and bound
algorithm is started. The problem formulation obtained so far forms the so called root node of the branch and bound tree.
Since an LP is solved at each node of the tree, cuts can be generated at a
node as well. The procedure is then called branch and cut. Cuts generated at
a node are naturally added to the matrix before solving the LP relaxation, and
66
these show up in the cut log. Cuts are also taken away. The most usefullooking of these are kept for later use in the cut pool. CUTSTRAT controls
the number of cuts, and other control variables indicate which type they
should be and where they should be computed.(There is some more
information on pages 222 and 226 of the Reference Manual.)
The cut manager uses a number of different types of cuts, the most common
of which are Gomory cuts and cover inequalities, which turn up under 'type' in
the cut log.
If you would like to find out more about these, two good books are:
1: J. Kallrath and J.M. Wilson, Business Optimisation Using Mathematical
Programming, Macmillan 1997
ISBN: 0-333-67623-8
2: L. A. Wolsey, Integer Programming, Wiley 1998, ISBN: 0 -471-28366-5
I hope this information helps.
Best wishes
Alyson Stibbard
______________________
Alyson Stibbard
Dash Optimization
tel: +44 1926 315862
www.dashoptimization.com
Dear Rochelle
>
>
>
>
>
>
>
Hi, My output often says ' Increasing NRXTRA and NMXTRA before input may
improve the best bound' I have tried this and it does work, SOMETIMES!
In the reference manual it says 'it can increase efficiency if
used correctly'.
How do you use it correctly/efficiently?
How does it work ie. how, by increasing the number of extra matrix
elements to allow for, does this improve the best bound?
You have probably noticed that along with the rows occupied by the
elements of your matrix, XPRESS output often mentions the number of
'spare rows'. These exist to hold the cuts generated by the cut manager. By
increasing the number of spare rows with NRXTRA you increase the possible
number of generated cuts. This can improve the solution to the LP relaxation,
thus potentially improving the best bound (the best bound being the best
such solution found so far in the search tree). Naturally, when you increase
the number of spare rows, you also need to increase the number of
elements, with NMXTRA, so that the numbers yo u want stored in those rows
have somewhere to go.
How to arrive at the best choice for NRXTRA and NMXTRA is an interesting
question. Here are four approaches:
1. The cut manager thinks it is pretty good at choosing default values for
these two variables, so you could just leave well alone - only adjusting them
if it tells you that it has run out of space.
2. If you notice that the number of iterations (rounds) is substantially fewer
than the default value of 22 you could adjust accordingly, eg if you are
stopped after 10 rounds, try doubling NRXTRA and NMXTRA. (Note that you
can change the default number of iterations with NITCOV and NITGOM.)
67
3. If the number of spare elements looks small compared with the number of
spare rows, you could increase NMXTRA and leave NRXTRA alone.
4. You could simply experiment, as you have been doing. The cut manager
is designed to be a vehicle that can be steered into virgin territory.
Increasing NRXTRA and NMXTRA will not guarantee an improvement in every
case, because the default settings may aready be close to optimal. Allowing
the generation of too many cuts can also slow down the optimisation
process, negating the benefits you get from having cuts in the first place! As
well as adjusting NRXTRA and NMXTRA, I'm sure you've noticed already that
you can choose a cut strategy with CUTSTRAT, which makes all the default
space choices for you: (CUTSTRAT=0) => no cuts, (CUTSTRAT=1) => a
few cuts, and (CUTSTRAT=2) => lots of cuts.
I hope this is helpful.
Best wishes
Alyson Stibbard
This message was sent three times, once to Alyson Stibbard personally and twice to the support email
address.
>
>
>
>
>
>
>
>
>
>
>
Hi, I am currently studying at the University of Leeds
and undertaking a project which involves using Xpress-Mp.
Could you please tell me what presolve algorithms XPRESS -MP
uses and how it uses these when trying to tighten the LP relaxation.
The manual only mentions one method. Are there more, and if so how does
XPRESS-MP use them?
Thank you and I look forward to hearing from you soon
Rochelle Kaye
[email protected]
68
{
p
o
n
m
l
k
j
k
k
{
p
o
n
m
l
k
j
This shows how MLGAP data is created from Beasley’s GAP data
Problem
Set 1
Problem
Set 2
Problem
Set 3
Problem
Set 4
Problem
Set 5
15 12 16 15 20 18 11 14 23 14 18 13 11 15 17 18 20 11 20
22 14 10 15 12 21 24 16 17 22 11 15 18 15 18 23 22 23 21
25 11 22 10 22 17 22 12 21 21 16 14 23 21 14 17 25 18 15
23 13 14 25 21 18 23 19 17 18 20 20 22 24 23 13 17 22 20
15 25 22 14 17 21 16 21 20 12 15 18 17 21 20 20 13 14 23
11 11 5 25 10 17 16 20 5 20 14 10 15 6 11 14 13 8 15 11
17 17 12 23 16 25 13 16 19 16 24 17 24 6 6 16 25 21 5 18
13 13 20 17 8 7 16 9 23 18 21 24 11 15 12 24 19 23 13 12
6 10 18 16 12 25 17 7 10 6 20 20 9 20 11 21 6 9 20 23
7 14 18 24 7 24 18 19 18 23 15 16 14 9 16 25 15 20 23 17
42 54 52 47 55
22 19 13 18 24 21 24 22 11 19 15 15 18 11 14 11 21 14 25
13 16 12 18 13 13 16 12 19 21 18 25 20 22 25 22 16 19 18
21 20 20 19 10 22 22 22 23 23 17 13 13 20 14 14 24 10 25
22 14 18 24 11 14 10 21 15 19 23 23 13 23 20 19 19 18 18
22 12 25 20 16 16 19 11 15 21 11 19 21 24 20 16 11 12 15
18 9 14 10 18 18 12 22 19 15 21 20 7 14 15 6 13 15 18 15
10 23 23 23 24 6 14 7 16 13 23 6 7 7 21 11 24 17 16 23
15 6 13 13 18 7 22 19 18 6 23 9 10 13 21 23 24 1 7 16 15
25 7 13 9 23 14 20 9 16 18 22 8 12 13 9 7 11 7 9 19
15 12 10 8 22 17 13 21 11 10 6 20 17 11 10 24 21 18 12 7
49 51 49 43 46
11 19 24 11 11 23 15 25 17 20 15 16 10 19 23 17 14 20 18
13 16 20 13 24 23 24 23 12 21 17 20 22 11 25 12 10 14 17
16 14 13 21 19 22 13 10 16 15 22 16 24 19 23 19 24 10 23
17 12 20 13 21 24 14 14 14 16 12 15 24 18 13 17 18 18 12
19 22 23 14 11 14 18 13 25 18 11 10 21 21 25 20 11 11 13
18 6 5 16 21 16 19 23 16 20 14 18 11 20 5 13 7 10 5 13
12 16 21 10 17 7 19 8 24 19 6 18 24 12 8 18 22 25 12 18
7 22 23 12 23 18 6 23 14 8 16 10 20 12 14 13 13 11 19 15
6 23 7 10 13 14 11 17 10 14 22 9 18 7 19 15 19 5 24 13
16 10 19 14 7 18 25 14 8 8 7 8 22 24 16 18 16 11 8 9
45 51 48 45 46
12 24 13 11 20 12 19 17 19 22 19 22 13 12 10 12 13 13 25
25 24 22 10 21 17 21 17 13 15 15 15 20 20 19 14 17 14 12
21 11 15 16 11 14 22 22 12 17 15 15 11 18 13 19 20 25 13
24 15 19 17 24 20 21 18 25 15 14 23 10 11 23 22 18 19 24
14 18 20 14 15 25 13 19 17 10 18 13 21 17 22 18 17 10 20
13 6 12 16 23 15 20 9 6 18 21 21 13 9 23 19 16 9 25 11
16 9 9 16 11 17 21 21 23 12 6 20 20 19 12 20 21 24 13 6
21 7 6 7 6 15 18 7 24 12 24 8 14 25 21 21 22 23 16 19
10 23 16 8 11 14 5 25 23 11 25 18 11 14 17 22 15 23 7 18
16 14 17 15 8 24 16 23 6 20 7 12 19 7 19 15 16 20 25 18
49 51 51 52 52
21 23 20 11 11 17 14 15 16 22 18 17 10 12 14 11 18 13 11
23 17 16 18 13 21 14 13 20 14 25 10 17 14 20 20 21 22 22
22 20 12 22 13 13 16 22 22 10 18 13 13 11 19 13 20 10 16
11 10 23 19 18 21 17 11 10 21 19 22 18 22 17 21 15 10 24
18 22 23 19 15 12 14 13 12 22 21 15 12 11 21 20 22 13 11
14 12 6 18 9 12 19 7 22 19 7 6 25 10 13 7 24 17 12 6
15 19 25 17 16 7 8 21 21 5 8 13 16 24 15 14 8 7 18 18
17 15 23 14 24 10 15 17 8 23 16 23 25 13 24 17 6 14 7 21
24 23 19 15 15 13 6 12 21 21 16 5 8 11 9 9 23 11 8 11
25 11 15 11 9 18 10 23 9 7 19 14 7 6 22 17 7 7 5 13
43 47 54 45 42
69
24
13
15
21
14
Cost of doing a job at
level 1
Resources consumed
doing a job at level 1
22
18
13
15
10
Cost of doing a job at
level 2
Resources consumed
doing a job at level 2
14
15
10
11
13
Cost of doing a job at
level 3
Resources consumed
doing a job at level 3
16
20
13
22
12
Cost of doing a job at
level 4
Resources consumed
doing a job at level 4
25
20
19
24
21
Cost of doing a job at
level 5
Resources consumed
doing a job at level 5
© Copyright 2026 Paperzz