02 intro to linear programming

Upload: ailusk

Post on 03-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 02 Intro to Linear Programming

    1/14

    Linear Programming

    Concepts, setup, and solution

    Text: Chapters 2, 3, and 4

  • 7/28/2019 02 Intro to Linear Programming

    2/14

    Outline

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

  • 7/28/2019 02 Intro to Linear Programming

    3/14

    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?

  • 7/28/2019 02 Intro to Linear Programming

    4/14

    Components of the LP model

    Objective function: a criterion to be used while evaluating alternative allocations of the resources.Decision variables: unknown amount of specific allocation; their values have to be determined(by solving the LP model).Constraints: the limitations that restrict the available allocation alternatives.

    LP model:formal representation of the problem build using all of the above.Parameters: known values most often reflecting some technological requirements

  • 7/28/2019 02 Intro to Linear Programming

    5/14

    LP assumptions

    Linearity: the impact of decision variables islinear in constraints and objective function;

    Divisibility: noninteger values of decisionvariables are acceptable;

    Certainty: values of parameters are known andconstant;

    Nonnegativity: negative values of decisionvariables are unacceptable.

  • 7/28/2019 02 Intro to Linear Programming

    6/14

    Lego - LP model

    Decision variables: unknown number oftables and unknown number ofchairsto buildConstraints: number of available blocks and the specifications for constructionof a chair and a table.Objective function: maximization of the earnings from use of Lego bricks.

    LP modelMax $20x1 + $15x2subject to (s.t.)2x1 + x2 = 0

  • 7/28/2019 02 Intro to Linear Programming

    7/14

    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).

  • 7/28/2019 02 Intro to Linear Programming

    8/14

    Lego: Solversetup

  • 7/28/2019 02 Intro to Linear Programming

    9/14

  • 7/28/2019 02 Intro to Linear Programming

    10/14

    Lego: Solversolution

  • 7/28/2019 02 Intro to Linear Programming

    11/14

    LP: model development

    Worksheet: Product Mix: Harry Bartlett is the owner of the Bartlett Nurseries Inc. From the beginninghe worked closely with the local agricultural extension service in order to recommend fertilizers to hiscustomers. After extensive soil analyses, he discovered that standard fertilizer blends did not quitematch the requirements of Alberta soil conditions. Upon the recommendation of area soil chemists,and in the belief that significant profits 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 inorder to compete with commercial fertilizers. Harry's favourite blend was Nitrogrow-X. This fertilizercombined the following chemical compounds containing nitrogen: NG100, NG250, NG350 andNG500. The cost per kilogram for each compound are:Specifications for the Nitrogrow-X blend follow:fertilizer is packed and sold in 100 kg bags,NG100 and NG250 can constitute no more than 40% of the blendNG350 and NG500 must constitute at least 50% of the blend

    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 offertilizer?

    Compound Cost/kg

    NG100 $0.04

    NG250 $0.05

    NG350 $0.06

    NG500 $0.08

  • 7/28/2019 02 Intro to Linear Programming

    12/14

    LP model development

    Decision variables:x1 - unknown amount (in kg) of NG100 in a bagx2 - unknown amount (in kg) of NG250 in a bagx3 - unknown amount (in kg) of NG350 in a bagx4 - unknown amount (in kg) of NG500 in a bagObjective functionmin 0.04x1 + 0.05x2 + 0.06x3 + 0.08x4

    s.t.x1 + x2 + x3 + x4 = 100 size of a bagx1 + x2 = 50 requirement for the amounts of NG350 and NG500 in a bagx4 >= 10 requirement for the amounts of NG500 in a bagx1 >= 0; x2 >= 0; x3 >= 0; x4 >= 0

    Constraints

  • 7/28/2019 02 Intro to Linear Programming

    13/14

  • 7/28/2019 02 Intro to Linear Programming

    14/14