You are on page 1of 46

Modeling with

Linear Programming
Chapter 2
(p47 – 88)
Introduction
• Objectives of a business are to maximize profit or
minimize cost
• Managers have to make decisions, but they face
certain restrictions
• Time, labour, energy, material, money, restrictive
production guidelines, etc.
• When solving a general type of problem by
seeking an objective that is subject to
restrictions, the technique is called linear
programming
… Introduction
• Linear programming: a model that consists of
linear relationships representing a firms
decisions, given an objective and resource
constraints
• 3 steps:
• Identify problem as solvable with linear programming
• Formulate the unstructured problem as a
mathematical model
• Solve the model by using established mathematical
techniques
• (Implement)
2.1. Model Formulation
• Components
  of a linear programming model:
• Decision variables: mathematical symbols that represent levels of
activity by the company
• E.g. manufacture radios, and , means 100 radios are manufactured
• Objective function: linear mathematical relationship that
describes the objective of the firm in terms of decision variables
• Always used to maximize or minimise a value
• Model constraints: linear relationships of the decision variables
• Represent restrictions placed on the firm by the operating
environment
• Nr of hours of labour available per week
• Parameters: actual numeric values in the objective function and
constraints
• E.g. 40 hours of labour available
2.2. A Maximization Model Example
• Beaver Creek Pottery Company produce clay
bowls and mugs
• 2 primary resources used: special pottery clay &
skilled labour
• How many bowls & mugs must be produced
every day to maximize profit for a given amount
of clay and labour? (product mix problem type)
Resource Requirements & Profit per unit
Product Labour (hr/unit) Clay (kg/unit) Profit (R/unit)
Bowls 1 4 40
Mugs 2 3 50
… Maximization Model Example
• Linear programming model consists of decision
variables an objective function, and constraints
• Steps in model formulation process:
• Define the decision variables
• Define the objective function
• Define the constraints
2.2. Decision Variables
••  How many bowls & mugs to produce daily

• 2 variables influences the decision:


• - nr of bowls
• - nr of mugs
2.2.2. The Objective Function
•  Maximize (total) profit
• Sum of individual profits gained from each bowl and mug

• – total profit per day


• - profit from bowls
• - profit from mugs
2.2.3. Model Constraints
• The
  resources available
• Labour
• Clay
• Both are limited
• To produce 1 bowl: 1 hour of labour
• Labour required for 1 bowl: hours
• To produce 1 mug: 2 hours of labour
• Labour required for 1 mug:
• Total labour used by company:
• But it is limited by 40 hours per week:

• Note: 40 hours can be used (not must be used)


… Model Constraints
•• Constraint
  for clay is the same:
• Each bowl requires 4 kg of clay
• Clay needed daily for bowls:
• Each mug requires 3kg of clay:
• Only 120kg of clay is available per day
•  Material constraint:
• A final restriction is that the number of items
produced must be zero or more
• Impossible to produce a negative number!
• Nonnegativity constrains restrict the decision
variables to zero or positive
… Model constraints
•Summary
 
• Resource availability: - 40 hours of labour per day
- 120kg of clay per day
• Decision variables: - - number of bowls to produce/day
- - number of mugs to produce/day
• Objective function: - Maximize
where = profit per day
• Resource constraints: -
-
• Non-negativity constraints: -
• Complete linear programming model:
• Maximise subject to:
… Model constraints
••  Determine feasibility
• Estimate 5 bowls and 10 mugs:
• 

• 
• feasible
• Room for improvement! – 10 bowls and 20 mugs:
• 
• infeasible
• Correct solution must be obtained graphically
2.3. Graphical Solutions of Linear
Programming Models
• Graphs provide a picture of how a solution is
obtained for a linear programming problem
• Graphical solutions are limited to linear
programming problems with only two decision
variables
• Models with 3 variables can be graphed in three
dimensions
2.3.1. Graphical Solution of a
Maximization Model
•• The
  product mix model will be used to demonstrate
the graphical interpretation of a linear programming
problem
• Complete linear programming model formulated for
Beaver Creek Pottery Company:
• Maximize
subject to:

where = number of bowls produced


= number of mugs produced
… Graphical Solution of a
Maximization Model

