Anda di halaman 1dari 43

1

OPERATIONS RESEARCH 1
SINTA R SULISTYO
SINTA.SULISTYO@UGM.AC.ID
[CLASS RULES]

COURSE INSTRUCTORS

▸ Dr. Nur Aini Masruroh

▸ Sinta R. Sulistyo, MSIE

▸ Email: sinta.sulistyo@ugm.ac.id

▸ Communication: by email (preferably)

▸ Office hour: by appointment


[CLASS RULES]

GRADING
Homework
5%
Quiz
15%
First-half Term
50%
Final Exam
30%
[CLASS RULES]

COURSE NOTES

▸ All the materials (course materials, homework, homework


solution) will be posted in e-Lisa (elisa.ugm.ac.id)

▸ Community: Riset Operasi 1

▸ Password: Monteiro

▸ The course assistants: Erlina and Aldian (IE ’16)


[INTRODUCTION]

MATERIALS

▸ Network Optimization Models

▸ Integer Programming

▸ Dynamic Programming
6

OPERATIONS RESEARCH 1

NETWORK OPTIMIZATION MODELS


SINTA R SULISTYO
SINTA.SULISTYO@UGM.AC.ID
[NETWORK OPTIMIZATION MODELS]

NETWORK MODELS
▸ Network representation is widely used in:

Production, distribution, project planning, facilities location, resource
management, financial planning, etc.

‣ Transportation, electrical and communication networks pervade our


daily lives.

‣ Algorithms and software are being used to solve huge network


problems on a routine basis.

‣ Many network problems are special cases of linear programming


problems.

The park management currently faces three problems. One is to determine whic
route from the park entrance to station T has the smallest total distance for the opera
[NETWORK OPTIMIZATION MODELS]
tion of the trams. (This is an example of the shortest-path problem to be discussed i
Sec. 9.3.)
A second problem is that telephone lines must be installed under the roads to estab
PROTOTYPE EXAMPLE
lish telephone communication among all the stations (including the park entrance). Be
cause the installation is both expensive and disruptive to the natural environment, line
will be installed under just enough roads to provide some connection between every pa
Seervada Park has aThe
of stations. limited amount
question is where of
thesightseeing
lines should beand backpack
laid to accomplishhiking.
this with a min
imum total number of miles of line installed. (This is an example of the minimum span
‣ O: entrance of the
ning tree park.
problem to be discussed in Sec. 9.4.)

‣ T: station with scenic wonder.

m for Seervada A

2 2 7
5 T
5 4
O B D

3 7
1
4 1

C E
4
[NETWORK OPTIMIZATION MODELS]

SEERVADA PARK PROBLEMS


‣ Determine route from park entrance to station T with
smallest total distance for the operation of trams.

‣ Telephone lines must be installed under the roads to


establish communication among all the stations. This
should be accomplished with a minimum total number of
miles of lines.

‣ Route the various trips of trams to maximize the number


of trips per day without violating the limits of any road.
[NETWORK OPTIMIZATION MODELS]

TERMINOLOGY OF NETWORKS
‣ A graph, or network, is defined by two sets of symbols: nodes and arcs.

‣ The vertices (or points) of a graph or network are called nodes.

‣ For arc (j, k), node j is the initial node and node k is the terminal node. 

‣ An arc consists of an ordered pair of vertices and represents a possible


direction of motion that may occur between vertices.

‣ A sequence of arcs such that every arc has exactly one vertex in common
with the previous arc is called a chain.

‣ A path is a chain in which the terminal node of each arc is identical to the
initial node of the next arc.

[NETWORK OPTIMIZATION MODELS]

EXAMPLE
A chain, a path, or both?

‣ (1,2)-(2,3)-(4,3)

‣ (1,2)-(2,3)-(3,4)
[NETWORK OPTIMIZATION MODELS]

NETWORK OPTIMIZATION MODELS

▸ Shortest path problem

▸ Minimum spanning tree

▸ Maximum flow problems

▸ Minimum cost flow problem


SHORTEST PATH
PROBLEM
[NETWORK OPTIMIZATION MODELS]

SHORTEST PATH PROBLEM


‣ Consider a network with origin and destination nodes.

‣ Each arc has an associated distance.

‣ Objective: find the shortest path from the origin to the


destination.

‣ Algorithm: starting from the origin, successively identify the


shortest path to each of the nodes in the ascending order of
their distances from the origin.

