Beruflich Dokumente
Kultur Dokumente
Lab 05 28-August-2019
Instructions:
We will continue modeling optimization problems with integer variables in this lab. Recall that
integer optimization problems are those where some or all variables can take only integer values in
the solution. In this lab, we will consider two popular applications of MILP, namely the assignment
problem and the max-cut problem.
There are only 3 exercises in this lab. Try to solve all problems on your own. If you have difficulties,
ask the instructor or TAs. Clarifications will be provided to all Exercises.
Name your .mod files for Exercise 1 as ex1.mod (or ex1a.mod, ex1b.mod etc.), and ex2.mod (or
ex2a.mod, ex2b.mod etc.) for Exercise 2. Similarly name your .dat files as ex1.dat (or ex1a.dat,
ex1b.dat) for Exercise 1, and ex1.dat (or ex1a.dat, ex1b.dat) for Exercise 2. Follow a similar
procedure for Exercise 3 as well.
Upload a single zip file (with name YOURROLLNO Lab5.zip) to moodle, containing the report in pdf
format (with name YOURROLLNO Lab5 report.pdf), and all your AMPL code/model/data files.
Show all your work to TA/instructor before leaving.
1
IE507, Modeling and Computation Lab
Lab 05 28-August-2019
Location
Facility
1 2 3 4 5 6 7 8 9 10 11 12
1 50 73 62 41 55 60 39 48 67 71 44 59
2 90 57 82 77 91 66 65 78 84 95 59 67
3 63 66 75 54 68 75 81 56 71 120 49 65
4 87 120 81 67 71 82 120 63 70 90 54 62
5 95 91 74 81 63 59 93 65 84 93 46 56
6 110 86 80 59 57 55 78 61 130 84 55 79
7 61 71 91 55 81 73 91 72 85 76 58 63
8 56 69 66 64 72 67 83 69 88 100 71 68
9 78 80 87 98 96 104 99 97 68 90 81 73
10 92 72 82 74 82 83 89 98 93 94 125 120
11 91 84 62 70 73 79 78 76 72 74 71 84
12 82 83 84 72 82 80 82 89 97 99 102 122
2
IE507, Modeling and Computation Lab
Lab 05 28-August-2019
The max-cut problem is defined as the problem to find a cut in the graph G with maximum weight,
i.e.,
max WS
S(V
1. [R] Write an integer programming formulation to find the max cut of a given graph. Define
all the variables and constraints clearly.
2. [R] Consider the first graph given below. Use your intuition to find the max-cut for the
graph (a). Explain why your intuition is correct.
3. Write a proper model and data file for the graph (b) and solve the integer problem using
Gurobi.
4. [R] Write down the solution and the value of max-cut for graph (b).
3
IE507, Modeling and Computation Lab
Lab 05 28-August-2019
1. [R] Write a mathematical model so that you can maximize your credits to be accumulated
this semester. Explain how to design the model variables and indicate which variables are
integers.
2. [R] Solver your MILP and report the optimal value and the solution.
3. [R] Let us now compare it to a linear program. Suppose we remove the restrictions that
the variables in the above problem are integers. Solve this modified problem and report the
solution and the objective value.
4. [R] Can the solution of the MILP be obtained by merely rounding the solution of the LP?
Why or why not?
5. [R] Suppose a new course C11 with 10 credits is introduced, but the course timing for C11
overlaps with the course timings of C6, C7, C8, how will you change your model to include
this new constraint?
6. [R] Solve the modified MILP and report the optimal value and solution.
7. [R] Solve the modified MILP by removing the integer constraints on the variables and check
if the solution of the modified MILP can be obtained by merely rounding the solution of the
corresponding modified LP? Explain.