Linear Optimization
Linear Optimization
The question ask for the number of cabinets I need to buy, so my variables will
stand for that:
x: number of model X cabinets purchased
y: number of model Y cabinets purchased
Naturally, x > 0 and y > 0. I have to consider costs and floor space (the "footprint"
of each unit), while maximizing the storage volume, so costs and floor space will
be my constraints, while volume will be my optimization equation.
Decision MAKING PROBLEM 2
(ANSWER)
• cost: 10x + 20y < 140, or y
< –( 1/2 )x + 7
• space: 6x + 8y < 72, or y < –
( 3/4 )x + 9
• volume: V = 8x + 12y
• When you test the corner
points at (8, 3), (0,7), and
(12, 0), you should obtain a
maximal volume of100
cubic feet by buying eight
of model X and three of
model Y.
Optimal Path Problems
• Shortest Path
• Maximum Flow
• Critical Path
•
Shortest path problem
• The problem is to determine the best way to traverse a
network to get from an origin to a given destination as cheaply
as possible. Suppose that in a given network there are m
nodes and n arcs (i.e. edges) and a cost Cij associated with
each arc (i to j) in the network. Formally, the Shortest Path
(SP) problem is to find the shortest (least cost) path from the
start node 1 to the finish node m. The cost of the path is the
sum of the costs on the arcs in the path. Define binary
variables Xij, where Xij =1 if the arc (i to j) is on the SP and Xij =
0 otherwise. There are two special nodes, called the origin and
destination. The objective is to find a shortest path between
the origin and destination.
Shortest path problem
• In the following network various costs are assigned for the
path from one node to another. For example, the cost from
node 2 to node 4 is 6. The objective function considers the
cost to move from each node to another from source to
destination. The constraints are broken into three groups. The
constraint for the origin node says that you must leave node 1
and go to node 2 or 3. The intermediate node constraints say
that if you ever come into a node you must leave that node.
The destination node is similar to origin node in that you must
reach to this node from one of the neighboring node.
Shortest path problem
• Consider the following directed network (for an undirected
network, make each arc directed in both directions, then
apply the same formulation. Note that in this case you have
Xij and Xji variables). The aim is to find the shortest path from
node 1 to node 7.
•
Shortest path problem
(answer)
• Go from 1 to 3
Go from 3 to 5
Go from 5 to 6
Go from 6 to 7
• This is the shortest path with total of 22 length (cost) units.
Maximum flow Problem
• In a network with flow capacities on the arcs, the problem is
to determine the maximum possible flow from the source to
the sink while honoring the arc flow capacities. Consider a
network with m nodes and n arcs with a single commodity
flow. Denote the flow along arc (i to j) by Xij. We associate
with each arc a flow capacity, kij. In such a network, we wish
to find the maximum total flow in the network, F, from node l
to node m.
Maximum flow Problem
• In the LP formulation, the objective is to maximize F. The
amount that leaves the origin by various routes. For every
intermediate node, what comes in must be equal to what goes
out. In some routes the flow can go both ways. The capacity
amount that can be sent in a particular direction is also shown
on the each route.
Maximum flow Problem
Maximum flow Problem
(answer)
• Send 10 units from 1 to 2
Send 7 units from 1 to 3
Send 3 units from 2 to 6
Send 7 units from 2 to 4
Send 4 units from 3 to 6
Send 6 units from 3 to 5
Send 7 units from 4 to 7
Send 8 units from 5 to 7
Send 3 units from 6 to 3
Send 2 units from 6 to 5
Send 2 units from 6 to 7