linear programming topics general optimization model lp model and assumptions manufacturing example...

27
Linear Programming Topics • General optimization model • LP model and assumptions • Manufacturing example • Characteristics of solutions • Sensitivity analysis • Excel add-ins

Upload: kristina-burns

Post on 30-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Linear Programming

Topics• General optimization model• LP model and assumptions• Manufacturing example• Characteristics of solutions • Sensitivity analysis• Excel add-ins

Page 2: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Most of the deterministic OR models can be formulated as mathematical programs.

"Program" in this context, has to do with a “plan” and not a computer program.

Mathematical Program

Maximize / Minimize z = f (x1,x2,…,xn)

Subject to {

}bi , i =1,…,m

xj ≥ 0, j = 1,…,n

gi(x1,x2,…,xn)

Deterministic OR Models

Page 3: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

• xj are called decision variables. These are things that you control

{

} bi are called structural

(or functional or technological) constraints

• xj ≥ 0 are nonnegativity constraints

• f (x1,x2,…,xn) is the objective function

• gi(x1,x2,…,xn)

Model Components

Page 4: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

(

x1..

nx• A feasible solution x = satisfies all the

constraints (both structural and nonnegativity)

• The objective function ranks the feasible solutions;

call them x1, x2, . . . , xk. The optimal solution is the

best among these. For a minimization objective, we

have z* = min{ f (x1), f (x2), . . . , f (xk) }.

. )

Feasibility and Optimality

Page 5: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

A linear program is a special case of a mathematical program where f(x) and g1(x) ,…, gm(x) are linear functionsLinear Program:

Maximize/Minimize z = c1x1 + c2x2 + • • • + cnxn

Subject to ai1x1 + ai2x2 + • • • + ainxn {} bi , i = 1,…,m

xj uj, j = 1,…,n

xj 0, j = 1,…,n

Linear Programming

Page 6: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

xj uj are called simple bound constraints

x = decision vector = "activity levels"

aij , cj , bi , uj are all known data

goal is to find x = (x1,x2,…,xn)T

(the symbol “ T ” means)

LP Model Components

Page 7: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

(i) proportionality

(ii) additivity linearity

(iii) divisibility

(iv) certainty

Linear Programming Assumptions

Page 8: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

(i) activity j’s contribution to objective function is cjxj

and usage in constraint i is aijxj

both are proportional to the level of activity j

(volume discounts, set-up charges, and nonlinearefficiencies are potential sources of violation)

(ii) 12no “cross terms” such as x1x5 may not

appear in the objective or constraints.

Explanation of LP Assumptions

Page 9: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

(iii) Fractional values for decision variables are permitted

(iv) Data elements aij , cj , bi , uj are known with certainty

• Nonlinear or integer programming models should be used when some subset of assumptions (i), (ii) and (iii) are not satisfied.

• Stochastic models should be used when a problem has significant uncertainties in the data that must be explicitly taken into account [a relaxation of assumption (iv)].

Explanation of LP Assumptions (cont’d)

Page 10: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Product Structure for Manufacturing Example

Revenue:$70/unit

Max sales:60 units/week

Component 3

Revenue:$90/unit

Max sales:100 units/week

P Q

D10 min/unit

D15 min/unit

C9 min/unit

C6 min/unit

B16 min/unit

A20 min/unit

B12 min/unit

A10 min/unit

RM1$20/unit

RM2$20/unit

RM3$20/unit

Purchased part:

$5/unit

Machines A,B,C,DAvailable time: 2400 min/weekOperating expenses: $6000/week

RRevenue:$100/unit

Max sales:40 units/week

Component 1 Component 2

C16 min/unit

Page 11: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Machine data

Product data

P Q R

Revenue per unit $90 100 $70

Material cost per unit $45 $40 $20

Profit per unit $45 $60 $50

Maximum sales 100 40 60

Unit processing times(min)

Availability(min)

Machine \ Product P Q RA 20 10 10 2400B 12 28 16 2400C 15 6 16 2400D 10 15 0 2400

Total processing time 57 59 42

