NetworkFlowExercise
NetworkFlowExercise
3
2 4
2 6
s 1 5 6 1 7 4 6
8 2
0
3 5
Exercise 2. (i) Given a directed network G = (N, A) with arc length cij associ-
ated with each arc (i, j) ∈ A. Formulate the shortest path problem from a source
node s to a target node t in the network as an integer programming formulation.
(ii) Consider the network given in Exercise 1 with source node s = 1 and target
node t = 5. Implement the formulation obtained in part (i) for this problem
instance by using ZIMPL.
1
2
so that we do not ship any defective units. Our problem is to find an optimal
inspection plan that specifies at which stages we should inspect the items so that
we minimize the total cost of production and inspection.
Using fewer inspection stations might decrease the inspection costs, but will
increase the production costs because we might perform unnecessary manufac-
turing operations on some units that are already defective. The optimal number
of inspection stations will achieve an appropriate trade-off between these two
conflicting cost considerations.
Suppose that the following cost data are available.
• fij : the fixed cost of inspecting a batch after stage j, given that we last
inspected the batch after stage i.
Max-flow problem
Exercise 4. Solve the maximum flow problem shown in Figure 2 using augment-
ing path algorithm (the number besides each arc represents the arc capacity).
Specify the residual network before each augmentation.
1
2 4
2 2
1 1 2 1 6
s t
2 1
1
3 5
Exercise 5. Given a directed network G = (N, A) with arc capacity cij associated
with each arc (i, j) ∈ A. Formulate the max-flow problem from a source node s
to a sink node t in the network as an integer programming formulation.
• a release date rj (representing the beginning of the day when this job be-
comes available for processing), and
We assume that
Job(j) 1 2 3 4
Processing time (pj ) 1.5 1.25 2.1 3.6
Release date (rj ) 3 1 3 5
Due date (dj ) 5 4 7 9
(ii) Solve the maximum flow problem obtained in part (i) by integer program-
ming approach with the use of ZIMPL and SCIP. From the obtained result, give
the schedule of all jobs.