Logistics Report
Logistics Report
Department of INFORMATICA
Master of Data Science and Business Informatics
Submitted by:
Elisa Pashku (628389)
Gloria Segurini (567352)
Luca Palla (533605)
Matteo Garro (620025)
5x 11 + 6 x21+ 9 x31
+ 7 x41
+ 3x51+ 2x61 ≤ MaxWork
6 x22+
5x 12+ 9x32 + 7x42 + 3x52 + 2x62
≤ MaxWork
5x 13 + 6 x23+ 9x33 + 7x43
+ 3x
53+ 2x 63 ≤ MaxWork
Our objective was to minimize the maximum workload (sum of durations) for every
worker.
The result we obtained with CPLEX was the following:
CPLEX 12.10.0.0: optimal integer solution; objective 11
7 MIP simplex iterations
0 branch-and-bound nodes
ampl: display assignedTasks;
assignedTasks :=
11 1
12 0
13 0
21 1
22 0
23 0
31 0
32 0
33 1
41 0
42 1
43 0
51 0
52 1
53 0
61 0
62 0
63 1;
The table 1 s ummarizes the results given by the model.
1 1, 2 11
2 4, 5 10
3 3, 6 11
Objective Function: 11
Table 1. Results of the optimization problem.
● 3. Consider the case in which the assignment of each task costs 10 dollars,
independently of the worker, but the manager needs to pay 150 dollars in
case worker 1 works more than 9 hours. Formulate in terms of ILP the
problem of assigning the 6 tasks to the 3 workers in such a way to minimize
the total cost.
● 4. Implement the ILP model proposed in point 3 by means of the modeling
language AMPL, and solve it using the optimization solver CPLEX.
Compare the optimal solution found with the one determined at point 2.
In the second part we added a binary variable Exceed in order to construct the following
constraints:
This means that, by setting Exceed equal to 1 or 0, the solver decides whether to assign to
worker 1 a total workload ≥ 9: the variable Exceed turns equal to 1 if a total workload
greater than 9 is assigned to Worker1.
The number 100 represents the Big M.
This is related to the new objective function:
Min 10(x11+x21+x31+x41+x51+x61+x12+x22+x32+x42+x52+x62+x
13+x
+x33
23 +x
+x
43 53+x
63)
+150*Exceed
By setting this new objective function, we impose that the manager must pay 10 for every
assignment task-worker and an added value of 150 if the total workload for Worker 1 is
greater than 9.
x 11 + x12 + x13=1
+ x23=1
x 21 + x22
x 31 + x32 + x33=1 allocation constraints: every task must be
x 41 + x42 + x43=1 assigned exactly to one worker
+ x53=1
x 51 + x52
x 61 + x62 + x63=1
+ x31+
x 11 + x21 x41+ x51 + x61 ≥ 1 linking constraints: at least one task must be
x22+
x 12+ x32+ x42+ x52+ x62 ≥ 1 assigned to every worker
+ x33+
x 13 + x23 x 43+ x
53 + x 63 1
≥
1 5 3
2 1 5
3 2, 3, 4, 6 24
Objective Function: 60
Table 2. Results of the optimization problem.
Comparing the two models, it is possible to see that in the first model the objective
function aims to equally distribute the total workload of 32 hours between the 3 workers
whereas, in the second part of the problem, the new objective function disregards the
workload shared among the workers in order to minimize the total cost of the operation.
As a matter of fact the optimal value returned by this function is equal to 60 as shown
above.