Вы находитесь на странице: 1из 85

ChaChappterter 22

LiLinearnear PProgrammrogrammiingng

ChaCha pp terter 22 LiLi nearnear PP rogrammrogramm ii ngng

Linear Programming (LP)

1.1. LineaLinearr ProgrammingProgramming (LP)(LP) isis aa mathematicalmathematical procedureprocedure

forfor determiningdetermining optimaloptimal allocationallocation ofof scarcescarce resourcesresources

2.2. LPLP dealsdeals withwith aa classclass ofof programmingprogramming problemsproblems wherewhere bothboth thethe objectiveobjective functionfunction toto bebe optimizedoptimized isis linearlinear andand allall relationsrelations amongamong thethe variablesvariables correspondingcorresponding toto resourcesresources areare linearlinear

3.3. AnyAny LPLP problemproblem consistsconsists ofof anan objectiveobjective functionfunction andand aa

IInn mosmostt cases,cases, consconsttraraiinnttss comecome

fromfrom thethe environmentenvironment inin whichwhich youyou workwork toto achieveachieve youyourr objectiveobjective

sesett ooff consconsttraraiinnttss

Amare Matebu (Dr.) BDU IOT

Some of the major application areas to which LP can be applied are:

Work scheduling Production planning & Production process Capital budgeting Financial planning Blending (e.g. Oil refinery management)

Farm planning Distribution Multi-period decision problems

Inventory model

Financial models

Work scheduling

Amare Matebu (Dr.) BDU IOT

Facility Location Decisions LP as a “What-If” Tool Amare Matebu (Dr.) ‐ BDU IOT
Facility Location Decisions LP as a “What-If” Tool Amare Matebu (Dr.) ‐ BDU IOT

Facility Location Decisions LP as a “What-If” Tool

Amare Matebu (Dr.) BDU IOT

Facility Location Problem

LP-based techniques can be used to locate manufacturing facilities, distribution centres, warehouse/storage facilities etc. taking into consideration factors such as facility/distribution capacities, customer demand, budget constraints, quality of service to customers etc.

Amare Matebu (Dr.) BDU IOT

Linear Programming Model

Objective: the goal of an LP model is maximization or minimization Decision variables: amounts of either inputs or outputs Feasible solution space: the set of all feasible combinations of decision variables as defined by the constraints Constraints: limitations that restrict the available

alternatives Parameters: numerical values

Amare Matebu (Dr.) BDU IOT

Linear Programming Assumptions

Linearity: the impact of decision variables is linear in constraints and objective function. Divisibility: non-integer values of decision variables are acceptable. Certainty: values of parameters are known and constant. Non-negativity: negative values of decision variables are unacceptable.

Amare Matebu (Dr.) BDU IOT

2. Linear programming (LP)

Formulation of a LP Model 1.1.IdentifIdentifyy thethe decisiondecision variablesvariables andand exexppressress themthem inin

algebraicalgebraic symbols.symbols. (like(like XX11,, XX22,, etcetc

))

aallll ththee consconsttraraiinnttss oror lilimmititaatitionsons anandd

expressexpress asas equationsequations (scares(scares resourcesresources likelike time,time, labor,labor, rawraw materialsmaterials etcetc ……)) 33 IdentifIdentifyy thethe ObjectiveObjective FunctionFunction andand exexppressress itit asas aa linearlinear functionfunction (the(the decisiondecision makermaker wantwant toto achieveachieve it)it)

22

IdIdenentiftifyy

Amare Matebu (Dr.) BDU IOT

Requirements of a LP Problem

1.1. LPLP problemsproblems seekseek toto maximizemaximize oror minimizeminimize somesome quantityquantity (usually(usually profitprofit oror cost)cost) expresseexpressedd asas anan oobjbjecectitiveve ffuncunctitionon

22

TheThe

constraintsconstraints,, limitslimits thethe dedeggreeree toto whichwhich wewe cancan pursuepursue ourour objective.objective.

presencepresence

ofof

restrictionsrestrictions,,

oror

Amare Matebu (Dr.) BDU IOT

2. Linear programming (LP)

1.1. LPLP modelmodel formulationformulation AnAn LPLP isis oneone ofof thethe bedrocksbedrocks ofof OROR

ItIt isis aa tooltool forfor solvingsolving optimizationoptimization problemsproblems

2.2. AnyAny linearlinear programprogram consistsconsists ofof 44 parts:parts:

aa setset ofof decisiondecision variablesvariables,, thethe objectiveobjective function,function, andand aa setset ofof constraintsconstraints SiSiggnn RestrictionsRestrictions