‣ The problem is solved when the destination is reached.


[NETWORK OPTIMIZATION MODELS]

SHORTEST PATH ALGORITHM

▸ Label node 1 with L1 = 0

▸ Continue to label the remaining nodes according to the


following formula: Lj = min {Li+cij ∀(i,j)∈G}

▸ When the last node, n, has been labeled, Ln is the shortest


distance from node 1 to node n.

▸ The route is determined by tracing backward from node n


to all nodes so that Lj = Li+cij
[NETWORK OPTIMIZATION MODELS]

EXAMPLE

▸ L1 = 0

▸ L2 = min (L1+6) = 6

▸ L3 = min (L1+9) = 9

▸ L4 = min (L2+4, L1+3, L3+2) = min(10,3,11) = 3

▸ L5 = min (L3+4, L4+6) = min(13,9) = 9

▸ L6 = min (L2+3, L5+1) = min(9,10) = 9

▸ L7 = min (L2+10, L5+4 , L6+6) = min(16,13,15) = 13

▸ Shortest path = 1 – 4 – 5 – 7
[NETWORK OPTIMIZATION MODELS]

EXERCISE
‣ A library must build shelving to shelve 200 4-inch high books, 100 8-inch high books, and
80 12-inch high books. Each book is 0.5 inch thick.

‣ The library has several ways to store the books. For example, an 8-inch high shelf may be
built to store all books of height less than or equal to 8 inches, and a 12-inch high shelf
may be built for the 12-inch books. Alternatively, a 12-inch high shelf might be built to
store all books.

‣ The library believes it costs $2,300 to build a shelf and that a cost of $5 per square inch is
incurred for book storage. (Assume that the area required to store a book is given by
height of storage area times book’s thickness.)

‣ Formulate and solve a shortest-path problem that could be used to help the library
determine how to shelve the books at minimum cost.

‣ (Hint: Have nodes 0, 4, 8, and 12, with Cij being the total cost of shelving all books of
height > i and ≤ j on a single shelf.)
MINIMUM SPANNING
TREE
[NETWORK OPTIMIZATION MODELS]

MINIMUM SPANNING TREE


‣ For undirected and connected networks.

‣ A positive length (distance, cost, time, etc.) is associated


with each link.

‣ Both the shortest-path problem and the minimum


spanning tree problem choose a set of links that satisfy a
certain property.

‣ Objective: find the shortest total length that provide a


path between each pair of nodes.
[NETWORK OPTIMIZATION MODELS]

MINIMUM SPANNING TREE


Definition:

1. Nodes of the network are given, as well as potential links


and positive length for each if it is inserted in the
network.

2. Design network inserting links in order to have a path


between each pair of nodes.

3. These links must minimize the total length of the links


inserted into the network.
[NETWORK OPTIMIZATION MODELS]

9.4 THE MINIMUM SPANNING TREE PROBLEM

PROPERTIES A
T

‣ A network with n nodes requires n – 1 O B D

links to provide a path between each


C E
pair of nodes. (a)
A
‣ The n – 1 links form a spanning tree. T

O B D
‣ Which are spanning trees?
C E
(b)
A
2 2 T
5
■ FIGURE 9.5 4
O B D
Illustrations of the spanning
tree concept for the 7
Seervada Park problem: 4
(a) Not a spanning tree; C E
(b) not a spanning tree;
(c) a spanning tree. (c)
[NETWORK OPTIMIZATION MODELS]

ALGORITHM FOR MST


Can be solved in a straightforward way using a greedy algorithm.

1. Select any node arbitrarily, and connect it to the nearest


distinct node.

2. Identify the unconnected node that is closest to a connected


node, and connect the two nodes. Repeat this step until all
nodes have been connected.

3. Tie breaking: can be done arbitrarily. It can indicate that more


than one optimal solution exist.
[NETWORK OPTIMIZATION MODELS]

EXAMPLE
MAXIMUM FLOW
PROBLEMS
[NETWORK OPTIMIZATION MODELS]

MAXIMUM FLOW PROBLEMS


‣ Third problem in Seervada Park: route the tram trips from the park
entrance O to the scenic wonder T maximizing the number of trips
per day.

‣ Outgoing trips allowed per day:


[NETWORK OPTIMIZATION MODELS]

FEASIBLE SOLUTION
One solution (not optimal):

