You are on page 1of 30

Linear Programming - Examples

Instructors - . Krca and H. Sral

Revised - 2
PRODUCT MIX PROBLEM
Five types of electronic equipment (A, B, C, D, and E) are
produced by using different components with different
quantities.
Component usages:
Component
Resistor
Capacitator
Transformer
Speaker
Transistor

A
3
2
1
1
2

B
4
3
1
1
3

Product
C
0
2
1
0
2

D
3
2
1
0
4

E
5
6
2
2
8

Availability(unit)
2000
1800
750
500
2250

Demand for the products(units):


Product
Max Sales
Profit ($)/unit

A
200
2

B
150
4

C
50
8

D
400
6

E
500
2

OBJECTIVE: Max total profit


D.V.s: Quantity of each product (A, B, C, D, E) to be produced.
CONSTRAINTS:
1. Component availability should not be exceeded (Capacity).
2. Demand for each product should not be exceeded.

Em505, Fall 2012 - Chapter 3

Page 1

Linear Programming - Examples


Instructors - . Krca and H. Sral

xj: quantity of each product (A, B, C, D, and E) to be produced


(j=1, 2, 3, 4, and 5).

Max Z= 2x1+4x2+8x3+6x4+2x5
S.t.:
3x1+4x2+0x3+3x4+5x5 2000

(Resistor)

2x1+3x2+2x3+2x4+6x5 1800

(Capacitator)

1x1+1x2+1x3+1x4+2x5 750

(Transformer)

1x1+1x2+0x3+0x4+2x5 500

(Speaker)

2x1+3x2+2x3+4x4+8x5 2250

(Transistor)

x1200
x2150
x350
x4400
x5500
xj0

Em505, Fall 2012 - Chapter 3

Page 2

Linear Programming - Examples


Instructors - . Krca and H. Sral

LINDO:
MAX

2 X1 + 4 X2 + 8 X3 + 6 X4 + 2 X5

SUBJECT TO
RES) 3 X1 + 4 X2 + 3 X4 + 5 X5 <= 2000
CAP) 2 X1 + 3 X2 + 2 X3 + 2 X4 + 6 X5 <= 1800
TRF) X1 + X2 + X3 + X4 + 2 X5 <= 750
SPK) X1 + X2 + 2 X5 <= 500
TRS) 2 X1 + 3 X2 + 2 X3 + 4 X4 + 8 X5 <= 2250
DEM1) X1 <= 200
DEM2) X2 <= 150
DEM3) X3 <= 50
DEM4) X4 <= 400
DEM5) X5 <= 500
END

Em505, Fall 2012 - Chapter 3

Page 3

Linear Programming - Examples


Instructors - . Krca and H. Sral
LP OPTIMUM FOUND AT STEP

OBJECTIVE FUNCTION VALUE


1)

3500.000

VARIABLE

VALUE

REDUCED COST

X1

50.000000

0.000000

X2

150.000000

0.000000

X3

50.000000

0.000000

X4

400.000000

0.000000

X5

0.000000

6.000000

ROW

SLACK OR SURPLUS

DUAL PRICES

RES)

50.000000

0.000000

CAP)

350.000000

0.000000

TRF)

100.000000

0.000000

SPK)

300.000000

0.000000

TRS)

0.000000

1.000000

DEM1)

150.000000

0.000000

DEM2)

0.000000

1.000000

DEM3)

0.000000

6.000000

DEM4)

0.000000

2.000000

DEM5)

500.000000

0.000000

NO. ITERATIONS=

Em505, Fall 2012 - Chapter 3

Page 4

Linear Programming - Examples


Instructors - . Krca and H. Sral
RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGES


VARIABLE

CURRENT

ALLOWABLE

ALLOWABLE

COEF

INCREASE

DECREASE

X1

2.000000

0.666667

1.500000

X2

4.000000

INFINITY

1.000000

X3

8.000000

INFINITY

6.000000

X4

6.000000

INFINITY

2.000000

X5

2.000000

6.000000

INFINITY

RIGHTHAND SIDE RANGES


ROW

CURRENT

ALLOWABLE

ALLOWABLE

RHS

INCREASE

DECREASE

RES

2000.000000

INFINITY

50.000000

CAP

1800.000000

INFINITY

350.000000

TRF

750.000000

INFINITY

100.000000

SPK

500.000000

INFINITY

300.000000

TRS

2250.000000

33.333332

100.000000

DEM1

200.000000

INFINITY

150.000000