objectiveobjective function,function, andand aa setset ofof constraintsconstraints SiSi gg nn RestrictionsRestrictions
objectiveobjective function,function, andand aa setset ofof constraintsconstraints SiSi gg nn RestrictionsRestrictions
objectiveobjective function,function, andand aa setset ofof constraintsconstraints SiSi gg nn RestrictionsRestrictions

Amare Matebu (Dr.) BDU IOT

2. Linear programming (LP)

General Mathematical Formulation of LP

Optimize (Maximize or Minimize) Z = c 1 x 1 + c 2 x 2 +…+c n x n Subject to:

a 11 x 1 + a 12 x 2 +…+ a 1n x n (, =, ) a 21 x 1 + a 22 x 2 +…+ a 2n x n (, =, ) .

b 1

b 2

. . a m1 x 1 + a m2 x 2 +…+ a mn x n (, =, ) b m and

.

.

.

.

.

.

.

x 1 , x 2 , …x n 0

Amare Matebu (Dr.) BDU IOT

Example 1 1. The KADISCO company owns a small paint factory that produces both interior and exterior house paints for wholesale distribution. Two basic raw materials, A and B, are used to manufacture the paints. The maximum availability of A is 6 tons a day; that of B is 8 tons a day. The daily requirements of the raw materials per ton of interior and exterior paints are summarized in the following table.

 

Tons of Raw Material per Ton of Paint

 

Exterior

Interior

Maximum Availability (tons)

Raw Material A Raw Material B

1

2

6

2

1

8

A market survey has established that the daily demand for the interior paint cannot exceed that of exterior paint by more than 1 ton. The survey also showed that the maximum demand for the interior paint is limited to 2 tons daily. The wholesale price per kg is $3000 for exterior paint and $2000 per interior paint. How much interior and exterior paint should the company produce daily to maximize gross income?

Amare Matebu (Dr.) BDU IOT

Define X E = Tons of exterior paint to be produced X I = Tons of interior paint to be produced

Maximize Z = 3000X E + 2000X I

Subject to:

X

2X E + X I 8 (2) (availability of raw material B) _X + X 1 (3) (Restriction in production) X I 2 (4) (demand restriction)

+ 2X 6 (1) (availability of raw material A)

E

I

E

I

X E , X I 0

Amare Matebu (Dr.) BDU IOT

LPLP ApplicationsApplications
LPLP ApplicationsApplications

Example 2. Production-Mix Example

DepartmentDepartment

PProrodducuctt

WiWirriingng

DDrrilliillingng

AAssemssemblblyy

IInspecnspectitionon

UUnnitit PProrofitfit

XJ201XJ201

.5.5

33

22

.5.5

$$

99

XM897XM897

1.51.5

11

44

1.01.0

$12$12

TR29TR29

11

55

22

11

55

$15$15

BR788BR788

1.01.0

33

22

.5.5

$11$11

DepartmentDepartment

CapacityCapacity (in(in hours)hours)

ProductProduct

MinimumMinimum ProductionProduction LevelLevel

WiringWiring

11,,500500

XJ201XJ201

150150

DrillingDrilling

2,3502,350

XM897XM897

100100

AssemblyAssembly

2,6002,600

TR29TR29

300300

InspectionInspection

1,2001,200

BR788BR788

400400

Amare Matebu (Dr.) BDU IOT

LP Applications
LP Applications

X 1 = number of units of XJ201 produced X 2 = number of units of XM897 produced X 3 = number of units of TR29 produced X 4 = number of units of BR788 produced

MaximizeMaximize pprofitrofit == 9X9X 11 ++ 12X12X 22 ++ 15X15X 33 ++ 11X11X 44

subject to

.5X 1 + 1.5X 2 + 1.5X 3 +

+ 2X 1 + .5X 1 +

+ 1X 3 +

1X 4 1,500 hours of wiring

2 350 hours of drilling

4

3X

1

1X

+ 4X 2 + 1X 2 +

2

2X

3

, 2X 4 2,600 hours of assembly

3X

.5X 3 + .5X 4 1,200 hours of inspection X 1 150 units of XJ201 X 2 100 units of XM897 X 3 300 units of TR29 XX 44 ≥≥ 400400 ununititss ooff BR788BR788

Amare Matebu (Dr.) BDU IOT

Example 3 : Advertisement

3. Dorian makes luxury cars and jeeps for high-income men and women. It wishes to advertise with 1 minute spots in comedy shows and football games. Each comedy spot costs $50 and is seen by 7M high- income women and 2M high-income men. Each football spot costs $100 and is seen by 2M high- income women and 12M high-income men. How can Dorian reach 28M high-income women and 24M high- income men at the least cost.

Amare Matebu (Dr.) BDU IOT

Amare Matebu (Dr.) ‐ BDU IOT

Amare Matebu (Dr.) BDU IOT

Example 4: Post Office

