linear programming building good linear models and example 1 sensitivity analyses, unit conversion,...
Post on 20-Dec-2015
222 views
TRANSCRIPT
![Page 1: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/1.jpg)
Linear ProgrammingLinear Programming
Building Good Linear ModelsAnd
Example 1Sensitivity Analyses, Unit Conversion,
Summation Variables
![Page 2: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/2.jpg)
Building Good ModelsBuilding Good ModelsA Check ListA Check List
1. Determine in general terms what the objective is (the objective function) and what factors are under the decision maker’s control that can affect this objective (the decision variables).• Define decision variables using appropriate units
and time frame (cars per month, tons per production run, etc.)
2. List the restrictions (constraints) in short expressions (bulleted list).• Do not worry about listing all the variables or all the
constraints at the beginning. As the formulation progresses, if you find you need a new variable or another constraint add it at that time.
![Page 3: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/3.jpg)
Building Good ModelsBuilding Good ModelsA Check ListA Check List
3. First formulate constraints in the form: (Some expression) has (some relation) to (another expression or a constant)
• Keep units on both sides of the relation the same
• If the RHS is an expression, do the algebra to rewrite the constraint as:
(Some expression involving only linear terms ) has (some relation) to (a constant)
• Use summation variables and constraints to simplify the input and make it more easily readable.• Summation variables are particularly useful when
there are many constraints involving percentages.
4. Indicate which variables are:• ≥ 0, unrestricted, ≤ 0, integer, binary
![Page 4: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/4.jpg)
Variables and Constraints With Variables and Constraints With PercentagesPercentages
Suppose in the formulation of a particular problem involving the production of four different styles of televisions, the modeler wished to express that no model was to represent more than 30% of the total production.
• The total production is X1 + X2 + X3 + X4
• Valid expressions of the constraints:
X1 ≤ .3(X1 + X2 + X3 + X4)
X2 ≤ .3(X1 + X2 + X3 + X4)
X3 ≤ .3(X1 + X2 + X3 + X4)
X4 ≤ .3(X1 + X2 + X3 + X4)
![Page 5: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/5.jpg)
Rewriting the Percentage Rewriting the Percentage ConstraintsConstraints
These constraints can be rewritten as: .7X1 - .3X2 - .3X3 - .3X4 ≤ 0
-.3X1 + .7X2 - .3X3 - .3X4 ≤ 0
-.3X1 - .3X2 + .7X3 - .3X4 ≤ 0
-.3X1 - .3X2 - .3X3 + .7X4 ≤ 0
• Correct but:– Input of many coefficients – could make mistakes – One of the factors affecting the speed of solving linear
programs is the number of non-zero entries in the formulation
– Looking at these constraints does not instantaneously convey (by inspection) that each TV is to represent no more than 30% of the total production.
![Page 6: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/6.jpg)
Using Summation Variables and Using Summation Variables and Summation ConstraintsSummation Constraints
• Define the summation variable, Xsummation variable, X55, to be the total production.– Immediately add the following summation summation
constraintconstraint that says X5 is the total production
X5 = X1 + X2 + X3 + X4 or X1 + X2 + X3 + X4 – X5 = 0
• The constraints can now be written as:X1 + X2 + X3 + X4 - X5 = 0
X1 - .3X5 ≤ 0
X2 - .3X5 ≤ 0
X3 - .3X5 ≤ 0
X4 - .3X5 ≤ 0
![Page 7: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/7.jpg)
Summation Variables and Summation Variables and Summation ConstraintsSummation Constraints
• In this form the problem– Is easier to input with less chance for input error– Involves many 0 coefficients, with many of the
remaining coefficients being 1’s – the computer likes this
– Is easily readable – you can tell the constraints are saying that no model should be more than 30% of the total production
• But this does add one more variable and one more constraint to the model.– This also affects solution speed– In the Solver dialogue box, make sure you include:
• The summation variable as part of the “Changing Cells”• The summation constraint as part of the “Add Constraints”
![Page 8: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/8.jpg)
Example 1Example 1Galaxy Industries ExpansionGalaxy Industries Expansion
• Galaxy Industries is planning an expansion and a move to Juarez, Mexico where both material and labor costs are cheaper.– It will also produced two additional products –• Big Squirts and Soakers
– Costs/Selling Prices:• Plastic – now only $1/lb• Other miscellaneous variable costs reduced by 50%• Labor
– Sunk Cost for Regular Time– $180 more per hour for each overtime hour (labor, other)
• Selling Prices for Space Rays/Zappers – reduced by $1/dozen
![Page 9: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/9.jpg)
Example 1Example 1ConstraintsConstraints
– Constraints:• Plastic Availability – 3000 lbs./week• Production time (Regular time) – 40 hours/week• Overtime Availability – Up to 32 hours/week• Must satisfy a Zapper contract – at least 200 dz./week• New Product Mix Constraints
– Space Rays = 50% of total production– (Zappers, Big Squirts, Soakers) each ≤ 40% of production
• Minimum total production – 1000 dz./week
![Page 10: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/10.jpg)
Example 1Example 1Profit/Resource RequirementsProfit/Resource Requirements
Selling Price
Costs Plastic ($3/lb) Other Variable Costs Total Profit Per Dozen
Production Minutes
DOZ Space Rays
$24
$ 6 (2 lb)$10=======$ 8
3
DOZ
Zappers
$26
$ 3 (1 lb)$18=======$ 5
4
DOZ Big Squirts
$29
$ 3 (3 lb)$ 6=======$20
5
DOZ Space Rays
$23
$ 2 (2 lb)$ 5=======$16
3
DOZ
Zappers
$25
$ 1 (1 lb)$ 9=======$15
4
-$1/doz
1
50% Reduction
DOZ Soakers
$36
$ 4 (4 lb)$10=======$22
6
![Page 11: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/11.jpg)
Decision VariablesDecision Variables(Initial)(Initial)
• X1 = # dozen Space Rays produced per week
• X2 = # dozen Zappers produced per week
• X3 = # dozen Big Squirts produced per week
• X4 = # dozen Soakers produced per week
• X5 = # overtime hours scheduled per week
![Page 12: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/12.jpg)
Objective FunctionObjective Function• Max Total Net Weekly Profit =
• Max Total Gross Weekly Profit – Weekly Cost of
Overtime
Gross Weekly ProfitProduct Profit Per Dozen Doz. Per Week Gross ProfitSpace Rays $16 X1 16X1
Zappers $15 X2 15X2 Big Squirts $20 X3 20X3
Soakers $22 X4 22X4 Weekly Cost of Overtime
Cost Per Overtime Hours Overtime CostOvertime Hour Scheduled Per Week $180 X5 180X5
OBJECTIVE FUNCTIONMAX 16X1 + 15X2 + 20X3 + 22X4 – 180X5
![Page 13: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/13.jpg)
Plastic ConstraintPlastic Constraint
Total Amount of Plastic Used Per Week
≤
Plastic Available Per Week
Total Amount of Plastic Used Per Week≤
Plastic Available Per Week
2X1 + 1X2 + 3X3 + 4X4
3000
2X1 + 1X2 + 3X3 + 4X4 ≤ 3000
![Page 14: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/14.jpg)
Production Time ConstraintProduction Time ConstraintTotal Production Minutes Used Per Week
≤Total Regular
Minutes Available+
Total OvertimeMinutes Scheduled
Total Production Minutes Used Per Week≤
Total RegularMinutes Available
+Total Overtime
Minutes Scheduled
3X1 + 4X2 + 5X3 + 6X4
60(40) = 2400 60X5
3X1 + 4X2 + 5X3 + 6X4 – 60 X5 ≤ 2400
![Page 15: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/15.jpg)
Overtime AvailabilityOvertime Availability
The Number of Overtime Hours Scheduled/Week
≤
The Number of Overtime Hours Available/Week
The Number of Overtime Hours Scheduled/Week
≤
The Number of Overtime Hours Available/Week
X5
32
X5 ≤ 32
![Page 16: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/16.jpg)
Zapper Contract ConstraintZapper Contract Constraint
The number of dozen Zappers produced/wk
≥
The number of dozen required by contract
The number of dozen Zappers produced/wk≥
The number of dozen required by contract
X2
200
X2 ≥ 200
![Page 17: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/17.jpg)
Mix Constraints –Mix Constraints –Summation Variable/ConstraintSummation Variable/Constraint
• The next set of constraints involve percentages of the total production.
• Define X6 = Total Weekly Production
• Total Weekly Production = X1 + X2 + X3 + X4
• Thus the summation constraint is:
X1 + X2 + X3 + X4 – X6 = 0
![Page 18: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/18.jpg)
Mix ConstraintsMix ConstraintsSpace Rays = 50% of total production
Zappers ≤ 40% of total production
Big Squirts ≤ 40% of total production
Soakers ≤ 40% of total production
Space Rays = 50% of total production
Zappers ≤ 40% of total production
Big Squirts ≤ 40% of total production
Soakers ≤ 40% of total production
X1
X2
X3
X4
.5X6
.4X6
.4X6
.4X6
X1 - .5X6 = 0X2 - .4X6 ≤ 0X3 - .4X6 ≤ 0X4 - .4X6 ≤ 0
![Page 19: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/19.jpg)
The total number of dozen units produced/wk
≥
The minimum production limit
Minimum Total ProductionMinimum Total Production
X6
1000
X6 ≥ 1000
The total number of dozen units produced/wk
≥
The minimum production limit
![Page 20: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/20.jpg)
The Complete ModelThe Complete Model• Including the nonnegativity of the variables
the complete linear programming model is:
MAX 16X1 + 15X2 + 20X3 + 20X4 - 180X5
s.t. 2X1 + 1X2 + 3X3 + 4X4 ≤ 3000 (Plastic)
3X1 + 4X2 + 5X3 + 6X4 - 60X5 ≤ 2400 (Time)
X5 ≤ 32 (Overtime)
X2 ≥ 200 (Contract)
X1 + X2 + X3 + X4 - X6 = 0 (Sum)
X1 - .5X6 = 0 (Sp Ray Mix)
X2 - .4X6 ≤ 0 (Zapper Mix)
X3 - .4X6 ≤ 0 (Big Sq Mix)
X4 - .4X6 ≤ 0 (Soaker Mix)
X6 ≥ 1000 (Min Total)
All X’s ≥ 0
![Page 21: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/21.jpg)
=SUMPRODUCT($C$3:$H$3,C5:H5)Drag down
![Page 22: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/22.jpg)
Solution/AnalysisSolution/Analysis
Produce Weekly565 dz. Space Rays200 dz. Zappers365 dz. Big Squirts0 SoakersTotal = 1130 dozen
All 32 overtimehours scheduled All time and overtime used.
Contract met exactly.Exactly 50% Space Rays.575 lbs. plastic unused.Profit = $13,580
![Page 23: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/23.jpg)
Sensitivity AnslysisSensitivity Anslysis
Solution will notchange as long profit for
doz. Space Rays is between $4 and $20
Profit per dozen Soakersmust increase by $2.50(to $24.50) before it is
economically beneficialto produce them.
Extra overtime productionhours will add $90each to the profit.
This value is valid for totalovertime production hoursbetween 16.67 and 40.67.
![Page 24: Linear Programming Building Good Linear Models And Example 1 Sensitivity Analyses, Unit Conversion, Summation Variables](https://reader035.vdocuments.us/reader035/viewer/2022062714/56649d415503460f94a1c436/html5/thumbnails/24.jpg)
ReviewReview
• Tips on building mathematical models.
• Use of summation variables and constraints.
• Solving a linear program with various constraint types and a summation variable and constraint.
• Interpreting the output.