DEM2

150.000000

33.333332

100.000000

DEM3

50.000000

50.000000

16.666666

DEM4

400.000000

25.000000

16.666666

DEM5

500.000000

INFINITY

500.000000

Em505, Fall 2012 - Chapter 3

Page 5

Linear Programming - Examples


Instructors - . Krca and H. Sral

FEED MIX PROBLEM

20,000 broilers (chicken) fed for 8 weeks


Each consume 1 kg feed (in 8 weeks)

Corn

Limestone

Soybeans

Feed

Chicken needs Calcium, Protein, and Fiber.


Limestone
Corn
Soybean

Calcium
.380
.001
.002

Protein
.09
.50

Fiber
.02
.08

TL/kg
.04
.15
.40

- Calcium should be between 0.8 to 1.2% of the mix


- Protein should be at least 22% of the mix
- Fiber should not exceed 5% of the mix

Em505, Fall 2012 - Chapter 3

Page 6

Linear Programming - Examples


Instructors - . Krca and H. Sral

x1= kg of limestone in the mix


x2= kg of corn in the mix
x3= kg of soybeans in the mix
Min Z= 0.04x1+0.15x2+0.40x3
S.t.
1) Calcium:
(0.38x1+0.001x2+0.002x3 )/20000 0.008
0.38x1+0.001x2+0.002x3 160
0.38x1+0.001x2+0.002x3 240
2) Protein:
0.09x2+0.50x3 4400
3) Fiber:
0.02x2+0.08x3 1000
4) Demand:
x1+x2+x3 =20000
xj0

j=1,2,3

Em505, Fall 2012 - Chapter 3

Page 7

Linear Programming - Examples


Instructors - . Krca and H. Sral
MIN
0.04 X1 + 0.15 X2 + 0.4 X3
SUBJECT TO
CAMIN)
0.38 X1 + 0.001 X2 + 0.002 X3 >=
CAMAX)
0.38 X1 + 0.001 X2 + 0.002 X3 <=
PROTEIN)
0.09 X2 + 0.5 X3 >=
4400
FIBER)
0.02 X2 + 0.08 X3 <=
1000
DEM)
X1 + X2 + X3 =
20000
END
LP OPTIMUM FOUND AT STEP

160
240

OBJECTIVE FUNCTION VALUE


1)

4554.309

VARIABLE
X1
X2
X3

VALUE
563.416504
12971.443359
6465.140137

ROW
CAMIN)
CAMAX)
PROTEIN)
FIBER)
DEM)

SLACK OR SURPLUS
80.000000
0.000000
0.000000
223.359924
0.000000

NO. ITERATIONS=

REDUCED COST
0.000000
0.000000
0.000000
DUAL PRICES
0.000000
0.145356
-0.610111
0.000000
-0.095235

RANGES IN WHICH THE BASIS IS UNCHANGED:


VARIABLE
X1
X2
X3
ROW
CAMIN
CAMAX
PROTEIN
FIBER
DEM

CURRENT
COEF
0.040000
0.150000
0.400000

OBJ COEFFICIENT RANGES


ALLOWABLE
ALLOWABLE
INCREASE
DECREASE
0.055122
INFINITY
0.250952
0.045200
0.251111
0.250290

CURRENT
RHS
160.000000
240.000000
4400.000000
1000.000000
20000.000000

RIGHTHAND SIDE RANGES


ALLOWABLE
ALLOWABLE
INCREASE
DECREASE
80.000000
INFINITY
4033.600098
80.000000
1525.834839
2652.242676
INFINITY
223.359924
29391.812500
10614.736328

Em505, Fall 2012 - Chapter 3

Page 8

Linear Programming - Examples


Instructors - . Krca and H. Sral

Alternative formulation: Prepare 1 kg. (portion)


x1= fraction(kg) of limestone in the 1 kg mix
x2= fraction(kg) of corn in the 1 kg mix
x2= fraction(kg) of soybeans in the 1 kg mix
Min Z= 0.04x1+0.15x2+0.40x3
S.t.
1) Calcium:
0.38x1+0.001x2+0.002x3 0.08
0.38x1+0.001x2+0.002x3 0.012
2) Protein:
0.09x2+0.50x3 0.22
3) Fiber:
0.02x2+0.08x3 0.05
4) Demand:
x1+x2+x3 =1
xj0

j=1,2,3

Em505, Fall 2012 - Chapter 3

Page 9

Linear Programming - Examples


Instructors - . Krca and H. Sral