• Axes for graphical analysis


• Only positive quadrant is used because of the
non-negativity constraints
… Graphical Solution of a
Maximization Model
••  Plot the constraints for labour

• Choose the maximum value for labour as the


maximum:

• Make
• (0;20)
• Make
• (40;0)
• Draw the constraint line

Graph of the labour constraint


line
… Graphical Solution of a
Maximization Model
• The area representing the entire constraint
for labour is called the labour constraint area
• Coloured area under the graph
• Check points A and B mathematically to
confirm that they are inside
[A] and outside [B] the
constraint area

Labour constraint area


… Graphical Solution of a
Maximization Model
••  Now also plot the constraints for clay

• Choose the maximum value for clay as the


maximum:

• Make
• (0;40)
• Make
• (30;0)
• Draw the constraint line

Constraint line for clay


… Graphical Solution of a
Maximization Model
• Feasible solution area is indicated the shaded
area
• All the points in this area satisfy both constraints
• Some point in this area will yield maximum profit

Graph of both model constraints


… Graphical Solution of a
Maximization Model
• Point R: feasible solution point
• Satisfies both constraints – valid
• Point S: infeasible
• Satisfies only the clay constraint
• Point T: infeasible
• Satisfies neither constraint

Feasible solution area constraints


2.3.2. The Optimal Solution Point
••  Locatethe point inside the feasible area that
will result in the greatest total profit
• First plot the objective function line of an
arbitrarily1 selected point
• E.g. assume

1 randomly

Objective function line for


… The Optimal Solution Point
••  Now assume different values for Z:

• Study the profit line


… The Optimal Solution Point
••  Profit increases as the objective function line
moves away from the origin, but there is a limit
• Maximum profit will be attained where the
objective function is the farthest from the
origin & is touching a point in the feasible
solution area [B]

Alternative objective function lines for


Profits; of R800, R1200 and R1600
… The Optimal Solution Point
• Optimal solution: the best feasible solution
• Optimal extreme point: the extreme point the
objective function touches last as it leaves the
feasible solution area
• To find it, place a straightedge parallel to the
objective function line and
move it outwards until the
edge of the feasible solution
area is reached
• Optimal solution is always
on the boundary
2.3.3. The Solution Values
••  The optimal solution values can be determined
from the graph
• (bowls)
• (mugs)
• Solution point will be at one of the corners [A, B
or C]
• Extreme points: corner points
on the boundary of the
feasible area

Optimal solution coordinates


... The Solution Values
• Disadvantage:
  graph must be absolutely
accurate
• Mathematical approach is much more accurate!
• 2 constraint lines are equal at point B, so values for and
at that intersection can be found by solving the two
equations simultaneously
• Step 1: Convert both equations to functions of
• Step 2: Let in the 1st equation be equal to in the 2nd
equation
• Step 3: Solve for
• Step 4: Set into any equation to solve for
See next slide for example
... The Solution Values
•  • 
• (mugs)

(bowls)
... The Solution Values
••  When the values are substituted into the
objective function, the maximum profit can be
determined

• Profit values at points


A and C will yield
R1000 and R1200
• Both are feasible
Solutions at all corner points
... The Solution Values
•• Assume
  profit per bowl is R70 (not R40) and per
mug R20 (not R50) and the labour and clay
constraints stay the same
• New objective function:
• The new profit coefficients
give the linear objective
function a new slope
• Slope: computed as the ‘rise’
over the ‘run’
• More on Slope when needed

The optimal solution with


... The Solution Values
• Some problems do not have a single extreme
point solution
• In such a situation there are multiple optimal
solutions
• Multiple optimal solutions: can occur when the
objective function is parallel to a constraint line
2.3.4. Slack variables
•• A
  slack variable is added to a constraint to
convert it to an equation ()

•
• Slack variables: represent unused resources
• It takes on any value that will realise the equation
• If , :
•
• It contributes nothing to the objective function
value
... Slack variables
••  If
the constraint is 0, then the slack will also
be 0 at that point
• Maximize
subject to:

Solutions at points A, B and C with slack