‣ 5 trams using the route O → B → E → T

‣ 1 tram using O → B → C → E → T

‣ 1 tram using O → B → C → E → D → T
[NETWORK OPTIMIZATION MODELS]

MAXIMUM FLOW PROBLEM


‣ All flow through a directed and connected network from the source to the sink.

‣ All remaining nodes are transshipment nodes.

‣ Flow through an arc is only allowed in the direction indicated by the


arrowhead.

‣ Maximum amount of flow is given by the capacity of that node.

‣ Objective: maximize the total amount of flow from the source to the sink.

‣ Maximum flow problem is a linear programming problem; it can be solved by


the simplex method.

‣ However, augmented path algorithm is more efficient.


An Algorithm
[NETWORK OPTIMIZATION MODELS]
Because the maximum flow problem can be formulated as a linear programming prob-
lem (see Prob. 9.5-2), it can be solved by the simplex method, so any of the linear pro-
gramming software packages introduced in Chaps. 3 and 4 can be used. However, an
even more efficient augmenting path algorithm is available for solving this problem.
AUGMENTED PATH ALGORITHM
This algorithm is based on two intuitive concepts, a residual network and an augment-
ing path.
After some flows have been assigned to the arcs, the residual network shows the re-
maining arc capacities (called residual capacities) for assigning additional flows. For ex-
‣ Every arcample,
is changed from
consider arc O ! B inaFig.
directed
9.6, which to
has an
an arcundirected arc
capacity of 7. Now suppose that
the assigned flows include a flow of 5 through this arc, which leaves a residual capacity
‣ of 7 ! 5 " 2 for any additional flow assignment through O ! B. This status is depicted
Residual asnetwork shows
follows in the residual the residual capacities for assigning additional
network.
flows:
2 5
O B
[NETWORK OPTIMIZATION MODELS]

SEERVADA PARK RESIDUAL NETWORK


23.qxd 11/19/08 04:17 PM Page 375

Augmenting path is a directed path from the source to the sink in


the residual network, such that every arc on this path has strictly
9.5 THE MAXIMUM FLOW PROBLEM 375
positive residual capacity.

A 3
0
1
0 T
5 0 0
7 4 9
O 0 B 0 D 0
2 5
4 0

9.7
0 1
esidual network 0
rvada Park 6
0 C E
low problem. 4 0

The number on an arc next to a node gives the residual capacity for flow from that node to
[NETWORK OPTIMIZATION MODELS]

ITERATION OF AUGMENTED PATH ALGORITHM


1. Identify an augmenting path (directed path from source to sink with
positive residual capacity).

2. Identify residual capacity c* (minimum of residual capacities of the


arcs on path). Increase flow by c*.

3. Decrease by c* the residual capacity of each arc on this augmented


path. Increase by c* the residual capacity of each arc in the opposite
direction.

4. Return to Step 1.

Several augmenting paths can be chosen. Its choice is important for the
efficiency of large-scale networks.
[NETWORK OPTIMIZATION MODELS]

EXAMPLE
Iteration 1:

One of several augmenting paths is O → B → E →T

Residual capacity is min{7, 5, 6} = 5.

Iteration 2: assign a flow of 3 to the augmenting path O → A → D → T

Iteration 3: assign flow of 1 to augmenting path O → A → B → D → T

Iteration 4: assign flow of 2 to augmenting path O → B → D → T

Iteration 5: assign flow of 1 to augmenting path O → C → E → D → T

Iteration 6: assign flow of 1 to augmenting path O → C → E → T

Iteration 7: assign flow of 1 to augmenting path O → C → E → B → D → T


[NETWORK OPTIMIZATION MODELS]
358-423.qxd 11/19/08 04:17 PM Page 378

EXAMPLE: OPTIMAL SOLUTION


After iteration 7 there are no more augmenting paths. 

CHAPTER 9 NETWORK OPTIMIZATION MODELS
Optimal flow pattern is:
A
3
4 1
8 T 14
7
14 O B D
4

RE 9.8 1 6
3 4
solution for the
a Park maximum flow C E
. 3

The flow assignment of 1 for O → C → E → B → D → T cancels 1 unit of