TRIMLOSS- CUTTING STOCK PROBLEM


STOCK size L

PARTS (N)

lj: size of part j


dj: units demanded for part j
Paper rolls L=20 ft.

Order (part)
1
2
3

Size (lj) ft.


5
7
9

Demand(dj) units
150
200
300

Patterns
Size (ft)
5
7
9
Loss

1
0
1
1
4

2
2
1
0
3

3
2
0
1
1

4
4
0
0
0

5
1
2
0
1

6
0
0
2
2

xk: number of rolls cut by pattern k


Min Z= 4x1+3x2+1x3+0x4+1x5+2x6
S.t.
0x1+2x2+2x3+4x4+1x5+0x6 150

demand for 5

1x1+1x2+0x3+0x4+2x5+0x6 200

demand for 7

1x1+0x2+1x3+0x4+0x5+2x6 300

demand for 9

xk 0
Em505, Fall 2012 - Chapter 3

Page 10

Linear Programming - Examples


Instructors - . Krca and H. Sral
x1

x2

x3

x4

x5

x6

LHS

RHS

obj

5'

150

7'

200

9'

300

Status
Binding
Binding
Binding

Slack
0
0
0

Microsoft Excel 9.0 Answer Report


Worksheet: [Book1]Sheet1
Report Created: 31.10.2003 10:18:45
Target Cell (Min)
Cell
$H$4

Name
obj
LHS

Original
Value

Final Value
0

400

0
0
0
0
0
0

Final Value
0
0
0
12.5
100
150

Cell Value
150
200
300

Formula
$H$5>=$I$5
$H$6>=$I$6
$H$7>=$I$7

Adjustable Cells
Cell
$B$3
$C$3
$D$3
$E$3
$F$3
$G$3

Name
X x1
X x2
X x3
X x4
X x5
X x6

Constraints
Cell
Name
$H$5 5' LHS
$H$6 7' LHS
$H$7 9' LHS

Original
Value

Em505, Fall 2012 - Chapter 3

Page 11

Linear Programming - Examples


Instructors - . Krca and H. Sral
Microsoft Excel 9.0 Sensitivity Report
Worksheet: [Book1]Sheet1
Report Created: 31.10.2003 10:18:45

Adjustable Cells
Cell
$B$3
$C$3
$D$3
$E$3
$F$3
$G$3

Name
X x1
X x2
X x3
X x4
X x5
X x6

Final
Value
0
0
0
12.5
100
150

Reduced
Cost
2.5
2.5
0
0
0
0

Objective
Coefficient
4
3
1
0
1
2

Allowable
Increase
1E+30
1E+30
1E+30
0
5
0

Allowable
Decrease
2.5
2.5
0
0
1
2

Name
5' LHS
7' LHS
9' LHS

Final
Value
150
200
300

Shadow
Price

Constraint
R.H. Side
150
200
300

Allowable
Increase
1E+30
100
1E+30

Allowable
Decrease
50
200
300

Constraints
Cell
$H$5
$H$6
$H$7

Em505, Fall 2012 - Chapter 3

0
0.5
1

Page 12

Linear Programming - Examples


Instructors - . Krca and H. Sral

WORK (worker) SCHEDULING


Consider a post office. Each worker at the office works 5
consecutive days and takes next 2 days off.
Demand for workers:
1
Monday
17

2
T
13

3
W
15

4
Th
19

5
F
14

6
Sa
16

7
Sunday
11

Minimize the total number of workers hired.


xj: number of workers that start on day j

Min Z = x1+x2+x3+x4+x5+x6+x7
S.t.
M:
T:
W:
Th:
F:
Sa:
Su:

x1
x1
x1
x1
x1

+x4
+x2
+x2
+x2
+x2
+x2

+x3
+x3
+x3
+x3
+x3

+x4
+x4
+x4
+x4

+x5
+x5

+x5
+x5
+x5

+x6
+x6
+x6

+x6
+x6

+x7
+x7
+x7
+x7

+x7

17
13
15
19
14
16
11

xj0 j=1,2,..,7

Em505, Fall 2012 - Chapter 3

Page 13

Linear Programming - Examples


Instructors - . Krca and H. Sral

X1
6.33
Obj
(min)
M
T
W
Th
F
Sa
Su

X2 X3 X4
5 0.33 7.33

1
1
1
1
1
1

1
1
1
1
1
1

1
1
1
1
1

X5 X6
0 3.33

1
1

1
1
1

1
1
1
1

