Professional Documents
Culture Documents
Lindo Kullanim Linear Opt
Lindo Kullanim Linear Opt
1. Using a constant in the objective function or the left hand side of a constraint:
e.g. MIN 10 + 2x1 + 3x2 + 9x3
sol. MIN 2x1 + 3x2 +9x3
e.g. x1 + x3 + 2 > 10
sol. x1 + x3 > 8
xi ≥ 0 for i=1, 2, …, 8
9
About variables names
You are free to name your variables any way you want,
however, your model is easier to read if you:
• Example:
t1, t2, …, t4 for #tables produced in period 1, 2, …, 4
and c1, c2, …, c4 for #chairs produced in period 1, 2, …, 4
(instead of a, b, c, d,…, h or x1, x2, …, x8)
10
About variables names
Use multi-dimensional index when variables have a natural
organization in rows & columns; or links between sets of
objects/agents
• Example:
given 3 workers (Tom, Ben, Matt) and 2 machines (1,2), represent
the number of minutes each worker operates each machine as:
xT,1, xT,2, xB,1, xB,2, xM,1, and xM,2 (instead of x1, x2, x3, …, x6)
• Example:
xd,l,w = volume of drink of type d produced in factory at location l
in week w, with d = {Sprite, Fanta}, l = {LA, Baltimore},
w = {1, 2, … 52}.
11
Types of LO problems
• A diet problem (3.4)
• A work scheduling problem (3.5)
• A capital budgeting problem (3.6)
• Short-term financial planning (3.7)
• Blending problems (3.8)
• Production process models (3.9)
• A cutting problem (-)
• Inventory problems (3.10)
• Multi-period financial model (3.11)
• Multi-period work scheduling problem (3.12)
• Transportation problem (7.1)
• Assignment problem (7.5)
• Transshipment problem (7.6)
12
Example 7.11
A transportation problem (7.11)
• Consider a car producer with manufacturing
plants in Los Angeles, Detroit, and New Orleans.
• The distribution centers are located in Denver
and Miami.
14
Transportation: variables
Define
Denver Miami
xij = number of cars that is transported from
Los 1000 2690
plant i to distribution centre j Angeles
Detroit 1250 1350
( i = 1. Los Angeles, 2. Detroit, 3. New Orleans,
New 1275 850
j = 1. Denver, 2. Miami ) Orleans
15
Transportation: variables
Define
Denver Miami
xij = number of cars that is transported from
Los 1000 2690
plant i to distribution centre j Angeles
Detroit 1250 1350
( i = 1. Los Angeles, 2. Detroit, 3. New Orleans,
New 1275 850
j = 1. Denver, 2. Miami ) Orleans
Constraint:
No plant can transport more cars than its capacity
x11 + x12 ≤ 1000 [LA]
x21 + x22 ≤ 1500 [Detroit]
x31 + x32 ≤ 1200 [New Orleans]
16
Transportation: variables
Define
Denver Miami
xij = number of cars that is transported from
Los 1000 2690
plant i to distribution centre j Angeles
Detroit 1250 1350
( i = 1. Los Angeles, 2. Detroit, 3. New Orleans,
New 1275 850
j = 1. Denver, 2. Miami ) Orleans
Constraint:
Each distribution centre receives at least the required number of cars
x11 + x21 + x31 ≥ 2300 [ Denver ]
x12 + x22 + x32 ≥ 1400 [ Miami ]
17
Transportation: variables
Define
Denver Miami
xij = number of cars that is transported from
Los 1000 2690
plant i to distribution centre j Angeles
Detroit 1250 1350
( i = 1. Los Angeles, 2. Detroit, 3. New Orleans,
New 1275 850
j = 1. Denver, 2. Miami ) Orleans
Objective:
Total transportation costs? Σ (number of miles) * $5 * number of cars
18
Transportation: variables
Define
Denver Miami
xij = number of cars that is transported from
Los 1000 2690
plant i to distribution centre j Angeles
Detroit 1250 1350
( i = 1. Los Angeles, 2. Detroit, 3. New Orleans,
New 1275 850
j = 1. Denver, 2. Miami ) Orleans
supply demand
Terminology:
• there are n sources, each with supply ai, and
there are m destinations, each with demand bj,
• for each source-destination pair, a cost cij is given. 21
Transportation problem
$ &
! 𝑎! ≥ ! 𝑏%
!"# %"#
$ &
• If total supply equals total demand we
! 𝑎! = ! 𝑏%
say that the transportation problem is !"# %"#
balanced.
22