Data for Manufacturing Example

Page 12: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Data Summary P Q

Selling price/unit 90 100

Raw Material cost/unit 45 40

Maximum sales 100 40

Minutes/unit on A 20 10

B 12 28

C 15 6

D 10 15

Machine Availability: 2400 min/wk

Operating Expenses = $6,000/wk (fixed cost)

Decision Variables

xP = # of units of product P to produce per week

xQ = # of units of product Q to produce per week

xR = # of units of product R to produce per week

R

702060

1016160

Structural coefficients

Page 13: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

max z = 45 xP + 60 xQ + 50 xR – 6000 Objective Function

s.t. 20 xP + 2400

12 xP + 28 xQ + 16 xR 2400

15 xP + 6 xQ + 16 xR 2400

10 xP + 15 xQ + 0 xR 2400

demand

Are we done? nonnegativity

Structuralconstraints

xP 0, xQ 0, xR 0

xP 100, xQ 40, xR 60

10 xQ + 10 xR

Are the LP assumptionsvalid for this problem?

Optimal solution x *P = 81.82, x*

Q = 16.36, x*R = 60

LP Formulation

Page 14: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

• Optimal objective value is $7,664 but when we subtract the weekly operating expenses of $6,000 we obtain a weekly profit of $1,664.

• Machines A & B are being used at maximum level and are bottlenecks.

• There is slack production capacity in Machines C & D.

How would we solve model using Excel Add-ins ?

Discussion of Results for Manufacturing Example

Page 15: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Solution to Manufacturing Example

Linear Model Name: PQR Solver: J ensen LP/IP Ph. 1 Iter. 0

TRUE Type: LP1 Type: Linear Total Iter. 4FALSE Change Goal: Max Sens.: Yes Comp. Time 00:00TRUE Objective: 7663.6 Side: No Status OptimalFALSE Solve Select the Relink Buttons command from the OR_MM menu before clicking a button. FALSE Variables 1 2 3

100 Change Relation Name: P Q R100 Values: 81.818 16.364 600 Lower Bounds: 0 0 060 Upper Bounds: 100 40 60

Linear Obj. Coef.: 45 60 50Constraints

Num. Name Value Rel. RHS Linear Constraint Coefficients1 MachA 2400 <= 2400 20 10 102 MachB 2400 <= 2400 12 28 163 MachC 2285.5 <= 2400 15 6 164 MachD 1063.6 <= 2400 10 15 0

Linear Model Name: PQR Solver: J ensen LP/IP Ph. 1 Iter. 8

Page 16: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.)

1. Plot each constraint as an equation and then decide whichside of the line is feasible (if it’s an inequality).

2. Find the feasible region.

3. Plot two iso-profit (or iso-cost) lines.

4. Imagine sliding the iso-profit line in the improving direction. The “last point touched” as the iso-profit line leaves the feasible region region is optimal.

Characteristics of Solutions to LPs

Page 17: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Two-Dimensional Machine Scheduling Problem -- let xR = 60

max z = 45 xP + 60 xQ + 3000 Objective Function

s.t. 20 xP + 1800

12 xP + 28 xQ 1440

15 xP + 6 xQ 2040

10 xP + 15 xQ 2400

demand

nonnegativity

Structuralconstraints

xP 0, xQ 0

xP 100, xQ 40

10 xQ

Page 18: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

40

80

120

160

200

240

00 40 80 120 160 200 240 280 320 360

P

Q

C B

D

A

Max Q

Max P

Feasible Region for Manufacturing Example

Page 19: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Iso-Profit Lines and Optimal Solution for Example

B0

20

40

60

80

100

120

0 10 20 30 40 50

A

Max Q

P

Q60

Z = $3600

Z = $4664

Optimal solution = (16.36, 81.82)

Page 20: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

3. Infeasible : feasible region is empty; e.g., if theconstraints include x1+ x2 6 and x1+ x2 7

4. Unbounded : Max 15x1+ 7x2 (no finite optimal solution)s.t.

2. Multiple optimal solutions : Max 3x1 + 3x2