1
1
1

X7
0

1
1
1
1

1
1

1
1
1
1
1

22.33
17.00
14.67
15.00
19.00
19.00
16.00
11.00

>=
>=
>=
>=
>=
>=
>=

17
13
15
19
14
16
11

Microsoft Excel 9.0 Answer Report


Worksheet: [Book1]Sheet1
Report Created: 9/25/00 5:17:02 PM
Target Cell (Min)
Cell
$J$3

Name
Obj
(min)

Original
Value

Final Value
0

22.33333333

0
0
0
0
0
0
0

Final Value
6.333333333
5
0.333333333
7.333333333
0
3.333333333
0

Adjustable Cells
Cell
$B$2
$C$2
$D$2
$E$2
$F$2
$G$2
$H$2

Name
X1
X2
X3
X4
X5
X6
X7

Constraints
Cell
Name
$J$4
M

Original
Value

Cell Value
17

Formula
$J$4>=$L$4
$J$5>=$L$5
$J$6>=$L$6
$J$7>=$L$7

$J$5
$J$6
$J$7

T
W
Th

14.66666667
15
19

$J$8
$J$9
$J$10

F
Sa
Su

19
16
11

Em505, Fall 2012 - Chapter 3

$J$8>=$L$8
$J$9>=$L$9
$J$10>=$L$10

Status
Binding
Not
Binding
Binding
Binding
Not
Binding
Binding
Binding

Slack
0
1.666666667
0
0
5
0
0

Page 14

Linear Programming - Examples


Instructors - . Krca and H. Sral

Cell
$B$2
$C$2
$D$2
$E$2
$F$2
$G$2
$H$2
Constraints
Cell
$J$4
$J$5
$J$6
$J$7
$J$8
$J$9
$J$10

Final

Reduced

Objective

Allowable

Allowable

Name
X1
X2
X3
X4
X5
X6
X7

Value
6.333333
5
0.333333
7.333333
0
3.333333
0

Cost

Increase

Decrease

0
0
0
0
0.33333333
0
0

Coefficient
1
1
1
1
1
1
1

0
0
0
0.5
1E+30
0.5
1E+30

1
0
0
1
0.33333333
1
0

Name
M
T
W
Th
F
Sa
Su

Final
Value
17
14.66667
15
19
19
16
11

Shadow
Price
0.33333333
0
0.33333333
0.33333333
0
0.33333333
0

Constraint
R.H. Side
17
13
15
19
14
16
11

Allowable
Increase
0.5
1.66666667
11
5
5
0.5
1.66666667

Allowable
Decrease
2.5
1E+30
1
1
1E+30
2.5
0.33333333

Integer:
Microsoft Excel 9.0 Answer Report
Worksheet: [worksch1int.xls]Sheet1
Report Created: 14.10.2003 18:32:59

Target Cell (Min)


Cell
Name
Obj
$J$3 (min)

Adjustable Cells
Cell
Name
$B$2 X1
$C$2 X2
$D$2 X3
$E$2 X4
$F$2 X5
$G$2 X6
$H$2 X7

Original Value

Final Value

23

23

Original Value
7
4
0
8
0
4
0

Final Value
7
5
1
6
0
4
0

Em505, Fall 2012 - Chapter 3

Page 15

Linear Programming - Examples


Instructors - . Krca and H. Sral

FINANCIAL PLANNING
- 2 Million dollars available to invest now.
- 3 investment opportunities A, B, C with cash inflows and
outflows over a 3-year horizon. You can invest once for each
alternative at the beginning and the partial investment for an
alternative is possible.
- A period of the horizon is 6-month long.
- Cash inflows from previous investments.
- Cash borrowing (credit) at 7% for six months.
- Cash lending at 6% for six months.
- Total credit borrowed cannot exceed $2M in a period.

Cash flows ($M):


t
Cash inflow
A
B
C

0
2.00
-3.00
-2.00
-2.00

1
0.50
-1.00
-0.50
-2.00

2
0.40
-1.80
1.50
-1.80

3
0.38
0.40
1.50
1.00

4
0.36
1.80
1.50
1.00

5
0.34
1.80
0.20
1.00

6
0.30
5.50
-1.00
6.00

Let:
XA, XB, XC: fraction of investment A,B,C bought respectively
Bt : cash borrowed at the beginning of time t
Lt : cash lent at the beginning of time t
Event happen at the beginning of each period

Em505, Fall 2012 - Chapter 3

Page 16

Linear Programming - Examples