2.4. A Minimization Model Example
• Two brands of fertilizer available: Super-Gro
(R6/bag), Crop-Quick (3/bag)
• Each yields a specific amount of nitrogen and
phosphate per bag
Chemical Contribution
Brand Nitrogen (kg/bag) Phosphate (kg/bag)
Super-Gro 2 4
Crop-Quick 4 3

• The farmer’s field requires at least 16 pounds


of nitrogen and 24 pounds of phosphate
• How much of each brand must be purchased
... A Minimization Model Example
... A Minimization Model Example
• Decision variables: x1 = bags of Super-Gro
x2 = bags of Crop-Quick
• Objective function:
Minimize Z = 6x1 + 3x2
where R6x1 = cost of bags of Super-Gro
R3x2 = cost of bags of Crop-Quick
• Model constraints:
2x1 + 4x2  16 lb (nitrogen constraint)
4x1 + 3x2  24 lb (phosphate constraint)
x1, x2  0 (non-negativity constraint)
... A Minimization Model Example

Constraint lines for fertilizer model Feasible solution area

• x1 = bags of Super-Gro; x2 = bags of Crop-Quick


... A Minimization Model Example
• The optimal solution of a minimization problem is
at the extreme point closest to the origin

Optimum solution point

• x1 = bags of Super-Gro;
x2 = bags of Crop-Quick
... A Minimization Model Example
• A surplus variable is the opposite of a slack
variable
• It is subtracted from a  constraint to convert it to
an equation (=)
• Surplus variables: represent an excess
above a constraint requirement level
• Surplus variables contribute nothing to the
calculated value of the objective function
• Subtracting slack variables in the farmer
problem constraints:
• 2x1 + 4x2 - s1 = 16 (nitrogen)
• 4x1 + 3x2 - s2 = 24 (phosphate)
... A Minimization Model Example
• Graphical solution of a minimization model

Graph of the fertilizer example


2.5. Irregular Types of Linear
Programming Problems
• For some linear programming models, the
general rules do not always apply
• Special types of problems include those with:
• Multiple optimal solutions
• Infeasible solutions
• Unbounded solutions
2.5.1. Multiple Optimal Solutions
• Consider
  the Beaver Creek Pottery Company example,
with the objective function changed from to
• Objective function is now parallel to the constraint line, so
they touch everywhere along the line
•  Every point along the line is
optimal
• Alternate optimal solutions:
points at the endpoints of the
constraint line segment that the
objective function parallels
• Manager can decide which route
to go!
Graph with multiple optimal solutions
2.5.2. An Infeasible Problem
••  This occurs when every possible solution violates
at least one constraint
• Maximize
subject to: … [a]
… [b]
… [c]
..[d]
• Point A satisfies only [a]
• Point C only satisfies [b]
and [c]
• Point B satisfies none
• Seldom occurs in practice
Graph of an infeasible problem
2.5.3. An Unbound Problem
••In  some instances the feasible solution area formed by
the model constraints is not closed
• It is possible for the objective function to increase indefinitely
without ever reaching a maximum value because it never
reaches the boundary of
the feasible solution area
• Maximize
subject to:

•Impossible in practice
An unbounded problem
2.6. Characteristics of Linear
Programming Problems
• To recap:
• A linear programming problem requires a decision
• Choose between one of two courses of action
• Decision variables represent the decision in the
model
• The problem encompasses a goal that the decision
maker wants to achieve
• The goal is expressed as an objective function
• Constraints exist that limit the extent of
achievement of the objective
• The objective and constraints must be definable by
linear mathematical functional relationships
2.6.1. Properties of Linear
Programming Models
• In addition to having linear relationships, linear
programming models also have the following
properties:
• Proportionality: The rate of change (slope) of the
objective function and constraint equations is constant
• Additivity: e.g. the total profit must equal the sum of the
profits earned from making bowls and mugs
• Divisibility: Decision variables can take on any fractional
value and are therefore continuous (as opposed to integer
in nature)
• Certainty: Values of all the model parameters are
assumed to be known with certainty (non-probabilistic)
Homework
• Chapter 1
• Problems 2, 8, 19 and 24
• Chapter 2
• Work through Example Problem Solutions (p75–78)
• Problems 4, 20, 42 and 50

• Solutions will be posted on myTUTor

You might also like