Vous êtes sur la page 1sur 14

Linear Programming

Concepts, setup, and solution

Text: Chapters

2, 3, and 4

Outline
Basic concepts; Building LP models; Solver option in Excel; Examples; Interpreting the solutions.

Playing with Lego bricks

6 large bricks

8 small bricks

Build tables and chairs:


- a table requires 2 large and 2 small bricks;
- a chair requires 1 large and 2 small bricks.

Each table brings $20 while each chair brings $15.

How many tables and/or chairs to build to maximize earnings?

Components of the LP model


Objective function: a criterion to be used while evaluating alternative
allocations of the resources.
Decision variables: unknown amount of specic allocation; their values have
to be determined (by solving the LP model).
Constraints: the limitations that restrict the available allocation alternatives.
Parameters: known values most often reecting some technological requirements
LP model: formal representation of the problem build using all of the above.

LP assumptions
Linearity: the impact of decision variables is linear in constraints and objective function;
Divisibility: noninteger values of decision variables are acceptable;
Certainty: values of parameters are known and constant;
Nonnegativity: negative values of decision
variables are unacceptable.

Lego - LP model
Decision variables: unknown number of tables and unknown number of chairs
to build
Constraints: number of available blocks and the specications for construction
of a chair and a table.
Objective function: maximization of the earnings from use of Lego bricks.
LP model
Max $20x1 + $15x2
subject to (s.t.)
2x1 + x2 <= 6
use and availability of large bricks
2x1 + 2x2 <= 8
use and availability of small bricks
x1 >= 0; x2 >= 0

Lego: setup and solution

LP models are solved using Simplex method.


Excel spreadsheet can be used to setup and solve the LP model:



from Tools menu, select Solver option.

LP model needs to be written in spreadsheet in a format acceptable by Solver:



the right hand side (RHS) of a constraint needs to have a value;

all decision variables and parameters and written on the left hand side (LHS).

Lego: Solver setup

Lego: Solver solution

LP: model development


Worksheet: Product Mix: Harry Bartlett is the owner of the Bartlett Nurseries Inc. From the beginning he worked closely with the local agricultural extension service in order to recommend fertilizers to his customers. After extensive soil analyses, he discovered that standard fertilizer blends did not quite match the requirements of Alberta soil conditions. Upon the recommendation of area soil chemists, and in the belief that signicant prots could be made from selling fertilizer, Bartlett began mixing his own blend for sale to local customers. He was fully aware that he would need to minimize his costs in order to compete with commercial fertilizers. Harry's favourite blend was Nitrogrow-X. This fertilizer combined the following chemical compounds containing nitrogen: NG100, NG250, NG350 and NG500. The cost per kilogram for each compound are:
Compound Cost/kg Specications for the Nitrogrow-X blend follow:
NG100 $0.04 fertilizer is packed and sold in 100 kg bags,
NG250 $0.05 NG100 and NG250 can constitute no more than 40% of the blend
NG350 $0.06 NG350 and NG500 must constitute at least 50% of the blend
NG500 $0.08 NG500 must constitute at least 10% of the blend.

Question: What blend of the compound swill enable Bartlett to minimize the cost of a 100-kg bag of fertilizer?

LP model development
Decision variables:

x1 - unknown amount (in kg) of NG100 in a bag

x2 - unknown amount (in kg) of NG250 in a bag

x3 - unknown amount (in kg) of NG350 in a bag

x4 - unknown amount (in kg) of NG500 in a bag
Objective function

min 0.04x1 + 0.05x2 + 0.06x3 + 0.08x4
Constraints
s.t.
x1 + x2 + x3 + x4 = 100
size of a bag
x1 + x2 <= 40

requirement for the amounts of NG100 and NG250 in a bag
x3 + x4 >= 50

requirement for the amounts of NG350 and NG500 in a bag
x4 >= 10


requirement for the amounts of NG500 in a bag
x1 >= 0; x2 >= 0; x3 >= 0; x4 >= 0

Vous aimerez peut-être aussi