Instructors - . Krca and H. Sral

OUT FLOW

IN FLOW

[T0]

3*XA+2*XB+2*XC+L0

B0+2

[T1]

1.07*B0+L1+XA+0.5*XB+2*XC

1.06*L0+B1+0.5

[T2]

1.07*B1+L2+1.8*XA+1.8*XC

1.06*L1+B2+0.40+1.5*XB

[T3]

1.07*B2+L3

1.06*L2+B3+0.38+0.4*XA+1.5*XB+XC

[T4]

1.07*B3+L4

1.06*L3+B4+0.36+1.8*XA+1.5*XB+XC

[T5]

1.07*B4+L5

1.06*L4+B5+1.8*XA+0.2*XB+XC+0.34

[T6]

1.07*B5+L6+XB

1.06*L5+0.3+5.5*XA+6*XC

[BR0] B02
[BR1] B12
[BR2] B22
[BR3] B32
[BR4] B42
[BR5] B52
[FRA] XA1
[FRB] XB1
[FRC] XC1
MAX Z = L6

All variables are nonnegative

Solution:
XA=0.69
t
Bt
Lt

0
1.38
0

XB=0.655 XC=0

1
2.00
0

2
2.00
0

Em505, Fall 2012 - Chapter 3

3
0.50
0

0
2.05

0
3.89

0
7.57

Page 17

Linear Programming - Examples


Instructors - . Krca and H. Sral
LP OPTIMUM FOUND AT STEP

OBJECTIVE FUNCTION VALUE


1)

7.567981

VARIABLE
L6
XA
XB
XC
L0
B0
L1
B1
L2
B2
L3
B3
L4
B4
L5
B5
ROW
T0)
T1)
T2)
T3)
T4)
T5)
T6)
BR0)
BR1)
BR2)
BR3)
BR4)
BR5)
FRA)
FRB)
FRC)

VALUE
7.567981
0.690919
0.655769
0.000000
0.000000
1.384296
0.000000
2.000000
0.000000
2.000000
0.000000
0.499978
2.052331
0.000000
3.890279
0.000000
SLACK OR SURPLUS
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.615704
0.000000
0.000000
1.500022
2.000000
2.000000
0.309081
0.344231
1.000000

NO. ITERATIONS=

REDUCED COST
0.000000
0.000000
0.000000
0.400744
0.017826
0.000000
0.365497
0.000000
0.062540
0.000000
0.011236
0.000000
0.000000
0.010600
0.000000
0.010000
DUAL PRICES
1.907424
1.782640
1.336927
1.202252
1.123600
1.060000
1.000000
0.000000
0.352128
0.050517
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000

Em505, Fall 2012 - Chapter 3

Page 18

Linear Programming - Examples


Instructors - . Krca and H. Sral
RANGES IN WHICH THE BASIS IS UNCHANGED:
OBJ COEFFICIENT RANGES
VARIABLE
L6
XA
XB
XC
L0
B0
L1
B1
L2
B2
L3
B3
L4
B4
L5
B5

CURRENT
COEF
1.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000

ALLOWABLE
INCREASE
INFINITY
2.941575
0.132797
0.400744
0.017827
0.017958
0.365497
INFINITY
0.062540
INFINITY
0.011236
0.011236
0.010600
0.010600
0.010000
0.010000

ALLOWABLE
DECREASE
1.000000
0.211771
0.618110
INFINITY
INFINITY
0.422384
INFINITY
0.352128
INFINITY
0.050517
INFINITY
0.032693
0.234414
INFINITY
0.236207
INFINITY

RIGHTHAND SIDE RANGES


ROW
T0
T1
T2
T3
T4
T5
T6
BR0
BR1
BR2
BR3
BR4
BR5
FRA
FRB
FRC

CURRENT
RHS
2.000000
0.500000
0.400000
0.380000
0.360000
0.340000
0.300000
2.000000
2.000000
2.000000
2.000000
2.000000
2.000000
1.000000
1.000000
1.000000

Em505, Fall 2012 - Chapter 3

ALLOWABLE
INCREASE
1.567052
0.841235
1.295682
0.499978
INFINITY
INFINITY
INFINITY
INFINITY
0.604248
0.970764
INFINITY
INFINITY
INFINITY
INFINITY
INFINITY
INFINITY

ALLOWABLE
DECREASE
2.376805
1.891358
0.904893
1.500022
2.052331
3.890279
7.567981
0.615704
1.151110
0.323569
1.500022
2.000000
2.000000
0.309081
0.344231
1.000000

Page 19

Linear Programming - Examples


Instructors - . Krca and H. Sral

MULTI-PERIOD PLANNING PROBLEM


-A bicycle company will be manufacturing mens and womens
models for its 10 speed bicycles during the next 2 months.
-Management wants to develop a production schedule indicating how
many bicycles of each model should be produced in each month.
-Demand forecasts call for 150 mens and 125 womens models to be
shipped during the first month and 200 mens and 150 womens
during the second month.

Model
Mens
Womens

Production
Labor Requirements
Current
cost
Production Assembly inventory
$120
2.0 hrs
1.5 hrs
20
$90
1.6 hrs
1.0 hrs
30

-Last month the company used a total of 1000 hours of labor.


Companys policy will not allow the total hours of labor to increase
or decrease by more than 100 hours from month to month.
-The company charges 2% of the unit production cost for a unit
inventory per period. The company would like to have at least 25
units of each model at the end of the 2 months.
What is the minimum cost production schedule?

Em505, Fall 2012 - Chapter 3

Page 20

Linear Programming - Examples


Instructors - . Krca and H. Sral

Let: for i=1,2 and t=1,2


Xit= amount of product i produced in month t
Iit= amount of inventory of product i at the end of month t
Lt= total hours of labor used in month t
INFLOW = OUTFLOW (material balance)
xjt
Month t-1

Ijt-1

Month t

Ijt

Month t+1

djt

MIN Z= 120X11 + 120X12 + 90X21 + 90X22 + 2.4I11 + 2.4I12 + 1.8I21 + 1.8I22


S.T.
P1MEN)

X11 - I11 =

130

P2MEN)

X12 + I11 - I12 = 200

P1WMN)

X21 - I21 =

P2WMN)

X22 + I21 - I22 = 150

MINVMEN)

I12 >= 25

MINVWMN)

I22 >= 25

P1LABOR)

3.5 X11 + 2.6 X21 = L1

P2LABOR)

3.5 X12 + 2.6 X22 = L2

MINL1)

L1 >= 900

MAXL1)

L1 <= 1100

MINL2)

L2- L1 >= - 100

MAXL2)

L2- L1 <= 100

95

All variables are nonnegative

Em505, Fall 2012 - Chapter 3

Page 21

Linear Programming - Examples


Instructors - . Krca and H. Sral

Obj
(min)

x11
192.93

x12
162.07

x21
95.00

x22
175.00

I11
62.93

I12
25.00

I21
0.00

I22
25.00

120

120

90

90

2.4

2.4

1.8

1.8

Constraints
P1Mens
1
P2Mens
P2InvMens
P1Wmns
P2Wmns
P2InvWmns
P1Labor
-3.5
P2Labor
P1LbrLB
P2LbrLB
P1LbrUB
P2LbrUB

-1
1

L2
1022.25
67156.03

-1
1

-1
1

-1
1

-2.6
-3.5

L1
922.25

1
-2.6

1
1
-1
1
-1

1
1

130.00
200.00
25.00
95.00
150.00
25.00
0.00
0.00
922.25
100.00
922.25
100.00

=
=
>=
=
=
>=
=
=
>=
>=
<=
<=

Adjustable Cells
Cell
$B$2
$C$2
$D$2
$E$2
$F$2
$G$2
$H$2
$I$2
$J$2
$K$2

Name
x11
x12
x21
x22
I11
I12
I21
I22
L1
L2

Final
Value
192.93
162.07
95.00
175.00
62.93
25.00
0.00
25.00
922.25
1022.25

Reduced
Cost
0.000
0.000
0.000
0.000
0.000
0.000
0.017
0
0
0

Objective
Coefficient
120
120
90
90
2.4
2.4
1.8
1.8
0
0

Allowable
Increase
0.023
2.400
######
0.017
0.023
######
######
######
######
0.686

Allowable
Decrease
2.40
0.02
0.02
92.69
2.40
123.60
0.02
92.69
0.69
70.63

Final
Value
130.00
200.00
25.00
95.00
150.00
25.00
0.00
0.00
922.25
100.00
922.25
100.00

Shadow
Price
118.800
121.200
123.600
89.109
90.891
92.691
-0.343
0.343
0.000
0.000
0.000
-0.343

Constraint
R.H. Side
130
200
25
95
150
25
0
0
900
-100
1100
100

Allowable
Increase
######
######
######
######
######
######
######
######
22.250
######
######
44.500

Allowable
Decrease
12.71
12.71
12.71
17.12
17.12
17.12
44.50
44.50
#########
#########
177.75
200.00

Constraints
Cell
$L$6
$L$7
$L$8
$L$9
$L$10
$L$11
$L$12
$L$13
$L$14
$L$15
$L$16
$L$17

Name
P1Mens
P2Mens
P2InvMens
P1Wmns
P2Wmns
P2InvWmns
P1Labor
P2Labor
P1LbrLB
P2LbrLB
P1LbrUB
P2LbrUB

Em505, Fall 2012 - Chapter 3

Page 22

130
200
25
95
150
25
0
0
900
-100
1100
100

Linear Programming - Examples


Instructors - . Krca and H. Sral
LP OPTIMUM FOUND AT STEP

OBJECTIVE FUNCTION VALUE


1)

67156.03

ROW
SLACK OR SURPLUS
P1MEN)
0.000000
P2MEN)
0.000000
P1WMN)
0.000000
P2WMN)
0.000000
MINVMEN)
0.000000
MINVWMN)
0.000000
P1LABOR)
0.000000
P2LABOR)
0.000000
MINL1)
22.250000
MAXL1)
177.750000
MINL2)
200.000000
MAXL2)
0.000000
NO. ITERATIONS=
6

DUAL PRICES
-118.800003
-121.199997
-89.108574
-90.891426
-123.599998
-92.691429
-0.342857
0.342857
0.000000
0.000000
0.000000
0.342857

RANGES IN WHICH THE BASIS IS UNCHANGED:

VARIABLE
X11
X12
X21
X22
I11
I12
I21
I22
L1
L2

ROW
P1MEN
P2MEN
P1WMN
P2WMN
MINVMEN
MINVWMN
P1LABOR
P2LABOR
MINL1
MAXL1
MINL2
MAXL2

CURRENT
COEF
120.000000
120.000000
90.000000
90.000000
2.400000
2.400000
1.800000
1.800000
0.000000
0.000000

CURRENT
RHS
130.000000
200.000000
95.000000
150.000000
25.000000
25.000000
0.000000
0.000000
900.000000
1100.000000
-100.000000
100.000000

Em505, Fall 2012 - Chapter 3

OBJ COEFFICIENT RANGES


ALLOWABLE
ALLOWABLE
INCREASE
DECREASE
0.023088
2.400000
2.400000
0.023088
INFINITY
0.017151
0.017151
92.691429
0.023088
2.400000
INFINITY
123.599998
INFINITY
0.017148
INFINITY
92.691429
INFINITY
0.685714
0.685714
70.628571
RIGHTHAND SIDE RANGES
ALLOWABLE
INCREASE
101.571426
101.571426
136.730774
136.730774
101.571426
136.730774
44.500000
44.500000
22.250000
INFINITY
200.000000
44.500000

ALLOWABLE
DECREASE
12.714286
12.714286
17.115385
17.115385
12.714286
17.115385
355.500000
355.500000
INFINITY
177.750000
INFINITY
200.000000

Page 23

Linear Programming - Examples


Instructors - . Krca and H. Sral

REGIONAL PLANNING
One of the interesting social experiments is the system of kibbutzim, or
communal farming communities in Israel.
It is common for groups of kibbutzim to join together to share common
technical services and to coordinate their production. The example
concerns one such group of three kibbutzim, called Southern
Confederation of Kibbutzim (SCK).

T
o
O
O

Overall planning for SCK is done in its technical office. The office
currently is planning agricultural production for the coming year.
The agricultural output of each kibbutz is limited both by:
- amount of available irrigable land
- quantity of water allocated for irrigation (by a national government
official)

Kibbutz
1
2
3

Usable land
(acres)
400
600
300

Em505, Fall 2012 - Chapter 3

Water allocation
(acre feet)
600
800
375
Page 24

Linear Programming - Examples


Instructors - . Krca and H. Sral

The crops suited for this region include sugar beets, cotton, and sorghum,
and these are considered for the upcoming season. These crops differ
primarily in their expected net return/acre and their consumption of
water.

In addition, the Ministry of Agriculture has set a maximum quota for the
total acreage that can be devoted to each of these crops by the SCK.
Crop

Maximum
quota (acres)

Sugar beet
Cotton
Sorghum

600
500
325

Water
consumption
(acre feet/acre)
3
2
1

Net Return
($/acre)
400
300
100

