Академический Документы
Профессиональный Документы
Культура Документы
PROGRAMMING
Saurabh Chandra
Limitations of LP
Variables are continuous.
Cannot handle Discrete/ Integer variables.
LP vs. IP
Maximize cjxj
aijxj bi
i = 1,2,... m
xj 0
j = 1,2,....n
(LP)
Maximize cjxj
aijxj bi
i = 1,2,... m
(IP)
x1.x2 = 0
x1 + x2 <= 1
Is it linear?
Capital Budgeting
Which projects to invest in so as to maximize total return.
Continuous Variables
Integer Variables
Problem 8.
xij electricity generated by generator i in shift j
yij = 1 if generator i is used in shift j
zi = 1 if generator i is started
Objective: Minimize Total cost: Startup Cost + Fixed Cost + Var. Cost
Minimize
Sizi + ijFiyij + ijvixij
Demand should be met in each shift
ixij Dj
j
Generation should not exceed capacity
xij Ci
xij cannot be positive unless yij is 1
xij Ciyij
ij
ij
Enumeration Approach
Since there are a finite number of IP solutions,
List all possible solution
Determine cost of each one
Pick the least costly as the optimum solution.
Is it a practical approach?
Consider 10 binary variables:
No. of possible solutions: 210 = 1024
Incumbent Solution
As the sets are sub-divided, for some of them LP solution will be integral (Why?)
Keep track of the best integer solution that you come across.
The current best known integer solution is the incumbent solution.
As and when a better integer solution is found, the incumbent is updated.
ZINC is the value of incumbent solution.
ZINC provides
a upper bound on the optimum IP solution (Minimization Problem)
a lower bound on the optimum IP solution (Maximization Problem)
75.3
x1 4
68.5
Lamps
2
6
$600
Fans
3
5
$700
Hours
12
30
Harrison Electric
Decision Variables
L = number of lamps
F = number of ceiling
Integer values
Harrison Electric
Objective function
Maximize profit = $600L + $700F
subject to
2L + 3F 12 (wiring hours)
6L + 5F 30 (assembly hours)
L, F 0
Graphical Solution
6
F
5
Rounded-off IP Solution
(L = 4, F = 2, Infeasible)
+
2
1
Nearest Feasible
Rounded-off IP Solution
(L = 4, F = 1, Profit = $3,100)
0
Optimal IP Solution
(L = 3.75, F = 1.50, Profit = $3,300)
2L + 3F 12
|
Integer Solutions
LAMPS (L)
0
1
2
3
4
5
0
1
2
3
4
0
1
2
3
0
1
0
0
0
0
0
0
0
1
1
1
1
1
2
2
2
2
3
3
4
Solver Options
Solver Options
Binary Variables
EXPECTED
ANNUAL RETURN
(IN THOUSANDS)
COST FOR
BLOCK OF SHARES
(IN THOUSANDS)
$ 50
$ 80
$ 90
$120
$110
$ 40
$ 75
$ 480
$ 540
$ 680
$1,000
$ 700
$ 510
$ 900
Decision Variables
T = 1 if Trans-Texas Oil is included in the portfolio
= 0 if Trans-Texas Oil is not included in the portfolio
Similarly
B (British Petro),
D (Dutch Shell),
H (Houston Oil),
L (Lone Star Petro),
S (San Diego Oil), and
C (California Petro)
Binary Requirements
Binary Requirements
Sussex County
TO
FROM
15
20
35
35
45
40
15
35
20
35
40
40
20
50
15
50
45
30
35
20
15
35
20
20
35
35
50
35
15
40
45
40
45
20
15
35
40
40
30
20
40
35
Sussex County
A, B, C
A, B, D
A, C, D, G
B, C, D, F, G
E, F
D, E, F
C, D, G
Sussex County
Decision Variables
A = 1 if a clinic is located in community A
= 0 if a clinic is not located in community A
Similarly
B (community B),
C (community C),
D (community D),
E (community E),
F (community F), and
G (community G)
Sussex County
Objective function
Minimize total
number of clinics = A + B + C + D + E + F + G
subject to
A+B+C
A+B+D
A+C+D+G
B+C+D+F+G
E+F
D+E+F
C+D+G
All variables
1
1
1
1
1
1
1
= 0 or 1
(community A is covered)
(community B is covered)
(community C is covered)
(community D is covered)
(community E is covered)
(community F is covered)
(community G is covered)
Screenshot 6-4
Mixed-Integer Models
Hardgrave Machine
MONTHLY
DEMAND PRODUCTION
(UNITS)
PLANT
10,000
12,000
15,000
9,000
46,000
Cincinnati
Kansas City
Pittsburgh
MONTHLY
SUPPLY
COST TO
PRODUCE
ONE UNIT
15,000
6,000
14,000
35,000
$48
$50
$52
Seattle
Birmingham
$53
$49
Hardgrave Machine
DETROIT
HOUSTON
NEW YORK
LOS ANGELES
Cincinnati
$25
$55
$40
$60
Kansas City
$35
$30
$50
$40
Pittsburgh
$36
$45
$26
$66
Seattle
$60
$38
$65
$27
Birmingham
$35
$30
$41
$50
Hardgrave Machine
Hardgrave Machine
Objective function
Minimize
total costs = $73XCD + $103XCH + $88XCN + $108XCL
+ $85XKD + $80XKH + $100XKN + $90XKL
+ $88XPD + $97XPH + $78XPN + $118XPL
+ $113XSD + $91XSH + $118XSN + $80XSL
+ $84XBD + $79XBH + $90XBN + $99XBL
+ $400,000YS + $325,000YB
Hardgrave Machine
subject to
(0) (XCD + XCH + XCN + XCL) = 15,000
(Cincinnati supply)
= 6,000
= 14,000
(Pittsburgh supply)
= 11,000YS
(Seattle supply)
= 11,000YB
(Birmingham supply)
10,000
(Detroit supply)
12,000
(Houston supply)
15,000
9,000
YS + YB
Multiple objectives
Satisfy rather than optimize
Minimize underachievement of goals
Two approaches
Weighted models
Ranked models