There are no more augmenting paths, so the current flow pattern is optimal.
flow assigned atThe
iteration 1 pattern
current flow (O →may B→ E → T)byand
be identified eitherreplaces it by
cumulating the flow assignments
or comparing
assignments of 1 unit tothe both
final residual
O →capacities
B → Dwith →theToriginal
and O arc→
capacities.
C→E If we
→use
T. the lat-
ter method, there is flow along an arc if the final residual capacity is less than the original
capacity. The magnitude of this flow equals the difference in these capacities. Applying
this method by comparing the residual network obtained from the last iteration with either
[NETWORK OPTIMIZATION MODELS]

AUGMENTING PATH
This can be difficult, especially for large networks.

Procedure:

‣ Find all nodes that can be reached from the source along a single arc
with strictly positive residual capacity.

‣ For each reached node, find all new nodes from this node that can be
reached along an arc with strictly positive residual capacity.

‣ Repeat this successively with the new nodes as they are reached.

‣ Identification of a tree of all nodes reached from the source along a


path with strictly positive residual flow capacity.
[NETWORK OPTIMIZATION MODELS]

HOW TO RECOGNIZE THE OPTIMAL?


‣ Using the maximum-flow min-cut theorem.

‣ Cut: any set of directed arcs containing at least one arc from
every directed path from the source to the sink.

‣ Cut value: sum of the arc capacities of the arcs (in the specified
direction) of the cut.

‣ Maximum-flow min-cut theorem: for any network with a single


source and sink, the maximum feasible flow from the source to
the sink equals the minimum cut value for all cuts of the
network.
9.5 THE MAXIMUM FLOW PROBLEM 379
[NETWORK OPTIMIZATION MODELS]
A 0
4

MAXIMUM-FLOW MIN-CUT THEOREM


1
0
1
7 T
0 1 3 2
O 7 B 3 D 6
2 0
GURE F is
9.9 the amount
edure for finding an
of
2 flow from the source to the sink
1 for any feasible flow
pattern.
menting path for
0 0
ion 7 of the Seervada 5
maximum flow 0
2 C E
lem. Example: Value of cut is 3 + 42+ 1 + 6 = 14.2This is the maximum value of
F, so this is the minimum cut.
A 3
0
1
5 0 0 0 T
7 4 9
O 0 B 0 D 0
4 2 5 0

GURE 9.10 1
0 0
nimum cut for the
vada Park maximum flow 0 C E 6
lem. 4 0
[NETWORK OPTIMIZATION MODELS]

EXERCISE
MINIMUM COST FLOW
PROBLEM
[NETWORK OPTIMIZATION MODELS]

MINIMUM COST FLOW PROBLEM


It contains a large number of applications and it can be solved extremely
efficiently.

‣ Like the maximum flow problem, it considers flow through a network


with limited arc capacities.

‣ Like the shortest-path problem, it considers a cost (or distance) for flow
through an arc.

‣ Like the transportation problem or assignment problem, it can consider


multiple sources (supply nodes) and multiple destinations (demand
nodes) for the flow, again with associated costs.

The previous problems are all special cases of the minimum cost flow problem
[NETWORK OPTIMIZATION MODELS]

MINIMUM COST FLOW PROBLEM


1. The network is a directed and connected network.

2. At least one of the nodes is a supply node.

3. At least one of the other nodes is a demand node.

4. All the remaining nodes are transshipment nodes.

5. Flow through an arc is in the direction of the arrow. Maximum amount of flow given by
the capacity of the arc.

6. Network has enough arcs with sufficient capacity such that all flow generated at supply
nodes reaches the demand nodes.

7. Cost of flow through each arc is proportional to the amount of that flow.

8. Objective: minimize (maximize) the total cost (profit) of sending the available supply
through the network to satisfy the demand.
[NETWORK OPTIMIZATION MODELS]

MODEL FORMULATION
Consider a directed and connected network where the n nodes include at least one supply node and at
least one demand node
‣ xij= flow through arc i→j

and the given information includes


‣ cij = cost per unit flow through arc i→j

‣ uij = arc capacity for arc i→j

‣ bi = net flow generated at node i

The value of bi  depends on the nature of node i, where


‣ bi >0 if node i is a supply node

‣ bi <0 if node i is a demand node

‣ bi =0 if node i is a transshipment node

The objective is to minimise the total cost of sending the available supply through the network to satisfy
the given demand
[NETWORK OPTIMIZATION MODELS]

MODEL FORMULATION
[NETWORK OPTIMIZATION MODELS]

EXAMPLE
THANK YOU

Anda mungkin juga menyukai