Академический Документы
Профессиональный Документы
Культура Документы
OPTIMIZATION CONCEPTS
Linear programming
Learning Objectives
• Understand basic assumptions and properties of linear
programming (LP).
• Use graphical solution procedures for LP problems with
only two variables to understand how LP problems are
solved.
• Understand special situations such as redundancy,
infeasibility, unboundedness, and alternate optimal
solutions in LP problems.
• Understand how to set up LP problems on a spreadsheet
and solve them using Excel’s solver.
Linear Programming
• The maximization or minimization of some quantity
is the objective in all linear programming problems.
• All LP problems have constraints that limit the
degree to which the objective can be pursued.
• A feasible solution satisfies all the problem's
constraints.
• An optimal solution is a feasible solution that results
in the largest possible objective function value when
maximizing (or smallest when minimizing).
• A graphical solution method can be used to solve a
linear program with two variables.
Linear Programming
• If both the objective function and the constraints
are linear, the problem is referred to as a linear
programming problem.
• Linear functions are functions in which each
variable appears in a separate term raised to the
first power and is multiplied by a constant (which
could be 0).
• Linear constraints are linear functions that are
restricted to be "less than or equal to", "equal to",
or "greater than or equal to" a constant.
Problem Formulation
• Problem formulation or modeling is the process of
translating a verbal statement of a problem into a
mathematical statement.
• Problem/model formulation involves:
ˉ Understand the problem thoroughly.
ˉ Describe the objective.
ˉ Describe each constraint.
ˉ Define the decision variables.
ˉ Write the objective in terms of the decision variables.
ˉ Write the constraints in terms of the decision
variables.
Linear Equations and Inequalities
• This is a linear equation:
2A + 5B = 10
• This equation is not linear:
2A2 + 5B3 + 3AB = 10
• LP uses, in many cases, inequalities like:
A+BC or A + B C
Basic Assumptions of a LP Model
1. Conditions of certainty exist.
2. Proportionality in objective function and
constraints (1 unit – 3 hours, 3 units- 9 hours).
3. Additivity – total of all activities equals sum of
individual activities.
4. Divisibility – solutions need not necessarily be in
whole numbers (integers); ie.decision variables can
take on any fractional value.
Example: Maximizing Profit
• How many bowls and mugs should be produced to
maximize profits given labor and materials
constraints?
• Product resource requirements and unit profit:
Resource Requirements
Labor Clay Profit
Product
(hr/unit) (lb/unit) ($/unit)
Bowl 1 4 40
Mug 2 3 50
Problem Definition
Resource Availability:
40 hrs of labor per day, 120 lbs of clay
Decision Variables:
x1 = number of bowls to produce per day
x2 = number of mugs to produce per day
Objective Function: Maximize Z = $40x1 + $50x2,
where Z = profit per day
Resource Constraints: 1x1 + 2x2 40 hours of labor
4x1 + 3x2 120 pounds of clay
Non-Negativity Constraints: x1 0; x2 0
Problem Definition (cont’d)
Complete Linear Programming Model:
subject to constraints:
5A + 10B - s1 = 90 (protein constraint)
4A + 3B - s2 = 48 (vitamin constraint)
½A - s3 = 1½ (iron constraint)
A, B, s1,s2 s3 0 (nonnegativity)
Graphical Representation of Constraints: HMCR
Example
Drawing
Constraints:
Nonnegativity Constraint
A 0, B 0
Graphical Solution – Isocost line Method: HMCR
Example
• Isocost line is moved parallel to 54-cent solution line toward lower left origin.
• Last point to touch the isocost line while still in contact with the feasible region, is
corner point 2.
• Solving for corner point 2 with two equations produces values 8.4 for A and 4.8
for B, minimum optimal cost solution is:
2A + 3B = (2)(8.4) + (3)(4.8) = 31.2
Graphical Solution – Isocost line Method: HMCR Example
X + 2Y 6
2X + Y 8
X 7
Unboundedness: Sometimes an LP model will
not have a finite solution
Maximize profit
= $3X + $5Y
subject to:
X 5
Y 10
X + 2Y 10
X, Y 0
Multiple Optimal Solutions
• An LP problem may have more than one optimal solution.
Maximize
Profit = $3x + $2y
Subject to:
6X + 4Y 24
X 3
X, Y 0
Solving LP Problems Using Excel’s Solver
• Consider the following problem:
– A Furniture Company produces tables and chairs.
– Each table requires: 4 hours of carpentry and 2 hours of painting.
– Each chair requires: 3 hours of carpentry and 1 hour of painting.
– Available production capacity: 240 hours of carpentry time and
100 hours of painting time.
– Due to existing inventory of chairs, no more than 60 new chairs
will be made.
– Each table sold results in $7 profit, while each chair produced
yields $5 profit.
– The problem: Determine the best possible combination of tables
and chairs to manufacture in order to attain maximum profit.
Solving LP Problems Using Excel’s Solver
• Now, suppose T tables and C chairs are manufactured
• The LP problem now becomes:
Maximize profit = $7T + $5C
Subject to constraints
4T + 3C 240 (carpentry constraint)
2T + 1C 100 (painting constraint)
C 60 (chairs limit constraint)
T, C 0 (non-negativity)
Solver Spreadsheet Setup
• Now Enter the following into Excel worksheet
LP Excel and Solver Parts
Changing cells
• Solver refers to decision variables as changing cells.
• In the example, there are two decision variables cells B5 and C5 to represent
number of tables to make (T) and number of chairs to make (C), respectively.
Target Cell
• Objective function, referred to as target cell by solver,
= SUMPRODUCT(B6:C6,$B$5:$C$5)
This is equivalent to =B6*B5+C6*C5
Each constraint has three parts -
1. A left hand side (LHS) part consisting of every term to the left of the
equality or inequality sign.
2. A right hand side (RHS) part consisting of all terms to the right of the
equality or inequality sign.
3. An equality or inequality sign.
Entering Information into Solver
Invoke Solver by clicking Data|Solver
• Specify Target Cell (D6)
• Specify Changing Cells (highlight B5, C5)
Flair Furniture
T C
Tables Chairs
Constraints:
Constraints: