Uploaded by iuhuhol

2331-excel-linear optimization

advertisement
INDE 2331
DATA ANALYSIS USING EXCEL
LINEAR OPTIMIZATION
University of Houston
Dept. of Industrial Engineering
Houston, TX 77204-4812
(713) 743-4195
AGENDA
• Linear Optimization
Linear Optimization
• Some IE problems involve deterministic (nonprobabilistic) data
• Example
– How many parts of different types can be produced given
limited resources or production facilities
– How do I load vehicles for best utilization
– How many people do I need to finish a project on time
• Linear Optimization
– INDE 3381
BASIC CONCEPTS
• Linear objective function…
• Decision variables…
• Set of constraints…
LINEAR OBJECTIVE
FUNCTION
• Equation consisting of
– Decision variables
– Coefficients for each decision variable
• Result of the equation is what you want to minimize or maximize
• Result is commonly known as “Z”
• Examples
– Maximize profit
– Minimize cost
DECISION VARIABLES
• Independent variables
• Identify the values for these variables so that the
objective function is either
– Minimized
– Maximized
• Example
– How many of each type of product to produce
SET OF CONSTRAINTS
• Conditions which must be satisfied
– Limited resources
– Limited time
– Market demand
• Example
– You only have a total amount of raw material to make the
products
– Must make a minimum quantity of eqch specific type of
product
SIMPLE EXAMPLE
• To augument his professor’s salary, Dr. Chung makes
•
•
•
toy soldiers and toy trains in his spare time. He makes
$3 in profit for every toy soldier and $2 in profit for
every toy train.
A toy soldier takes 1 hour of carpentry work and 2 hours
of finishing time. A toy train takes 1 hour of carpentry
work and 1 hour of finishing time.
Dr. Chung has a total of 80 hours of carpentry time and
100 hours of finishing time available each month.
Only 40 toy soldiers can be sold a month, but as many
toy trains that can be made can be sold
OBJECTIVE FUNCTION
• Maximize profit Z
• X1 is the number of toy soldiers to make
• X2 is the number of toy trains to make
• Make 3 dollars for each toy soldier
• Make 2 dollars for each toy train
CONSTRAINTS
• Total carpentry time is 80 hours
• Total finishing time is 100 hours
• Can’t sell more than 40 toy soldiers
• Must make 0 or more toy soldiers
• Must make 0 or more toy trains
STANDARD FORM
• Maximize Z = 3x1 + 2x2
• Subject to:
X1 + x2 <= 80 (carpentry)
2x1+x2<=100 (finishing)
X1 <= 40 (soldier sale limitation)
X1 >= 0 (non-negativity constraint)
X2 >=0 (non-negativity constraint)
SOLVING LP
• Graphical solution
• Simplex algorithm by hand
• Solve it in Excel
• Solve it in some other software package
GRAPHICAL SOLUTION
• Plot lines corresponding to the constraints
• The resulting polygon is the set of feasible solutions
• Plot the objective function for different levels of profit
• The highest isoprofit line to intersect with the polygon is
the maximum profit
• The intersection of the isoprofit line and the polygon is
the optimal solution
• What does this look like?
CONSTRAINT LINES
120
100
80
carpentry
60
finishing
sale
40
20
0
0
20
40
60
80
100
FEASIBLE SOLUTION
POLYGON
120
100
80
carpentry
finishing
60
sale
40
20
0
0
20
40
60
80
100
ISOPROFIT LINE
120
100
80
carpentry
finishing
60
sale
isoprofit
40
20
0
0
20
40
60
80
100
SIMPLEX ALGORITHM
• Algorithmic procedure which utilizes matrix operations
• Solves for solutions by calculating the values at the
polygon vertices
• Determines which is the highest
• Entire undergraduate class on this INDE 3381
• Excel uses this type of algorithm
HOW TO DO THIS IN EXCEL
• Name decision variable cells
• Create objective function cell
• Create cells with constraint formulas
• Tools-solver
• Designate
–
–
–
–
Target objective function cell
Max or min
By changing cells (decision variable cells)
Add constraints with cell references, inequalities, rhs values
• Options – assume linear
• Solve
Download