s.t. x1+ x2 1x1, x2 0

1. Unique Optimal Solution

Note: multiple optimal solutions occur in many practical (real-world) LPs.

x1 + x2 1x1, x2 0

Possible Outcomes of an LP

Page 21: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Example with Multiple Optimal Solutions

100

1

x1

x2

2 3 4

2

3

4

z1 z2 z3Maximize z = 3x1 – x2

subject to 15x1 – 5x2 ≤ 30

10x1 + 30x2 ≤ 120

x1≥ 0, x2 ≥ 0

Page 22: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Bounded Objective Function with Unbound Feasible Region

100

1

x1

x2

2 3 4

2

3

4z1

z2

z3

Maximize z = –x1 + x2

subject to –x1 + 4x2 ≤ 10

–3x1 + 2x2 ≤ 2

x1 ≥ 0, x2 ≥ 0

Page 23: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

100

1

x1

x2

2 3 4

2

3

4

0–1x1

x2

–2

–3

–4

0

–1

–3 –2–4

Inconsistent constraint system

Maximize z = x1 + x2

subject to x1 – 2x2 ≥ 0

–x1 +x2 ≥ 1

x1 ≥ 0, x2 ≥ 0

Constraint system allowing only nonpositive values for x1 and x2

Maximize z = x1 + x2

subject to 3x1 + x2 ≥ 6

3x1 + x2 ≤ 3

x1 ≥ 0, x2 ≥ 0

Page 24: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Shadow Price (dual variable) on Constraint i

Amount object function changes with unit increase in RHS, all other coefficients held constant

Objective Function Coefficient Ranging

Allowable increase & decrease for which current optimal solution is valid

RHS Ranging

Allowable increase & decrease for which shadow prices remain valid

Sensitivity Analysis

Page 25: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Solution to Manufacturing Example

Linear Model Name: PQR Solver: J ensen LP/IP Ph. 1 Iter. 0

TRUE Type: LP1 Type: Linear Total Iter. 4FALSE Change Goal: Max Sens.: Yes Comp. Time 00:00TRUE Objective: 7663.6 Side: No Status OptimalFALSE Solve Select the Relink Buttons command from the OR_MM menu before clicking a button. FALSE Variables 1 2 3

100 Change Relation Name: P Q R100 Values: 81.818 16.364 600 Lower Bounds: 0 0 060 Upper Bounds: 100 40 60

Linear Obj. Coef.: 45 60 50Constraints

Num. Name Value Rel. RHS Linear Constraint Coefficients1 MachA 2400 <= 2400 20 10 102 MachB 2400 <= 2400 12 28 163 MachC 2285.5 <= 2400 15 6 164 MachD 1063.6 <= 2400 10 15 0

Linear Model Name: PQR Solver: J ensen LP/IP Ph. 1 Iter. 8

Page 26: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

Microsoft Excel 9.0 Sensitivity ReportWorksheet: [ch02.xls]PQR_SReport Created: 5/5/2002 8:08:50 PM

Adjustable CellsFinal Reduced Objective Allowable Allowable

Cell Name Value Cost Coefficient Increase Decrease$H$8 Values: P 81.81818182 0 45 38.33333333 19.28571429$I$8 Values: Q 16.36363636 0 60 23 37.5$J $8 Values: R 60 10.45454545 50 1E+30 10.45454545

ConstraintsFinal Shadow Constraint Allowable Allowable

Cell Name Value Price R.H. Side Increase Decrease$D$15 MachA Value 2400 1.227272727 2400 144.8275862 866.6666667$D$16 MachB Value 2400 1.704545455 2400 520 360$D$17 MachC Value 2285.454545 0 2400 1E+30 114.5454545$D$18 MachD Value 1063.636364 0 2400 1E+30 1336.363636

Sensitivity Analysis with Add-ins

Page 27: Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel

What You Should Know About Linear Programming

• What the components of a problem are.• How to formulate a problem.• What the assumptions are underlying an LP.• How to find a solution to a 2-dimensional

problem graphically.• Possible solutions.• How to solve an LP with the Excel add-in.