A PO requires different numbers of employees on different days of the week. Union rules state each employee must work 5 consecutive days and then receive two days off. Find the minimum number of employees needed.

 

Monday

Tuesday

Wednesday

Thursday

Friday

Saturday

Sunday

Staff

17

13

15

19

14

16

11

Needed

Amare Matebu (Dr.) BDU IOT

The decision variables are x i (number of employees starting on day i)

The decision variables are x i (number of emp l oyees starting on d ay i)

Amare Matebu (Dr.) BDU IOT

2. Linear Programming (LP)

Example 5: A Diet Problem Suppose the only foods available in your local store are potatoes and steak. The decision about how much of each food to buy is to made entirely on dietary and economic considerations. We have the nutritional and cost information in the following table:

 

it

P of potatoes

er un

it

of steak

P

er un

Mi

i

n mum

requirements

UnitsUnits ofof carbohydratescarbohydrates UnitsUnits ofof vitaminsvitamins UnitsUnits ofof proteinsproteins UnitUnit costcost

33

11

 

88

44

33

1919

11

33

77

$25$25

$50$50

 
UnitUnit costcost 33 11   88 44 33 1919 11 33 77 $25$25 $50$50  

The problem is to find a diet (a choice of the

numbers of units of the two foods) that meets all

minimum nutritional requirements at minimal

cost. Formulate the problem LP.

Mini {Z = $25X 1 + $50X 2 }

3X 1

4X 1

X 1

+

+

+

X

1

,

X

2

3X 2

3X 2

X

2

8

19

7

0

1 + $50X 2 } 3X 1 4X 1 X 1 + + + X 1

Example 6: Blending Problem

Bryant's Pizza, Inc. is a producer of frozen pizza products. The company makes a net income of $1.00 for each regular pizza and $1.50 for each deluxe pizza produced. The firm currently has 150 pounds of dough mix and 50 pounds of topping mix. Each regular pizza uses 1 pound of dough mix and 4 ounces (16 ounces= 1 pound) of topping mix. Each deluxe pizza uses 1 pound of dough mix and 8 ounces of topping mix. Based on the past demand per week, Bryant can sell at least 50 regular pizzas and at least 25 deluxe pizzas. The problem is to determine the number of regular and deluxe pizzas the company should make to maximize net income. Formulate this problem as an LP problem.

regular and deluxe pizzas the company should make to maximize net income. Formulate this problem as

Solution:

A Blending Problem

Let X1 and X2 be the number of regular and deluxe pizza, then the LP formulation is:

Maximize: { Z = X 1 + 1.5 X 2 }

Subject to:

0.25 X

1

X 1 +

X 2 150

+

0 5 X

.

2

50

X 1 50 X 2 25 X 1 , X 2 0

t t o: 0.25 X 1 X 1 + X 2 ≤ 150 + 0 5

3. Solving Linear programming (LP)

Steps for Graphical Solution A. Corner Point Method 1.Define the problem mathematically 2.Graph by constraints by treating each inequality as equality 3. Locate the feasible region and the corner points 4.Find out the value of objective function at these points 5.Find out the optimal solution and the optimal value of objective function if it exists

Amare Matebu (Dr.) BDU IOT

B. Iso-Profit or Iso-Cost Line Method 1.Define the problem mathematically 2. Graph by constraints by treating each inequality as equality 3. Locate the feasible region and the corner points 4.Draw out a line having the slope of Objective Function Equation (this is called Iso-Cost / Profit Line in Minimization and Maximization problems respectively) somewhere in the middle of the feasible region.

Amare Matebu (Dr.) BDU IOT

3. Solving Linear programming (LP)

Move this line away from origin (in case of Maximization) or towards Origin (in case of Minimization) until it touches the extreme point of the feasible region 6. If a single point is encountered, that reflects optimality and its coordination is the solution. If Iso-Profit/ Cost line coincides with any constraint line at the extreme, then this is the case of multiple optimum solutions.

Amare Matebu (Dr.) BDU IOT

Formulating LP Problems
Formulating LP Problems

Example1. The product-mix problem at Shader Electronics

Two products

1. Shader X-pod, a portable music player

2. Shader BlueBerr y, an internet-connected

color telephone Determine the mix of products that will produce the maximum profit

Amare Matebu (Dr.) BDU IOT

Formulating LP Problems
Formulating LP Problems

Hours Required to Produce 1 Unit

X-pods (X 1 )

BlueBerrys (X 2 )

Available Hours This Week

Department

Electronic

4

3

240

Assembly

2

1

100

Profit per unit

$7

$5

Decision Variables:

X 1 = number of X-pods to be produced X 2 = number of BlueBerrys to be produced

Amare Matebu (Dr.) BDU IOT

FormulatingFormulating LPLP ProblemsProblems
FormulatingFormulating LPLP ProblemsProblems