-The three kibbutzim belonging to the SCK have agreed that every kibbutz

will plant the same proportion of its available irrigable land.


-Any combination of the crops may be grown at any of the kibbutzim.
The technical office is to plan how many acres to devote to each crop at the
respective kibbutzim while satisfying the given restrictions.
The objective is to maximize the total net return to SCK.
Max total profit
St.
1) Land availability
2) Water availability
3) Quota
4) Same proportion

Em505, Fall 2012 - Chapter 3

Page 25

Linear Programming - Examples


Instructors - . Krca and H. Sral

Let: kibbutz (i=1,2,3), crop (j=1,2,3)


xij= number of acres allocated in kibbutz i to crop j
K= proportion of land planted by each kibbutz
Max Z = 400(x11+x21+x31) + 300(x12+x22+x32) + 100(x13+x23+x33)
St:
1) Land availability:
[L1]
[L2]
[L3]

x11+x12+x13=400K
x21+x22+x23=600K
x31+x32+x33=300K

2) Water availability:
3x11+2x12+1x13600
3x21+2x22+1x23800
3x31+2x32+1x33375

[W1]
[W2]
[W3]

3) Quota:
x11+x21+x31600
x12+x22+x32500
x13+x23+x33325

[Q1]
[Q2]
[Q3]

4) Same proportion:
[EQ]

K1
xij0

i=1,2,3; j=1,2,3

Em505, Fall 2012 - Chapter 3

Page 26

Linear Programming - Examples


Instructors - . Krca and H. Sral

Solution: K=0.5833
Crop
Sugar beet
Cotton
Sorghum
Total
Variable

1
133.33
100
0
233.33
Value

X11
X21
X31
X12
X22
X32
X13
X23
X33
K

133.3333
100.0000
25.00000
100.0000
250.0000
150.0000
0.000000
0.000000
0.000000
0.5833333

Row
L1
L2
L3
W1
W2
W3
Q1
Q2
Q3
EQ

Slack or Surplus
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
341.6667
0.000000
325.0000
0.4166667

Z=$253,333.3
Kibbutz (acres)
2
3
100
25
250
150
0
0
350
175

Total
258.33
500
0
758.33

Reduced Cost
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
33.33333
33.33333
33.33333
0.000000
Dual Price
0.000000
0.000000
0.000000
133.3333
133.3333
133.3333
0.000000
33.33333
0.000000
0.000000

Righthand Side Ranges:


Row
L1
L2
L3
W1
W2
W3
Q1
Q2
Q3
EQ

Current
RHS
0.0
0.0
0.0
600.0000
800.0000
375.0000
600.0000
500.0000
325.0000
1.000000

Em505, Fall 2012 - Chapter 3

Allowable
Increase
96.29630
92.85714
16.25000
144.4444
162.5000
195.0000
INFINITY
162.5000
INFINITY
INFINITY

Allowable
Decrease
48.14815
54.16667
65.00000
167.7419
144.4444
29.54545
341.6667
325.0000
325.0000
0.4166667

Page 27

Linear Programming - Examples


Instructors - . Krca and H. Sral

FACILITY LOCATION
We want to locate a new facility which will interact with the
existing ones. The cost of interaction is proportional to the
distance.

(4,11)

(14,7)
(x,y)

4
1

(11,2)

(2,1)

Let there be N existing facilities and (ai, bi) be their coordinates.


(x,y): coordinate of the new facility
di(x,y)= distance from facility i to the new facility located at (x,y)

Euclidean:
(straight line)

S. Euclidean:

Em505, Fall 2012 - Chapter 3

]
]

Page 28

Linear Programming - Examples


Instructors - . Krca and H. Sral

(4,11)

(14,7)
(x,y)

4
1

(11,2)

(2,1)

Rectilinear:
(Manhattan)

|ai x|= Max (ai-x , x-ai)


vi ai-x
and
vi x-ai

i=1,,N

similarly:
vi bi-y
and
ui y-bi

i=1,,N

Em505, Fall 2012 - Chapter 3

Page 29

Linear Programming - Examples


Instructors - . Krca and H. Sral

S.t.
vi ai-x

i=1,,N

vi x-ai

i=1,,N

ui bi-y

i=1,,N

ui y-bi

i=1,,N

vi 0 and ui 0

i=1,,N

Alternative formulation:
free means urs
free = free+ - free- and free+ 0, free- 0

]+[

St.

wi: weight of facility i ?


Em505, Fall 2012 - Chapter 3

Page 30

You might also like