0% found this document useful (0 votes)
40 views3 pages

Network Flow Problem Exercises Guide

The document contains exercises focused on network flow problems, including shortest path and maximum flow problems using Dijkstra's algorithm and augmenting path algorithm. It also involves formulating these problems as integer programming problems and applying them to real-world scenarios such as production line inspections and job scheduling on parallel machines. Each exercise requires specific problem-solving techniques and implementations using ZIMPL and SCIP.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views3 pages

Network Flow Problem Exercises Guide

The document contains exercises focused on network flow problems, including shortest path and maximum flow problems using Dijkstra's algorithm and augmenting path algorithm. It also involves formulating these problems as integer programming problems and applying them to real-world scenarios such as production line inspections and job scheduling on parallel machines. Each exercise requires specific problem-solving techniques and implementations using ZIMPL and SCIP.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Exercises on

Network Flow Problems

Shortest path problem


Exercise 1. Solve the shortest path problem shown in Figure 1 using the Dijk-
stra’s algorithm. Count the number of distance updates.

3
2 4

2 6

s 1 5 6 1 7 4 6

8 2

0
3 5

Figure 1: Network for Exercise 1.

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.

Exercise 3. A production line consists of an ordered sequence of n production


stages, and each stage has a manufacturing operation followed by a potential
inspection. The product enters stage 1 of the production line in batches of size
B ≥ 1. As the items within a batch move through the manufacturing stages,
the operations might introduce defects. The probability of producing a defect at
stage i is αi . We assume that all of the defects are non-repairable, so we must
scrap any defective item. The production line must end with an inspection station

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.

• pi : the manufacturing cost per unit in stage i.

• fij : the fixed cost of inspecting a batch after stage j, given that we last
inspected the batch after stage i.

Formulate this inspection problem as a shortest path problem.

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

Figure 2: Network for Exercise 4.

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.

Exercise 6. This exercise shows an application of max-flow problem in scheduling


on uniform parallel machines. Consider the problem of scheduling a set J of jobs
on M uniform parallel machines. Each job j ∈ J has

• a processing time pj (denoting the number of days required to complete the


job),
3

• a release date rj (representing the beginning of the day when this job be-
comes available for processing), and

• a due date dj ≥ rj + pj (representing the beginning of the day by which the


job must be completed).

We assume that

• a machine can work on only one job at a time, and

• each job can be processed by at most one machine at a time.

However, we allow preemptions (i.e., we can interrupt a job and process it on


different machines on different days). The scheduling problem is to determine a
feasible schedule that completes all jobs before their due dates or to show that
no such schedule exists.
(i) Formulate the scheduling problem described in Table 1 with M = 3 ma-
chines as a maximum flow problem.

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

Table 1: Parameters for scheduling problem in Exercise 6.

(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.

Common questions

Powered by AI

Allowing job preemption in max-flow scheduling enhances solution feasibility by increasing flexibility in resource allocation, enabling partial completion of jobs on one machine before transferring to another. This flexibility helps manage jobs with overlapping timelines or tight deadlines, optimally filling gaps in machine schedules. However, it introduces complexity in maintaining flow conservation as jobs split across arcs, requiring robust bookkeeping to ensure consistent job start, pause, and resume times, maintaining system consistency and efficiency.

Challenges in implementing ZIMPL for solving integer programming formulations include accurately modeling constraints and objective functions to reflect real-world scenarios, such as ensuring capacity and flow conservation in network problems. Additionally, ensuring that all integer constraints are correctly specified and that the model remains computationally feasible for large networks can be complex. Another challenge is efficiently embedding the ZIMPL model within a larger system for dynamic or real-time problem-solving, particularly when dealing with variable network sizes or parameters.

To represent the scheduling problem on uniform parallel machines as a maximum flow problem, jobs are treated as flow units with their processing times determining the amount of flow needed. The network is constructed such that each job has incoming arcs from a source node representing its availability and outgoing arcs to a sink node representing its deadlines. Machines are represented by middle nodes with arcs from the job nodes, respecting the processing time as capacity, thereby ensuring completion within the due dates. Constraints are added to ensure no two jobs share the same machine at a given time.

In both max flow problems and machine scheduling, integer programming helps manage constraints that ensure feasible flows of resources or jobs through a network or schedule. For max flow, the constraints ensure the flow conservation at each node and respect arc capacities. In scheduling, constraints ensure no jobs exceed their due dates and machines do not double-book. The objectives align in maximizing network throughput or scheduling efficiency, revealing overlaps in ensuring capacities aren't exceeded and each unit flows through optimally.

The shortest path problem in a directed network with arc lengths can be formulated as an integer programming problem by defining binary variables x_ij for each arc (i, j) that takes a value of 1 if the arc is part of the shortest path and 0 otherwise. The objective is to minimize the sum of the products of the arc lengths c_ij and the variables x_ij for all arcs in the network while ensuring that for each node, the incoming flow equals the outgoing flow, except for the source and target nodes. This constraint can be expressed as the flow conservation constraint.

In a maximum flow problem modeled as an integer programming problem, each arc (i, j) in the network is associated with a capacity c_ij, and a flow variable f_ij. The objective is to maximize the flow from source node s to sink node t. This is subject to constraints: for each node except s and t, the sum of incoming flows must equal the sum of outgoing flows (flow conservation), and for each arc, the flow f_ij must not exceed the capacity c_ij. Additionally, non-negativity constraints ensure that flows are positive.

To optimize inspection stations along a production line to minimize total costs, one can model the problem as a shortest path problem where stages of manufacturing act as nodes connected by arcs representing both manufacturing and inspection costs. The goal is to find the optimal path that balances the trade-off between inspection costs and manufacturing costs for defective units, ensuring minimal total costs. Fewer inspection stations reduce inspection costs but may increase manufacturing costs due to processing defective items, hence the optimal solution requires careful balancing.

Fixed inspection costs influence the formulation by necessitating a careful selection of which node pairs or stages connect directly in the graph, representing stages of production from start to end. These costs are incorporated as edge weights, capturing the cost incurred each time an inspection occurs immediately after a production stage. The objective function minimizes the path weight, thus incentivizing fewer inspections unless they significantly reduce downstream costs by detecting defects early, creating a trade-off between inspection frequency and total cost.

Preemptions in job scheduling, which allow jobs to be interrupted and resumed on different machines, require additional considerations in the network flow formulation. The network must allow for job splits, meaning a job can contribute to the flow on multiple arcs corresponding to different machines and time slots. This flexibility must be captured by introducing additional nodes or arcs for each time segment a job can occupy, with flow conservation and capacity constraints ensuring that the overall processing time is met without exceeding machine availability up to job's due dates.

When using Dijkstra’s algorithm, it is crucial to maintain a priority queue to manage nodes based on their tentative distances from the source. At each step, the node with the smallest distance is settled, and neighbors of this node are updated if a shorter path is found through it. Distance updates are counted each time a tentative distance to a neighboring node is changed, which helps in analyzing the efficiency and computational cost of the algorithm. Key considerations include ensuring all edge weights are non-negative and managing the priority queue efficiently.

You might also like