Objective Function:

Maximize Profit = $7X + $5X

1

2

There are three types of constraints Upper limits where the amount used is ≤ the
There are three types of constraints
Upper limits where the amount used is ≤ the
amount of a resource
Lower limits where the amount used is ≥ the
amount of the resource
Equalities where the amount used is = the
amount of the resource

Amare Matebu (Dr.) BDU IOT

Formulating LP Problems
Formulating LP Problems

First Constraint:

Electronic time used

is

Electronic time available

4X 1 + 3X 2 240 (hours of electronic time)

SecondSecond Constraint:Constraint:

Assembly time used

is

Assembly time available

2X 1 + 1X 2 100 (hours of assembly time)

Amare Matebu (Dr.) BDU IOT

Graphical Solution Can be used when there are two decision
Graphical Solution
Can
be
used
when
there
are
two
decision

variables 1. Plot the constraint equations at their limits by converting each equation to an equality

2. Identify the feasible solution space 3. Create an iso-profit line based on the objective function 4. Move this line outwards until the optimal point is identified

Amare Matebu (Dr.) BDU IOT

GraphicalGraphical SolutionSolution
GraphicalGraphical SolutionSolution

XX 22

100 – – 8080 – – 6060 – Assembly (constraint B) – 4040 – –
100
8080
6060
Assembly (constraint B)
4040
Feasible
2020
region
Electronics (constraint A)
|||||||||||–
XX
11
00
2020
4040
6060
8080
100100
N
um
b
er o
f X
-po
d
s
Number of Blue Berrys

Amare Matebu (Dr.) BDU IOT

Graphical Solution
Graphical Solution

of Watchr Watch TVsTVs

NumbeNumbe r of

XX 22

IsoProfit Line Solution Method

100 –

Choose a possible value for the objective function

8080

AssemblyAssembly (constraint(constraint B)B)

6060

4040

$ 210 = 7X 1 + 5X 2

Solve for the axis intercepts of the function and plot the line

ElectronicsElectronics (constraint(constraint A)A)

2020

Feasible

region

FigureFigure .3.3

|||||||||||–

00

X

2

= 42

2020

4040

X = 30

1

6060

8080

100100

NumberNumber ofof X-X-ppodsods

XX 11

Amare Matebu (Dr.) BDU IOT

Graphical Solution
Graphical Solution

XX 22

100 – – 8080 – – 6060 – $210 = $7X 1 + $5X 2
100
8080
6060
$210 = $7X 1 + $5X 2
(0 , 42)
4040
2020
(30, 0))
|||||||||||–
XX 11
00
2020
4040
6060
8080
100100
Number of X-pods
Figure .4
Number of BlueBe rrys

Amare Matebu (Dr.) BDU IOT

GraphicalGraphical SolutionSolution
GraphicalGraphical SolutionSolution

XX 22

100 – – $350$350 == $7X$7X 11 ++ $$5X 2 8080 – $280$280 == $$7X
100
$350$350 == $7X$7X 11 ++ $$5X 2
8080
$280$280 == $$7X 1 ++ $5X$5X 22
6060
$210 = $7X 1 + $5X 2
4040
$420 = $7X 1 + $5X 2
2020
|||||||||||–
00
2020
4040
6060
8080
100100
Numbe r of Blue Beryys

Number of X-pods

Amare Matebu (Dr.) BDU IOT

XX 11

Figure .5

Graphical Solution
Graphical Solution

X 2

100 – – Maximum profit line 8080 – – 6060 – – Optimal solution point
100 –
Maximum profit line
8080
6060
Optimal solution point
(X 1 = 30, X 2 = 40)
4040
$410 = $7X 1 + $5X 2
2020
|||||||||||–
00
2020
4040
6060
8080
100100
Number
of BlueBe rrys

Number of X-pods

Amare Matebu (Dr.) BDU IOT

X 1

Figure .6

Numb er of Blue Berrys

Corner-Point Method
Corner-Point Method
X 2 100 – – 8080 – – 2 6060 – – 3 4040 –
X 2
100 –
8080
2
6060
3
4040
2020
1
|||||||||||–
00
2020
4040
6060
8080
100100
4

Number of X-pods

Amare Matebu (Dr.) BDU IOT

X 1

Figure .7

CornerCorner--PointPoint MethodMethod
CornerCorner--PointPoint MethodMethod

The optimal value will always be at a corner point

Find the objective function value at each corner point and choose the one with the hi g hest profit

Point 1 :

(X 1 = 0, X 2 = 0)

Profit $7(0) + $5(0) = $0

Point 2 :

(X 1 = 0, X 2 = 80)

Profit $7(0) + $5(80) = $400

Point 4 :

(X 1 = 50, X 2 = 0)

Profit $7(50) + $5(0) = $350

Amare Matebu (Dr.) BDU IOT

Corner-Point Method
Corner-Point Method

Solve for the intersection of two constraints

point

4X

3X

240 (electronics time)

Find the obj ective function value at each corner

1

2

+

point and choose the one with the highest profit

1

+

2

2X

1X

100 (assembly time)

Point 1 :

Po int 2 :

Point 4 :

4X 1

+

3X 2

=

240

- 4X 1

-

2X 2

=

-200

(X 1 = 0, X = 0)

+

1X

2

=

40

2

(X 1 = 0 , X 2 = 80)

(X 1 = 50, X 2 = 0)

4X 1

+

3(40)

=

4X 1

+

120

=

Profit $7(0) + $5(0) = $0

X

1

=

240

240

30

Pro fit $7(0) + $5(80) = $400

Profit $7(50) + $5(0) = $350

Amare Matebu (Dr.) BDU IOT

Corner-Point Method
Corner-Point Method

The optimal value will always be at a corner point

Find the ob j ective function value at each corner point and choose the one with the highest profit

Point 1 :

(X 1 = 0, X 2 = 0)

Profit $ 7(0) + $ 5(0) = $ 0

Point 2 :

(X 1 = 0, X 2 = 80)

Profit $7(0) + $5(80) = $400

Point 4 :

(X 1 = 50, X 2 = 0)

Profit $7(50) + $5(0) = $350

Point 3 :

( X 1 = 30 , X 2 = 40 )

Profit $ 7 ( 30 ) + $ 5 ( 40 ) = $ 410

Amare Matebu (Dr.) BDU IOT

Solving Minimization Problems
Solving Minimization Problems

Formulated and solved in much the same way as maximization problems In the graphical approach an iso-cost line is used The objective is to move the iso-cost line inwards until it reaches the lowest cost corner point

is used Th e obj ec ti ve is to move the i so-cos t li
Example 2: Minimization
Example 2: Minimization

X 1 = number of tons of black-and-white picture chemical produced X 2 = number of tons of color picture chemical produced

Minimize total cost = 2,500X 1 + 3,000X 2 Subject to:

X 1 30 tons of black-and-white chemical

X 2 20 tons of color chemical

X 1 + X 2

60 tons total

X 1 , X 2 $0 non-negativity requirements

20 tons of color chemical X 1 + X 2 ≥ 60 tons total X 1
MinimizationMinimization ExampleExample
MinimizationMinimization ExampleExample

6060

50

4040

30

2020

10

X 2 – X 1 + X 2 = 60 – Feasible – region –
X 2
– X 1 + X 2 = 60
Feasible
region
bb
X 1 = 30
X 2 = 20
aa
||||||| –
00
1010
2020
3030
4040
5050
6060
region – – bb X 1 = 30 – X 2 = 20 aa ||||||| –

X 1

Table .9

4. (LP) Simplex Method

Realistic linear programming problems often have several decision variables and many constraints.

problems

cannot

be

solved

graphically;

Such instead

an

algorithm

such

as

the

simplex

procedures is used.

thus the most effective

analytical method of solving linear programming

problems.

Simplex

method

is

Amare Matebu (Dr.) BDU IOT

The simplex method is an ITERATIVE or “step by step” method or repetitive algebraic approach that moves automatically from one basic feasible solution to another basic feasible solution improving the situation each time until the optimal solution is reached at.

Amare Matebu (Dr.) BDU IOT

4. (LP) Simplex Method

Objective Function Optimize (Max. or Min.) z = Subject to: (Constraints) Σ a ij x j (, =, ) bi ; for j = 1

Σ c j x j for j = 1

n

i = 1,2, …m

n,

(Non negativity restrictions) x j 0 ; j= 1, 2, …, n

Amare Matebu (Dr.) BDU IOT

4. Simplex methods

General Mathematical Formulation of LP Optimize (Maximize or Minimize) Z = c 1 x 1 + c 2 x 2 +…+c n x n Subject to:

a 11 x 1 + a 12 x 2 +…+ a 1n x n (, =, ) b 1 a 21 x 1 + a 22 x 2 +…+ a 2n x n (, =, ) b 2

.

.

a m1 x 1 + am 2 x 2 +…+ a mn x n (, =, ) b m

and

x 1 , x 2 , …x n 0

Amare Matebu (Dr.) BDU IOT

4. (LP) Simplex Method

1. The standard form of LP problem

i. All the constraints should be expressed as equations by slack or surplus and/or artificial variables

ii. The right hand side of each constraint should be made non-negative; if it is not, this should be done by multiplying both sides of the resulting constraint by -1

Example:

2X 1 +3X 2 -4X 3 +X 4 -50, that gives -2X 1 -3X 2 +4X 3 -X 4 50

we multiply both sides by negative

Amare Matebu (Dr.) BDU IOT

4. (LP) Simplex Method

iii. Three types of additional variables, namely a. Slack Variable (S) b. Surplus variable (-S), and c. Artificial variables (A)

are added in the given LP problem to convert it into standard form for two reasons:

To convert an inequality into equation to have a

standard form of an LP

model, and

To get an initial feasible solution represented by the columns of an identity matrix.

Amare Matebu (Dr.) BDU IOT

4. (LP) Simplex Method

The summery of the extra variables needed to add in the given LP problem to convert it into standard form is given below.

Types of

Extra variables to be added

Coefficient of extra variables in the objective function

Presence of variables in the initial solution mix

constraint

 

Max Z

Min Z

 

Add only slack variable

0

0

Yes

Subtract surplus d

var a

i

bl

e an

0

0

No

Add artificial variable

-M

+M

Yes

=

Add artificial variable

-M

+M

Yes

Amare Matebu (Dr.) BDU IOT

4. (LP) Simplex Method

Some Definitions Solution: pertains to the values of decision variables that satisfies constraints Feasible solution: Any solution that also satisfies the non negativity restrictions Basic Solution: For a set of m simultaneous equations in n unknowns (n>m), a solution obtained by setting n- m of the variables equal to zero and solving the m equation in m unknowns is called basic solution.

Amare Matebu (Dr.) BDU IOT

Basic Feasible solution: A feasible solution that is also basic Optimum Feasible solution: Any basic feasible solution which optimizes the objective function Degenerate Solution: when one or more basic variable becomes equal to zero. 2. Test of optimality

i.

ii.

If

all

Z j

-

C

j

>

0, then

the basic

optimal (Maximization case)

C j

optimal (Minimization case)

If

all

Z j

0, then

the basic

-

<

Amare Matebu (Dr.) BDU IOT

feasible solution is

feasible solution is

4. (LP) Simplex Method

3. Variable to enter the basis i. A variable that has the highest negative value in the Z j -C j row (Maximization case) ii. A variable that has the most positive value in the Z j -C j row(Minimization case)

4. Variable to leave the basis The row with the worst negative/largest positive and minimum replacement ratio (or both maximization & minimization cases respectively).

Amare Matebu (Dr.) BDU IOT

4. (LP) Simplex Method

Steps in simplex methods:

Step 1: Formulate LP Model Step 2: Standardize the problem Step 3: Obtain the initial simplex tableau Step 4: check optimality (optimality test) Step 5: Choose the “incoming” or “entering” variables Step 6: Choose the “leaving “or “outgoing” variable Step 7:Repeat step 4-6 till optimum basic feasible solution is obtained. Or go to step 3 and repeat the procedure until all entries in the C j – Z j row are either negative or zero.

Amare Matebu (Dr.) BDU IOT

4. (LP) Simplex Method

Example:1

Solve the problem using the simplex approach Max. Z=300x 1 +250x 2

Subject to:

2x 1 + x 2 < 40

x 1 +3x 2 <

x 1 x 1 ,

< 45

12

> 0

x 2

(Labor ) (Machine) (Marketing)

Example:2 Simplex Method

Amare Matebu (Dr.) BDU IOT

5. Big M-method

Minimize Z with inequalities of constraints in “> “form.

There are two methods to solve minimization LP problems:

1. Direct method/Big M-method/: Using artificial variables 2. Conversion method: Minimization by maximizing the dual

Amare Matebu (Dr.) BDU IOT

Surplus Variable (-s):

- A variable inserted in a greater than or equal to constraint to create equality. It represents the amount of resource usage above the minimum required usage.

Surplus variable is subtracted from a > constraint in the process of converting the constraint to standard form. Neither the slack nor the surplus is negative value. They must be positive or zero.

-

Amare Matebu (Dr.) BDU IOT

5. Big M-method

Example: let us consider 5x 1 +2x 2 20

When x 1 = 4.5 and x 2 = 2 ==>5(4.5)+2(2)-s = 20 ==> s=11

When x 1 = 2 and x 2 = 5 ==>

s= 0

But when x 1 = 0 and x 2 = 0 (No production) ==> s = -20 (This is mathematically unaccepted). Thus, in order to avoid the mathematical contradiction, we have to add artificial variable (A) Artificial variable (A): Artificial variable is a variable that has no meaning in a physical sense but acts as a tool to create an initial feasible LP solution.

Amare Matebu (Dr.) BDU IOT

Note that:

Type of constrain

To put into standard form

----------------------- Add a slack variable = ----------------------- Add an artificial variable ---------------------- Subtract a surplus variable & add artificial variable

Amare Matebu (Dr.) BDU IOT

5. Big M-method

Following are the characteristics of Big-M Method:

1. High penalty cost (or profit) is assumed as M

2.

M

is

assigned to artificial

objective function Z.

Amare Matebu (Dr.) BDU IOT

variable

A

in

the

3. Big-M method can be applied to minimization as well as maximization problems with the following distinctions:

Minimization problems: -Assign +M as coefficient of artificial variable A in an objective function Z. Maximization problems: -Here –M is assigned as coefficient of artificial variable A in the objective function Z.

Amare Matebu (Dr.) BDU IOT

5. Big M-method

4. Coefficient of S (slack/surplus) takes zero values in the objective function Z

5. For minimization problem, the incoming variable corresponds to a highest positive value of Z j - C j .

6. Solution is optimal when all the values of Z - C non positive (For minimization case)

j

j

Amare Matebu (Dr.) BDU IOT

Example 1: Big method

The ABC printing company is facing a tight financial squeeze and is attempting to cut costs wherever possible. At present it has only one printing contract, and luckily the book is selling well in both the hardcover and paper back editions. It has just received a request to print more copies of this book in either the hardcover or paperback form. The printing cost for hardcover books is birr 600 per 100 while that for paperback is only birr 500 per 100. Although the company is attempting to economize, it does not wish to lay off any employee. Therefore, it feels oblized to run its two printing presses at least 80 and 60 hours per week, respectively. Press I can produce 100 hardcover books in 2 hours or 100 paperback books in 1 hour. Press II can produce 100 hardcover books in 1 hour or 100 paperbacks books in 2 hours. Determine how many books of each type should be printed in order to minimize costs.

Amare Matebu (Dr.) BDU IOT

Example 2 : Big - method

Minimize

Z= 25x 1 +30x 2

Subject to:

20x 1 +15x 2 > 100

2x 1 + 3x 2

x 1 , x 2

> 15

> 0

Amare Matebu (Dr.) BDU IOT

6. Duality and Sensitivity

Every LP has another LP associated with it, which is called its dual. The first way of starting a linear problem is called the primal of the problem. The second way of starting the same problem is called the dual. The optimal solutions for the primal and the dual are equivalent, but they are derived through alternative procedures.

Amare Matebu (Dr.) BDU IOT

6.1 Primal and Duality

The dual contains economic information useful to management, and it may also be easier to solve, in terms of less computation than the primal problem. Corresponding to every LP, there is another LP. The given problem is called the primal.

the given problem is

The related

problem

to

known as the dual.

Amare Matebu (Dr.) BDU IOT

The dual of a dual is the primal If the primal has optimal solution ,the dual will have optimal solution If the primal has no optimal solution, the dual will not have optimal solution. Whether we follow the dual or primal system, the optimal solution will remain equal.

Amare Matebu (Dr.) BDU IOT

6.1 Primal and Duality

Primal

Dual

Objective is minimization

Objective is maximization & vice versa

type constraints

type constraints

Number of columns

Number of rows

Number of rows

Number of columns

Number of decision variables

Number of constraints

Number of constraints

Number of decision variables

Coefficient of objective function

RHS value

RHS values

Coefficient of objective function

Amare Matebu (Dr.) BDU IOT

Finding the Dual of an LP

Define the variables for a max problem to be z,

x 1 , x 2 , …,x n an

d

t

h

i

e var a

bl

es

be w, y 1 , y 2 , …, y n .

f

i

or a m n pro

bl

em to

Finding the dual to a max problem in which all

the variables are required to be nonnegative and all

the constraints are constraints (called normal max

problem) is shown on the next slide.

Amare Matebu (Dr.) BDU IOT

max z =c 1 x 1 + c 2 x 2 +…+ c n x
max z =c 1 x 1 + c 2 x 2 +…+ c n x n
s.t.
a 11 x 1 + a 12 x 2 + … + a 1n x n
≤ b 1
a 21 x 1 + a 22 x 2 + … + a 2n x n
≤ b 2
… …
a m1 x 1 + a m2 x 2 + …
+ a mn x n ≤ b m
x j ≥ 0 (j = 1, 2, …,n)
min w = b 1 y 1 + b 2 y 2 +…+ b m y m
s.t.
a 11 y 1 + a 21 y 2 + … + a m1 y m ≥
c 1
a 12 y 1 + a 22 y 2 + … + a m2 y m ≥
c 2
a 1n y 1 + a 2n y 2 + …+ a mn y m ≥ c n
y i ≥ 0 (i = 1, 2, …,m)

Finding the Dual of an LP

N

l

orma max pro

bl

em

It’s dual

Normal min problem

It’s dual

Amare Matebu (Dr.) BDU IOT

Economic Interpretation of the Dual Problem

