Download PowerPoint

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Mathematical optimization wikipedia , lookup

Predictive analytics wikipedia , lookup

Pattern recognition wikipedia , lookup

Computer simulation wikipedia , lookup

Theoretical computer science wikipedia , lookup

Data analysis wikipedia , lookup

Generalized linear model wikipedia , lookup

Multiple-criteria decision analysis wikipedia , lookup

Corecursion wikipedia , lookup

Simplex algorithm wikipedia , lookup

Least squares wikipedia , lookup

Inverse problem wikipedia , lookup

Data assimilation wikipedia , lookup

Transcript
Introduction to Linear
Programming
Chapter 3: Hillier and Lieberman
Chapter 3: Decision Tools for Agribusiness
Dr. Hurley’s AGB 328 Course
Terms to Know

Simplex Method, Feasible Region, SlopeIntercept Form, Optimal Solution,
Graphical Method, Decision Variables,
Parameters, Objective Function,
Constraints, Functional Constraints, NonNegativity Constraints, Feasible Solution,
Infeasible Solution, Feasible Region
Terms to Know Cont.

No Feasible Solution, Optimal Solution,
Most Favorable Value, Multiple Optimal
Solutions, No Optimal Solutions,
Unbounded Z, Corner-Point Feasible
Solution (CPF), Blending Problem, Data
Cells, Range Name, Changing Cells,
Output Cells, Target Cell
Wyndor Glass Co. Example
Company has two new products—a door
and a window
 The company has three plants to develop
these two new products
 The goal of the company is to maximize
profits

Key Data for Wyndor
Doors
Windows Time Available Hours
Plant 1 Usage (Hours)
1
0
4
Plant 2 Usage (Hours)
0
2
12
Plant 3 Usage (Hours)
3
2
18
Unit Profit
$3,000
$5,000
Mathematical Model
Let x1 = number of doors produced per week
 Let x2 = number of windows produced per week
 Let Z = profit per week
 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 3𝑥1 + 5𝑥2

Subject to:
𝑥1 ≤ 4
2𝑥2 ≤ 12
3𝑥1 + 2𝑥2 ≤ 18
𝑥1 ≥ 0, 𝑥2 ≥ 0
Graphical Solution
x1=4
x2
9
2x2=12
6
3x1+2x2=18
Z=3x1+5x2=36
Z=3x1+5x2=20
0
4
6
Z=3x1+5x2=10
x1
The General Linear Programming
Model
Z = measure of performance
xj = a decision variable that indicates how
much you are doing of activity j for j = 1, 2,
…, n
 cj = a parameter that converts activity j into
the overall measure of performance
 bi = the amount of resource i you have
available to allocate to your different
activities for i = 1, 2, …, m
 aij = a parameter that converts activity j into
the amount of resource i used


Resource Allocation Data Matrix
Activity 1 Activity 2 … Activity n Resource
Available
Resource 1
a11
a12
… a1n
b1
Resource 2
a21
a22
… a2n
b2
.
.
.
Resource m
.
.
.
am1
Contribution to Z c1
.
.
.
.
.
.
am2
… amn
c2
… cn
.
.
.
.
.
.
bm
Standard Mathematical Form

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 𝑐1 𝑥1 + 𝑐2 𝑥2 + ⋯ +𝑐𝑛 𝑥𝑛
Subject to:
𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ +𝑐1𝑛 𝑥𝑛 ≤ 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ +𝑐2𝑛 𝑥𝑛 ≤ 𝑏2
.
.
.
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + ⋯ +𝑐𝑚𝑛 𝑥𝑛 ≤ 𝑏𝑚
𝑥1 ≥ 0, 𝑥2 ≥ 0, …, 𝑥𝑛 ≥ 0
Changes that Can Be Made to the
Standard Form
The objective function could be
minimized instead of maximized
 The functional constraints can be met
with equality (=) or greater than (≥) signs
 The decision variables xj could be
unrestricted in sign, i.e., xj < 0 is also
possible

Major Assumptions Behind Linear
Programming
All functions are linear
 Proportionality Assumption
 Additivity
 Divisibility
 Certainty

Solving Linear Programming
Problems Using a Spreadsheet
Excel has an add-in called Solver that can
solve linear programming problems.
 Major components to Solver are:

◦
◦
◦
◦
◦
Set Objective:
To:
By Changing Variable Cells:
Subject to the Constraints:
Make Unconstrained Variables Non-negative
should be checked
◦ Select a Solving Method:
Guidelines for Building Good
Spreadsheets
 Enter
the data first
◦ Since the data can dictate the structure
of the spreadsheet model, it is valuable
to input the data in the spreadsheet
first.
◦ This can also allow you to build the
spreadsheet to closely resemble the
structure of the data.
Guidelines for Building Good
Spreadsheets Cont.

Organize and clearly identify the data
◦ Data should be grouped together in a
convenient format.
◦ Each piece of data or group of data should be
appropriately labeled.

Enter each piece of data into one cell only
◦ If you need to use the data elsewhere in the
model, you can reference it.
Guidelines for Building Good
Spreadsheets Cont.

Separate data from formulas
◦ If possible, formulas should have no specific
parameters encoded in them.
◦ By keeping the data separate from formulas,
you can save time when changes are needed
by only having to change one parameter
rather than looking for all the formulas that
use a specific piece of data.
◦ This allows all the data to be visual in the
spreadsheet.
Guidelines for Building Good
Spreadsheets Cont.

Keep it simple
◦ You should avoid more powerful functions when
simpler ones will accomplish the same task.
◦ Keep formulas simple.
 If you have a very complicated formula, you should break it up
into components on the spreadsheet.

Use range names
◦ Range names should be indicative of what they
represent.
◦ When using range names, care should be taken not to
allow too many range names so the names become
unwieldy.
Guidelines for Building Good
Spreadsheets Cont.

Use relative and absolute references to
simplify copying formulas
◦ This also allows you to copy cells without
making as many errors.

Use borders, shading, and colors to
distinguish between cell types
◦ This will make it easy for you to keep track of
the items within your spreadsheet model.
Guidelines for Building Good
Spreadsheets Cont.

Show the entire model on the
spreadsheet
◦ You should attempt to put as many of the
elements of the model on the spreadsheet.
 This will allow others to more easily understand
your model.
 This will allow people using the spreadsheet to
more easily understand the Solver dialog box.
Review the Following Spreadsheet
Models
Wyndor Glass
 Radiation Therapy
 Kibbutzim
 Nori and Leets
 Save-It
 Union Airways
 Distribution Unlimited

Example

3.1-10 in the textbook
◦ Develop a mathematical model
◦ Solve the problem using the graphical method
◦ Solve the problem using excel by developing a
spreadsheet model
In-Class Activity (Not Graded)
Solve the following using the graphical
method and the spreadsheet method:
 𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 200𝑥1 + 100𝑥2

Subject to:
20𝑥1 − 10𝑥2 ≤ 150
15𝑥1 + 15𝑥2 ≤ 180
3𝑥1 + 5𝑥2 ≤ 45
𝑥1 ≥ 0, 𝑥2 ≥ 0