Example: A Dakota work shop want to produce desk, table, and chair with the available resource of: Timber, Finishing hours and carpenter hours as revised in the table below. The selling price and available resources are also revised in the table. Formulate the this problem as Primal and Dual Problem?

Resource

Desk

Table

Chair

Availability

Timmber

8

board ft

6 board ft

1 board ft 1.5 hours 0.5 hours

48

boards fit

Finishing

4

hours

2 hours

20

hours

Carpentry

2

hours

1.5 hours

8 hours

Selling price

$60

$30

$20

 

Amare Matebu (Dr.) BDU IOT

Interpreting the Dual of the Dakota (Max) Problem The primal is: max z = 60x
Interpreting the Dual of the Dakota (Max) Problem
The primal is: max z = 60x 1 + 30x 2 + 20x 3
s .t. 8x + 6x + x ≤ 48 (Timber constraint)
1
2
3
4x 1 + 2x 2 + 1.5x 3 ≤ 20 (Finishing constraint)
2x 1 + 1 5x + 0 5x
.
. ≤ 8 (Carpentry constraint)
2
3
x 1 , x 2 , x 3 ≥ 0
The dual is: min w = 48y 1 + 20y 2 + 8y 3 s.t.
The dual is: min w = 48y 1 + 20y 2 + 8y 3
s.t. 8y 1 + 4y 2 + 2y 3 ≥ 60
(Desk constraint)
6y 1 + 2y 2 + 1.5y 3 ≥ 30
(Table constraint)
y 1 + 1.5y 2 + 0.5y 3 ≥ 20
(Chair constraint)
y 1 , y 2 , y 3 ≥ 0

Amare Matebu (Dr.) BDU IOT

Economic Interpretation of the Dual Problem

The first dual constraint is associated with desks, the second with tables, and the third with chairs. Decision variable y 1 is associated with Timber, y 2 with finishing hours, and y 3 with carpentry hours. Suppose an entrepreneur wants to purchase all of Dakota’s resources. The entrepreneur must determine the price he or she is willing to pay for a unit of each of Dakota’s resources.

Amare Matebu (Dr.) BDU IOT

To determine these prices we define :

y 1 = price paid for 1 boards ft of lumber

y 2 = price paid for 1 finishing hour

y

i

3 = pr ce pa

id f

or

1

carpentry

h

our

The resource

prices

y 1 ,

y 2 ,

and

y 3

should

be

determined by solving the Dakota dual.

Amare Matebu (Dr.) BDU IOT

The total

price that should be paid for these

resources is 48 y 1 + 20y 2 + 8y 3 . Since the cost of

purchasing the resources is to minimized:

Min w = 48y

for Dakota dual.

20

1 +

y 2 +

8

y

3

i

s t

h

e o

b

i

ject ve

f

i

unct on

In setting resource prices, the prices must be high

enough to induce Dakota to sell.

Amare Matebu (Dr.) BDU IOT

For example, the entrepreneur must offer Dakota at least $60 for a combination of resources that includes 8 board feet of timber, 4 finishing hours, and 2 carpentry hours because Dakota could, if it wished, use the resources to produce a desk that could be sold for $60. Since the entrepreneur is offering 8y 1 + 4y 2 + 2y 3 for the resources used to and

produce a desk, he or she must chose y

1 , y 2 ,

y 3 to satisfy:

8y 1 + 4y 2 +

2y 3 60.

Amare Matebu (Dr.) BDU IOT

Economic Interpretation of the Dual Problem

Similar reasoning shows that at least $30 must be paid for the resources used to produce a table. Thus y 1 , y 2 , and y 3 must satisfy: 6y 1 + 2y 2 + 1.5y 3 30 Likewise, at least $20 must be paid for the combination of resources used to produce one chair. Thus y 1 , y 2 , and y 3 must satisfy: y 1 + 1.5y 2 + 0.5y 3 20 The solution to the Dakota dual yields prices for timber, finishing hours, and carpentry hours.

Amare Matebu (Dr.) BDU IOT

In summary, when the primal is a normal max problem, the dual variables are related
In summary, when the primal is a normal max
problem, the dual variables are related to the value
of resources available to the decision maker. For
this reason, dual variables are often referred to as
resource shadow prices.

Amare Matebu (Dr.) BDU IOT

6.2 Sensitivity Analysis

In an LP model, the input data (also known as parameters) such as:

i) Profit (cost) contribution C j per unit of decision variable ii) Availability of resources (b ) iii) Consumption of resources per unit of decision variables (a ij ) are assumed constant and known with certainty during a planning period.

j

Amare Matebu (Dr.) BDU IOT

However, in real-world situations some data may change over time because of the dynamic nature of business: such changes in any of these parameters may raise doubt on the validity of the optimal solution of the given LP model. Thus, the decision maker in such situation would like to know how sensitive the optimal solution