1 Merged
1 Merged
Introduction to OR
1
Course Outline, Evaluation
Session Topic
Instructors:
1 Introduction to OR
Dr. Prabhat Ranjan
1 Linear Programming Formulation
Dr. Ankur Chauhan
1 Graphical Methods
Dr. Krishna Mohan TV
1 Simplex Algorithm
1 Sensitivity & Duality Book:
1 Transportation An Introduction to Management
1 Assignment Science: Quantitative Approaches to
1 Network Models Decision Making, 14e, Cengage.
2 Integer Programming
2 Dynamic Programming Evaluation:
2 Goal Programming Quiz - 20
2 Waiting Line Models Assignment/Group work - 20
2 Introduction to Decision Analysis Mid-Term - 20
2 OR in Practice End-Term - 40
2
Session 1: Introduction to OR
• Body of Knowledge
• Problem Solving and Decision Making
• Quantitative Analysis and Decision Making
• Quantitative Analysis
• Models of Cost, Revenue, and Profit
• Quantitative Methods in Practice
3
Body of Knowledge
• The body of knowledge involving quantitative approaches to decision making is
referred to as
● Management Science
● Operations Research (Operational Research)
● Decision Science
• Leonid Kantorovich, Tjalling Koopmans ("for their contributions to the theory
of optimum allocation of resources")
• George Dantzig, M. J. Farrell, William W. Cooper, Abraham Charnes
• It
had its early roots in World War II and is flourishing in business and industry due,
in part, to:
● numerous methodological developments (e.g. simplex method for solving linear
programming problems)
● a virtual explosion in computing power
4
Problem Solving
• 7 Steps of Problem Solving
(First 5 steps are the process of decision making)
1. Define the problem.
2. Determine the set of alternative solutions.
3. Determine the criteria for evaluating alternatives.
4. Evaluate the alternatives.
5. Choose an alternative (make a decision).
---------------------------------------------------------------------
6. Implement the selected alternative.
7. Evaluate the results.
5
Quantitative Analysis and Decision Making
• Decision-Making Process
Structuring the Problem Analyzing the Problem
● Problems in which the objective is to find the best solution with respect to one
criterion are referred to as single-criterion decision problems.
● Problems that involve more than one criterion are referred to as multicriteria
decision problems.
6
Qualitative Analysis and Decision Making
• Analysis Phase of Decision-Making Process
• Qualitative Analysis
● based largely on the manager’s judgment and experience
● includes the manager’s intuitive “feel” for the problem
● is more of an art than a science
7
Quantitative Analysis and Decision Making
• Analysis Phase of Decision-Making Process
• Quantitative Analysis
● analyst will concentrate on the quantitative facts or data associated with the problem
● analyst will develop mathematical expressions that describe the objectives, constraints,
and other relationships that exist in the problem
● analyst will use one or more quantitative methods to make a recommendation
8
Quantitative Analysis and Decision Making
• Potential Reasons for a Quantitative Analysis Approach to Decision Making
● The problem is complex.
● The problem is very important.
● The problem is new.
● The problem is repetitive.
9
Quantitative Analysis and Decision Making
• Quantitative Analysis Process
● Model Development
● Data Preparation
● Model Solution
● Report Generation
10
Model Development
• Models are representations of real objects or situations
• Three forms of models are:
● Iconic models - physical replicas (scalar representations) of real objects
● Analog models - physical in form, but do not physically resemble the object being
modeled
● Mathematical models - represent real world problems through a system of mathematical
formulas and expressions based on key assumptions, estimates, or statistical analyses
11
Model Development
• Generally, experimenting with models (compared to experimenting with the real
situation):
● requires less time
● is less expensive
● involves less risk
• Themore closely the model represents the real situation, the accurate the
conclusions and predictions will be.
12
Mathematical Models
• Objective Function – a mathematical expression that describes the problem’s
objective, such as maximizing profit or minimizing cost
● Consider a simple production problem. Suppose x denotes the number of units produced
and sold each week, and the firm’s objective is to maximize total weekly profit. With a
profit of $10 per unit, the objective function is 10x.
• Constraints – a set of restrictions or limitations, such as production capacities
● To continue our example, a production capacity constraint would be necessary if, for
instance, 5 hours are required to produce each unit and only 40 hours are available per
week. The production capacity constraint is given by 5x < 40.
● The value of 5x is the total time required to produce x units; the symbol indicates that the
production time required must be less than or equal to the 40 hours available.
13
Mathematical Models
• Uncontrollable Inputs – environmental factors that are not under the control of the
decision maker
● In the preceding mathematical model, the profit per unit ($10), the production time per
unit (5 hours), and the production capacity (40 hours) are environmental factors not under
the control of the manager or decision maker.
• DecisionVariables – controllable inputs; decision alternatives specified by the
decision maker, such as the number of units of a product to produce.
● In the preceding mathematical model, the production quantity x is the controllable input
to the model.
14
Mathematical Models
•A complete mathematical model for our simple production problem is:
[The second constraint reflects the fact that it is not possible to manufacture a
negative number of units.]
15
Mathematical Models
• Deterministic Model – if all uncontrollable inputs to the model are known and
cannot vary
• Stochastic (or Probabilistic) Model – if any uncontrollable are uncertain and subject
to variation
• Stochastic models are often more difficult to analyze.
● In our simple production example, if the number of hours of production time per unit
could vary from 3 to 6 hours depending on the quality of the raw material, the model
would be stochastic.
16
Mathematical Models
• Cost/benefit considerations must be made in selecting an appropriate mathematical
model.
• Frequentlya less complicated (and perhaps less precise) model is more appropriate
than a more complex and accurate one, due to cost and ease of solution
considerations.
17
Mathematical Models
Uncontrollable Inputs
(Environmental Factors)
Controllable
Output
Inputs Mathematical
(Projected
(Decision Model
Results)
Variables)
18
Mathematical Models
• Data preparation is not a trivial step, due to the time required and the possibility of
data collection errors.
•A model with 50 decision variables and 25 constraints could have over 1300 data
elements!
• Often, a fairly large data base is needed.
• Information systems specialists might be needed.
19
Model Solution
• The analyst attempts to identify the alternative (the set of decision variable values)
that provides the “best” output for the model.
• The “best” output is the optimal solution.
• If
the alternative does not satisfy all of the model constraints, it is rejected as being
infeasible, regardless of the objective function value.
• If
the alternative satisfies all of the model constraints, it is feasible and a candidate
for the “best” solution.
20
Model Solution
• Trial-and-Error Solution for Production Problem
21
Model Solution
•A variety of software packages are available for solving mathematical models.
● Microsoft Excel
● LINGO
22
Model Testing and Validation
• Often,
goodness/accuracy of a model cannot be assessed until solutions are
generated.
• Small
test problems having known, or at least expected, solutions can be used for
model testing and validation.
• If the model generates expected solutions, use the model on the full-scale problem.
• If
inaccuracies or potential shortcomings inherent in the model are identified, take
corrective action such as:
● Collection of more-accurate input data
● Modification of the model
23
Report Generation
•A managerial report, based on the results of the model, should be prepared.
• The report should be easily understood by the decision maker.
• The report should include:
● the recommended decision
● other pertinent information about the results (for example, how sensitive the model
solution is to the assumptions and data used in the model)
24
Example 1
• Iron
Works, Inc. manufactures two products made from steel and just received this
month's allocation of b pounds of steel. It takes a1 pounds of steel to make a unit of
product 1 and a2 pounds of steel to make a unit of product 2.
● Let x1 and x2 denote this month's production level of product 1 and product 2,
respectively. Denote by p1 and p2 the unit profits for products 1 and 2, respectively.
● Iron Works has a contract calling for at least m units of product 1 this month. The firm's
facilities are such that at most u units of product 2 may be produced monthly.
25
Example 1
• Mathematical Model
● The total monthly profit =
(profit per unit of product 1) x (monthly production of product 1)
+ (profit per unit of product 2) x (monthly production of product 2)
= p1x1 + p2x2
● We want to maximize total monthly profit:
Max p1x1 + p2x2
26
Example 1
• Mathematical Model (continued)
● The total amount of steel used during monthly production equals:
(steel required per unit of product 1) x (monthly production of product 1)
+ (steel required per unit of product 2) x (monthly production of product 2)
= a1x1 + a2x2
● This quantity must be less than or equal to the allocated b pounds of steel:
a1x1 + a2x2 < b
27
Example 1
• Mathematical Model (continued)
● The monthly production level of product 1 must be greater than or equal to m :
x1 > m
● The monthly production level of product 2 must be less than or equal to u :
x2 < u
● However, the production level for product 2 cannot be negative:
x2 > 0
28
Example 1
• Mathematical Model Summary
Objective Function
Max p1x1 + p2x2
“Subject to”
29
Example 1
• Question
Suppose b = 2000, a1 = 2, a2 = 3, m = 60, u = 720, p1 = 100, p2 = 200.
Rewrite the model with these specific values for the uncontrollable inputs.
• Answer
Substituting, the model is:
30
Example 1
• Question
The optimal solution to the current model is x1 = 60 and x2 = 626 2/3. If the
product were engines, explain why this is not a true optimal solution for the
"real-life" problem.
• Answer
One cannot produce and sell 2/3 of an engine. Thus the problem is further
restricted by the fact that both x1 and x2 must be integers. (They could remain
fractions if it is assumed these fractions are work in progress to be completed the
next month.)
31
Example 1
Uncontrollable Inputs
$100 profit per unit Prod. 1
$200 profit per unit Prod. 2
2 lbs. steel per unit Prod. 1
3 lbs. Steel per unit Prod. 2
2000 lbs. steel allocated
60 units minimum Prod. 1
720 units maximum Prod. 2
0 units minimum Prod. 2
Max 100(60) + 200(626.67)
60 units Prod. 1 s.t. 2(60) + 3(626.67) < Profit =
626.67 units Prod. 2000 $131,333.33
2 60 > 60 Steel Used = 2000
Controllable Inputs 626.67 < 720 Output
626.67 > 0
Mathematical Model
32
Example 2
• Ponderosa Development Corporation (PDC) is a small real estate developer that
builds only one style house. The selling price of the house is $115,000.
• Landfor each house costs $55,000 and lumber, supplies, and other materials run
another $28,000 per house. Total labor costs are approximately $20,000 per house.
• Ponderosa leases office space for $2,000 per month. The cost of supplies, utilities,
and leased equipment runs another $3,000 per month.
• Theone salesperson of PDC is paid a commission of $2,000 on the sale of each
house. PDC has seven permanent office employees whose monthly salaries are
given on the next slide.
33
Example 2
Employee Monthly Salary
President $10,000
VP, Development 6,000
VP, Marketing 4,500
Project Manager 5,500
Controller 4,000
Office Manager 3,000
Receptionist 2,000
34
Example 2
• Question
Identify all costs and denote the marginal cost and marginal revenue for each
house.
• Answer
The monthly salaries total $35,000 and monthly office lease and supply costs total
another $5,000. This $40,000 is a monthly fixed cost.
The total cost of land, material, labor, and sales commission per house, $105,000,
is the marginal cost for a house.
The selling price of $115,000 is the marginal revenue per house.
35
Example 2
• Question
Write the monthly cost function c (x), revenue function r (x), and profit function p
(x).
• Answer
36
Example 2
Question
What is the breakeven point for monthly sales of the houses?
Answer
r (x ) = c (x )
115,000x = 105,000x + 40,000
Solving, x = 4.
Question
What is the monthly profit if 12 houses per month are built and sold?
Answer
p (12) = 10,000(12) - 40,000 = $80,000 monthly profit
37
Example 2
1200 Total Revenue =
115,000x
Thousands of Dollars
1000
800
600
Total Cost =
400
40,000 + 105,000x
200
Break-Even Point = 4 Houses
0
0 1 2 3 4 5 6 7 8 9 10
Number of Houses Sold (x)
38
Using Excel for Breakeven Analysis
•A spreadsheet software package such as Microsoft Excel can be used to perform a
quantitative analysis of Ponderosa Development Corporation.
• We will enter the problem data in the top portion of the spreadsheet.
• The bottom of the spreadsheet will be used for model development.
39
Example 2
• Formula Spreadsheet
40
Example 2
• Question
What is the monthly profit if 12 houses are built and sold per month?
• Answer
41
Example 2
• Question
What is the breakeven point for monthly sales of the houses?
• Spreadsheet Solution:
● One way to determine the break-even point using a spreadsheet is to use the Goal
Seek tool.
● Microsoft Excel ‘s Goal Seek tool allows the user to determine the value for an
input cell that will cause the output cell to equal some specified value.
● In our case, the goal is to set Total Profit to zero by seeking an appropriate value
for Sales Volume.
42
Example 2
• Spreadsheet Solution: Goal Seek Approach
Using Excel ’s Goal Seek Tool
Step 1: Select Data on menu
Step 2: Choose What-If Analysis in Data Tools submenu
Step 3: Choose the Goal Seek option
Step 4: When the Goal Seek dialog box appears:
Enter B9 in the Set cell box
Enter 0 in the To value box
Enter B6 in the By changing cell box
Click OK
43
Example 2
• Spreadsheet Solution: Goal Seek Approach
Completed Goal Seek Dialog Box
44
Example 2
Spreadsheet Solution: Goal Seek Approach
45
Management Science Techniques
Linear Programming Simulation
Integer Linear Decision Analysis
Programming Goal Programming
Nonlinear Programming Analytic Hierarchy Process
PERT/CPM Forecasting
Inventory Models Markov-Process Models
Waiting Line Models Distribution/Network Models
46
Management Science Techniques
• LinearProgramming is a problem-solving approach developed for situations
involving maximizing or minimizing a linear function subject to linear
constraints that limit the degree to which the objective can be pursued.
• IntegerLinear Programming is an approach used for problems that can be set
up as linear programs with the additional requirement that some or all of the
decision recommendations be integer values.
• Non Linear Programming is a problem-solving approach developed for
situations involving maximizing or minimizing a linear/non-linear function
subject to linear/non-linear constraints that limit the degree to which the
objective can be pursued.
47
Management Science Techniques
• Network Models are specialized solution procedures for problems in transportation
system design, information system design, project scheduling.
• Projectscheduling: PERT (Program Evaluation and Review Technique) and CPM
(Critical Path Method) help managers responsible for planning, scheduling, and
controlling projects that consist of numerous separate jobs or tasks performed by a
variety of departments, individuals, and so forth.
• Inventory Models are used by managers faced with the dual problems of
maintaining sufficient inventories to meet demand for goods and, at the same time,
incurring the lowest possible inventory holding costs.
48
Management Science Techniques
• WaitingLine (or Queuing) Models help managers understand and make better
decisions concerning the operation of systems involving waiting lines.
• Simulationis a technique used to model the operation of a system. This technique
employs a computer program to model the operation and perform simulation
computations.
• DecisionAnalysis can be used to determine optimal strategies in situations
involving several decision alternatives and an uncertain pattern of future events.
• ForecastingMethods are techniques that can be used to predict future aspects of a
business operation.
49
Management Science Techniques
• GoalProgramming is a technique for solving multi-criteria decision problems,
usually within the framework of linear programming.
• AnalyticHierarchy Process is a multi-criteria decision-making technique that
permits the inclusion of subjective factors in arriving at a recommended decision.
• Markov-Process Models are useful in studying the evolution of certain systems over
repeated trials (such as describing the probability that a machine, functioning in one
period, will function or break down in another period).
50
Operations Research
Term II, PGP 2020-22, Session 2
1
Session 2: Linear Programming Formulation
• Linear Programming Problem
• Problem Formulation
• Modelling in MS Excel
2
Linear Programming
• Linear programming has nothing to do with computer programming.
• The use of the word “programming” here means “choosing a course of action.”
• Linear
programming involves choosing a course of action when the mathematical
model of the problem contains only linear functions.
3
Linear Programming (LP) Problem
• Themaximization 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.
• Anoptimal solution is a feasible solution that results in the largest possible
objective function value when maximizing (or smallest when minimizing).
4
Linear Programming (LP) Problem
• Ifboth 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.
5
Problem Formulation
• Problem formulation or modeling is the process of translating a verbal statement of
a problem into a mathematical statement.
• Formulating models is an art that can only be mastered with practice and
experience.
• Every LP problems has some unique features, but most problems also have common
features.
• General guidelines for LP model formulation are illustrated on the slides that
follow.
6
Guidelines for Model Formulation
• 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.
7
Chapter Example: 9
9. Suppose we modify the production model in the example of previous session to
obtain the following mathematical model:
Max 10x
s. t. ax ≤ 40
x≥0
where a is the number of hours of production time required for each unit produced.
With a = 5, the optimal solution is x = 8.
If we have a stochastic model with a = 3, a = 4, a = 5, or a = 6 as the possible
values for the number of hours required per unit, what is the optimal value for x?
What problems does this stochastic model cause?
8
Chapter Example: 10
10. A retail store in Des Moines, Iowa, receives shipments of a particular product
from Kansas City and Minneapolis. Let
x = number of units of the product received from Kansas City
y = number of units of the product received from Minneapolis
a. Write an expression for the total number of units of the product received by the
retail store in Des Moines.
9
Chapter Example: 10
b. Shipments from Kansas City cost $0.20 per unit, and shipments from Minneapolis
cost $0.25 per unit. Develop an objective function representing the total cost of
shipments to Des Moines.
c. Assuming the monthly demand at the retail store is 5000 units, develop a
constraint that requires 5000 units to be shipped to Des Moines.
d. No more than 4000 units can be shipped from Kansas City, and no more than
3000 units can be shipped from Minneapolis in a month. Develop constraints to
model this situation.
e. Of course, negative amounts cannot be shipped. Combine the objective function
and constraints developed to state a mathematical model for satisfying the demand
at the Des Moines retail store at minimum cost.
10
Chapter Example: 11
11. For most products, higher prices result in a decreased demand, whereas lower
prices result in an increased demand. Let
d = annual demand for a product in units
p = price per unit
Assume that a firm accepts the following price-demand relationship as being
realistic:
d = 800 – 10p
where p must be between $20 and $70.
a. How many units can the firm sell at the $20 per-unit price? At the $70 per-unit
price?
11
Chapter Example: 11
b. What happens to annual units demanded for the product if the firm increases the
per unit price from $26 to $27? From $42 to $43? From $68 to $69? What is the
suggested relationship between the per-unit price and annual demand for the
product in units?
c. Show the mathematical model for the total revenue (TR), which is the annual
demand multiplied by the unit price.
d. Based on other considerations, the firm's management will only consider price
alternatives of $30, S40, and $50. Use your model from part (b) to determine the
price alternative that will maximize the total revenue.
e. What are the expected annual demand and the total revenue corresponding to your
recommended price?
12
Chapter Example: 12
12. The O'Neill Shoe Manufacturing Company will produce a special-style shoe if the
order size is large enough to provide a reasonable profit. For each special-style
order, the company incurs a fixed cost of $2000 for the production setup. The
variable cost is $60 per pair, and each pair sells for $80.
a. Let x indicate the number of pairs of shoes produced. Develop a mathematical
model for the total cost of producing x pairs of shoes.
b. Let P indicate the total profit. Develop a mathematical model for the total profit
realized from an order for x pairs of shoes.
c. How large must the shoe order be before O'Neill will break even?
13
Chapter Example: 16
16. Financial Analysts, Inc., is an investment firm that manages stock portfolios for a
number of clients. A new client is requesting that the firm handle an $800,000
portfolio. As an initial investment strategy, the client would like to restrict the
portfolio to a mix of the following two stocks:
14
Chapter Example: 16
a. Develop the objective function, assuming that the client desires to maximize the
total annual return.
b. Show the mathematical expression for each of the following three constraints:
(1) Total investment funds available are $800,000.
(2) Maximum Oil Alaska investment is $500,000.
(3) Maximum Southwest Petroleum investment is $450,000.
15
Chapter Example: 17
17. Models of inventory systems frequently consider the relationships among a beginning
inventory, a production quantity, a demand or sales, and an ending inventory. For a given
production period j, let
sj–1 = ending inventory from the previous period (beginning inventory for period j)
xj = production quantity in period j
dj = demand in period j
sj = ending inventory for period j
a. Write the mathematical relationship or model that describes how these four variables are
related.
b. What constraint should be added if production capacity for period j is given by Cj?
c. What constraint should be added if inventory requirements for period j mandate an ending
inventory of at least Ij?
16
Operations Research
Term II, PGP 2020-22, Session 3
1
Session 3: LP - Graphical Method
•A Simple Maximization Problem
• Graphical Solution Procedure
• Extreme Points and the Optimal Solution
• Computer Solutions
•A Simple Minimization Problem
• Special Cases
2
Linear Programming
• 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.
3
Example 1
• LP Formulation
Objective
Max 5x1 + 7x2 Function
s.t. x1 < 6
“Regular”
2x1 + 3x2 < 19
Constraints
x1 + x2 < 8
x1 > 0 and x2 > 0 Non-negativity
Constraints
4
Example 1: Graphical Solution
• First Constraint Graphed
x2
8
7 x1 = 6
6
Shaded region
5 contains all
4 feasible points
for this constraint
3
2
(6, 0)
1
x1
1 2 3 4 5 6 7 8 9 10
5
Example 1: Graphical Solution
• Second Constraint Graphed
x2
8 (0, 6.3333)
7
6
5 2x1 + 3x2 = 19
4
3 Shaded
region contains
2 all feasible points (9.5, 0)
1 for this constraint
x1
1 2 3 4 5 6 7 8 9 10
6
Example 1: Graphical Solution
• Third Constraint Graphed
x2
(0, 8)
8
7
6 x1 + x2 = 8
5
4
3 Shaded
region contains
2 all feasible points
1 for this constraint (8, 0)
x1
1 2 3 4 5 6 7 8 9 10
7
Example 1: Graphical Solution
• Combined-Constraint Graph Showing Feasible Region
x2
8
x1 + x2 = 8
7
6 x1 = 6
5
4
3
Feasible 2x1 + 3x2 = 19
2
Region
1
x1
1 2 3 4 5 6 7 8 9 10
8
Example 1: Graphical Solution
• Objective Function Line
x2
8
7
(0, 5)
6 Objective Function
5 5x1 + 7x2 = 35
4
3
2
1
(7, 0)
x1
1 2 3 4 5 6 7 8 9 10
9
Example 1: Graphical Solution
• Selected Objective Function Lines
8
7
5x1 + 7x2 = 35
6
5 5x1 + 7x2 = 39
4
3 5x1 + 7x2 = 42
2
1
x1
1 2 3 4 5 6 7 8 9 10
10
Example 1: Graphical Solution
• Optimal Solution
x2
Maximum
Objective Function Line
8
5x1 + 7x2 = 46
7
6 Optimal Solution
(x1 = 5, x2 = 3)
5
4
3
2
1
x1
1 2 3 4 5 6 7 8 9 10
11
Summary of the Graphical Solution (Max)
• Prepare a graph of the feasible solutions for each of the constraints.
• Determine the feasible region that satisfies all the constraints simultaneously.
• Draw an objective function line.
• Move parallel objective function lines toward larger objective function values
without entirely leaving the feasible region.
• Any feasible solution on the objective function line with the largest value is an
optimal solution.
12
Slack and Surplus Variables
•A linear program in which all the variables are non-negative and all the constraints
are equalities is said to be in standard form.
• Standard form is attained by adding slack variables to "less than or equal to"
constraints, and by subtracting surplus variables from "greater than or equal to"
constraints.
• Slack and surplus variables represent the difference between the left and right sides
of the constraints.
• Slack and surplus variables have objective function coefficients equal to 0.
13
Slack Variables (for < constraints)
Example 1 in Standard Form
s.t. x1 + s1 = 6
2x1 + 3x2 + s2 = 19
x1 + x2 + s3 = 8
14
Slack Variables
• Optimal Solution
x2 Third
Constraint: First
8 x1 + x2 = 8 Constraint:
x1 = 6
7
s3 = 0
6 s1 = 1
5
Second
4
Constraint:
3 2x1 + 3x2 = 19
Optimal
2
Solution s2 = 0
1 (x1 = 5, x2 = 3)
x1
1 2 3 4 5 6 7 8 9 10
15
Extreme Points and the Optimal Solution
• The corners or vertices of the feasible region are referred to as the extreme points.
• An optimal solution to an LP problem can be found at an extreme point of the
feasible region.
• When looking for the optimal solution, you do not have to evaluate all feasible
solution points.
• You have to consider only the extreme points of the feasible region.
16
Example 1: Extreme Points
x2
8
7
5 (0, 6 1/3)
6
5
4
4 (5, 3)
3 Feasible
2 Region 3 (6, 2)
1 1 (0, 0) 2 (6, 0)
x1
1 2 3 4 5 6 7 8 9 10
17
Computer Solutions
• LPproblems involving 1000s of variables and 1000s of constraints are now
routinely solved with computer packages.
• Linear
programming solvers are now part of many spreadsheet packages, such as
Microsoft Excel.
• Leading
commercial packages include CPLEX, LINGO, MOSEK, Xpress-MP, and
Premium Solver for Excel.
18
Interpretation of Computer Output
• In this chapter we will discuss the following output:
● objective function value
● values of the decision variables
● reduced costs
● slack and surplus
• In the next chapter we will discuss how an optimal solution is affected by a change
in:
● a coefficient of the objective function
● the right-hand side value of a constraint
19
Example 1: Spreadsheet Solution
• Partial Spreadsheet Showing Problem Data
20
Example 1: Spreadsheet Solution
• Partial Spreadsheet Showing Solution
21
Example 1: Spreadsheet Solution
• Interpretation of Computer Output
22
Reduced Cost
• The reduced cost for a decision variable whose value is 0 in the optimal solution is:
the amount the variable's objective function coefficient would have to improve (increase
for maximization problems, decrease for minimization problems) before this variable
could assume a positive value.
• The reduced cost for a decision variable whose value is > 0 in the optimal solution
is 0.
23
Example 1: Spreadsheet Solution
• Reduced Costs
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Valu Cost Coefficient Increase Decrease
$B$8 X1 e
5.000 0.000 5.000 2.000 0.333
$C$8 X2 3.000 0.000 7.000 0.500 2.000
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Valu Price R.H. Side Increase Decrease
$B$13 #1 e5.000 0.000 6.000 1E+30 1.000
$B$14 #2 19.000 2.000 19.000 5.000 1.000
$B$15 #3 8.000 1.000 8.000 0.333 1.667
24
Example 2: A Simple Minimization Problem
• LP Formulation
Min 5x1 + 2x2
s.t. 2x1 + 5x2 > 10
4x1 - x2 > 12
x1 + x2 > 4
x1, x2 > 0
25
Example 2: Graphical Solution
• Graph the Constraints
Constraint 1: When x1 = 0, then x2 = 2; when x2 = 0, then x1 = 5. Connect (5,0) and
(0,2). The “>” side is above this line.
26
Example 2: Graphical Solution
• Constraints Graphed
x2
6
Feasible Region
5
4x1 - x2 > 12
4
x1 + x2 > 4
3
x1
1 2 3 4 5 6
27
Example 2: Graphical Solution
• Graph the Objective Function
Set the objective function equal to an arbitrary constant (say 20) and graph it. For
5x1 + 2x2 = 20, when x1 = 0, then x2 = 10; when x2= 0, then x1 = 4. Connect (4,0)
and (0,10).
28
Example 2: Graphical Solution
• Objective Function Graphed
x2 Min 5x1 + 2x2
6
5
4x1 - x2 > 12
4
x1 + x2 > 4
3
x1
1 2 3 4 5 6
29
Example 2: Graphical Solution
• Solve for the Extreme Point at the Intersection of the Two Binding Constraints
4x1 - x2 = 12
x1+ x2 = 4
Adding these two equations gives:
5x1 = 16 or x1 = 16/5
Substituting this into x1 + x2 = 4 gives: x2 = 4/5
30
Example 2: Graphical Solution
• Optimal Solution
x2
6
4x1 - x2 > 12
5
x1 + x2 > 4
4
Optimal Solution:
3
x1 = 16/5, x2 = 4/5,
2 5x1 + 2x2 = 17.6
x1
1 2 3 4 5 6
31
Summary of the Graphical Solution (Min)
• Prepare a graph of the feasible solutions for each of the constraints.
• Determine the feasible region that satisfies all the constraints simultaneously.
• Draw an objective function line.
• Move parallel objective function lines toward smaller objective function values
without entirely leaving the feasible region.
• Any feasible solution on the objective function line with the smallest value is an
optimal solution.
32
Surplus Variables
• Example 2 in Standard Form
s1 , s2 , and s3 are
surplus variables
33
Example 2: Spreadsheet Solution
• Partial Spreadsheet Showing Solution
34
Example 2: Spreadsheet Solution
• Interpretation of Computer Output
35
Feasible Region
• Thefeasible region for a two-variable LP problem can be nonexistent, a single
point, a line, a polygon, or an unbounded area.
• Any linear program falls in one of four categories:
● is infeasible
● has a unique optimal solution
● has alternative optimal solutions
● has an objective function that can be increased without bound
•A feasible region may be unbounded and yet there may be optimal solutions. This
is common in minimization problems and is possible in maximization problems.
36
Special Cases
• Alternative Optimal Solutions
In the graphical method, if the objective function line is parallel to a boundary
constraint in the direction of optimization, there are alternate optimal solutions, with
all points on this line segment being optimal.
37
Example: Alternative Optimal Solutions
• Consider the following LP problem.
38
Example: Alternative Optimal Solutions
• Boundary constraint 2x1 + 3x2 < 18 and objective function Max 4x1 + 6x2
are parallel. All points on line segment AB are optimal solutions.
x2 x1 + x2 < 7
7
6 Max 4x1 + 6x2
A
5
B x1 < 6
4
3 2x1 + 3x2 < 18
2
1
x1
1 2 3 4 5 6 7 8 9 10
39
Special Cases
• Infeasibility
● No solution to the LP problem satisfies all the constraints, including the non-negativity
conditions.
● Graphically, this means a feasible region does not exist.
● Causes include:
● A formulation error has been made.
● Management’s expectations are too high.
● Too many restrictions have been placed on the problem (i.e. the problem is over-constrained).
40
Example: Infeasible Problem
• Consider the following LP problem.
Max 2x1 + 6x2
s.t. 4x1 + 3x2 < 12
2x1 + x2 > 8
x1, x2 > 0
41
Example: Infeasible Problem
• Thereare no points that satisfy both constraints, so there is no feasible region (and
no feasible solution).
x2
10
2x1 + x2 > 8
8
6
4x1 + 3x2 < 12
4
x1
2 4 6 8 10
42
Special Cases
• Unbounded
● The solution to a maximization LP problem is unbounded if the value of the solution may
be made indefinitely large without violating any of the constraints.
● For real problems, this is the result of improper formulation. (Quite likely, a constraint
has been inadvertently omitted.)
43
Example: Unbounded Solution
• Consider the following LP problem.
x1, x2 > 0
44
Example: Unbounded Solution
• Thefeasible region is unbounded and the objective function line can be moved
outward from the origin without bound, infinitely increasing the objective function.
x2
10
3x1 + x2 > 8
8
Ma
6 x
4x
1 +5
4 x
2 x1 + x2 > 5
2
x1
2 4 6 8 10
45
Operations Research
Term II, PGP 2020-22, Session 4
1
Session 4: LP Simplex Method
• An Overview of the Simplex Method
• Standard Form
• Tableau Form
• Setting Up the Initial Simplex Tableau
• Improving the Solution
• Calculating the Next Tableau
• Solving a Minimization Problem
• Special Cases
2
Overview of the Simplex Method
• Steps Leading to the Simplex Method
3
Standard Form
• An LP is in standard form when:
● All RH variables are non-negative
● All constraints are equalities
• Putting an LP formulation into standard form involves:
● Adding slack variables to “<”constraints
● Subtracting surplus variables from “>” constraints
● Adding artificial variable
4
Simplex Method
• The simplex method is an algebraic procedure. However, its underlying concepts
are geometric.
• Corner Point Solutions
• Corner Point Feasible Solutions
• Optimality test: Consider any linear programming problem that possesses at least
one optimal solution. If a CPF solution has no adjacent CPF solutions that are better
(as measured by Z), then it must be an optimal solution.
5
Simplex Method: Key Solution Concepts
concept 1: The simplex method focuses solely on CPF solutions. For any
• Solution
problem with at least one optimal solution, finding one requires only finding a best
CPF solution.
• Solution concept 2: The simplex method is an iterative algorithm (a systematic
solution procedure that keeps repeating a fixed series of steps, called an iteration,
until a desired result has been obtained) with the following structure.
6
Simplex Method: Key Solution Concepts
• Solution concept 3: Whenever possible, the initialization of the simplex method
chooses the origin (all decision variables equal to zero) to be the initial CPF
solution. When there are too many decision variables to find an initial CPF solution
graphically, this choice eliminates the need to use algebraic procedures to find and
solve for an initial CPF solution.
• Solution concept 4: Given a CPF solution, it is much quicker computationally to
gather information about its adjacent CPF solutions than about other CPF solutions.
Therefore, each time the simplex method performs an iteration to move from the
current CPF solution to a better one, it always chooses a CPF solution that is
adjacent to the current one. No other CPF solutions are considered. Consequently,
the entire path followed to eventually reach an optimal solution is along the edges of
the feasible region.
7
Simplex Method: Key Solution Concepts
• Solution concept 5: After the current CPF solution is identified, the simplex
method examines each of the edges of the feasible region that emanate from this
CPF solution. Each of these edges leads to an adjacent CPF solution at the other
end, but the simplex method does not even take the time to solve for the adjacent
CPF solution. Instead, it simply identifies the rate of improvement in Z that would
be obtained by moving along the edge. Among the edges with a positive rate of
improvement in Z, it then chooses to move along the one with the largest rate of
improvement in Z. The iteration is completed by first solving for the adjacent CPF
solution at the other end of this one edge and then relabeling this adjacent CPF
solution as the current CPF solution for the optimality test and (if needed) the next
iteration.
8
Graphical Method
9
Simplex Method: Key Solution Concepts
• Solution concept 6: Solution concept 5 describes how the simplex method
examines each of the edges of the feasible region that emanate from the current CPF
solution. This examination of an edge leads to quickly identifying the rate of
improvement in Z that would be obtained by moving along the edge toward the
adjacent CPF solution at the other end. A positive rate of improvement in Z implies
that the adjacent CPF solution is better than the current CPF solution, whereas a
negative rate of improvement in Z implies that the adjacent CPF solution is worse.
Therefore, the optimality test consists simply of checking whether any of the edges
give a positive rate of improvement in Z. If none do, then the current CPF solution is
optimal.
10
Simplex Method
• The algebraic procedure is based on solving systems of equations. Therefore, the
first step in setting up the simplex method is to convert the functional inequality
constraints to equivalent equality constraints. (The nonnegativity constraints are left
as inequalities because they are treated separately.) This conversion is accomplished
by introducing slack variables.
• Upon the introduction of slack variables for the other functional constraints, the
original linear programming model for the example (shown below on the left) can
now be replaced by the equivalent model (called the augmented form of the model)
shown below on the right on the next slide.
11
Simplex Method: Original & Augmented
12
Simplex Method
13
Simplex Method
• An augmented solution is a solution for the original variables (the decision
variables) that has been augmented by the corresponding values of the slack
variables.
•A basic solution is an augmented corner-point solution.
•A basic feasible (BF) solution is an augmented CPF solution.
14
Simplex Method
• A basic solution has the following properties:
1. Each variable is designated as either a nonbasic variable or a basic variable.
2. The number of basic variables equals the number of functional constraints (now
equations). Therefore, the number of nonbasic variables equals the total number of
variables minus the number of functional constraints.
3. The nonbasic variables are set equal to zero.
4. The values of the basic variables are obtained as the simultaneous solution of the
system of equations (functional constraints in augmented form). (The set of basic
variables is often referred to as the basis.)
5. If the basic variables satisfy the nonnegativity constraints, the basic solution is a BF
solution.
15
Simplex Method
• Two BF solutions are adjacent if all but one of their nonbasic variables are the
same. This implies that all but one of their basic variables also are the same,
although perhaps with different numerical values.
Solution x1 x2 x3 x4 x5 Z
0, 0 0, 0, 4, 12, 18 0
4, 0 4, 0, 0, 12, 6 12
4, 3 4, 3, 0, 6, 0 27
2, 6 2, 6, 2, 0, 0 36
0, 6 0, 6, 4, 0, 6 30
17
Simplex Method
• The tabular form of the simplex method uses a simplex tableau to compactly
display the system of equations yielding the current BF solution. For this solution,
each variable in the leftmost column equals the corresponding number in the
rightmost column (and variables not listed equal zero). When the optimality test or
an iteration is performed, the only relevant numbers are those to the right of the Z
column. The term row refers to just a row of numbers to the right of the Z column
(including the right-side number), where row i corresponds to Eq. (i).
18
Simplex Method
Introduce slack variables. Select the decision variables to be the
• Initialization.
initial nonbasic variables (set equal to zero) and the slack variables to be the initial
basic variables.
• Optimality Test. The current BF solution is optimal if and only if every coefficient
in row 0 is nonnegative ( 0). If it is, stop; otherwise, go to an iteration to obtain the
next BF solution, which involves changing one nonbasic variable to a basic
variable (step 1) and vice versa (step 2) and then solving for the new solution (step
3).
19
Simplex Method: Iteration
Step 1: Determine the entering basic variable by selecting the variable (automatically a
nonbasic variable) with the negative coefficient having the largest absolute value (i.e., the
“most negative” coefficient) in Eq. (0). Put a box around the column below this coefficient,
and call this the pivot column.
Step 2: Determine the leaving basic variable by applying the minimum ratio test.
● Minimum Ratio Test
● Pick out each coefficient in the pivot column that is strictly positive (>0).
● Divide each of these coefficients into the right-side entry for the same row.
● Identify the row that has the smallest of these ratios.
● The basic variable for that row is the leaving basic variable, so replace that variable by the entering
basic variable in the basic variable column of the next simplex tableau.
Put a box around this row and call it the pivot row. Also call the number that is in both
boxes the pivot number.
20
Simplex Method: Iteration
Step 3: Solve for the new BF solution by using elementary row operations (multiply
or divide a row by a nonzero constant; add or subtract a multiple of one row to
another row) to construct a new simplex tableau in proper form from Gaussian
Elimination below the current one, and then return to the optimality test. The
specific elementary row operations that need to be performed are listed below.
● Divide the pivot row by the pivot number. Use this new pivot row in steps 2 and 3.
● For each other row (including row 0) that has a negative coefficient in the pivot column,
add to this row the product of the absolute value of this coefficient and the new pivot row.
● For each other row that has a positive coefficient in the pivot column, subtract from this
row the product of this coefficient and the new pivot row.
21
Simplex Method
22
Simplex Method
23
Simplex Method
24
Simplex Method
25
26
Decision Points
• Tie for the Entering Basic Variable
• Tie for the Leaving Basic Variable
• No Leaving Basic Variable – Unbounded Z
• Multiple Optimal Solutions
27
Multiple Optimal Solution
28
Multiple Optimal Solution
29
Multiple Optimal Solution
30
31
Special Case: Equality Constraint
32
Special Case: Equality Constraint
33
Special Case: Equality Constraint
34
Special Case: Equality Constraint
35
Special Case: Equality Constraint
36
Special Case: Equality Constraint
37
38
Special Case: Greater than or Equal to
39
Special Case: Greater than or Equal to
40
Special Case: Greater than or Equal to
41
Special Case: Greater than or Equal to
42
43
Operations Research
Term II, PGP 2020-22, Session 5-6
1
Session 5: LP Duality
• Primal and Dual Problems
• Property
• Theorem
• Complementary Property
• Shadow Price
2
Canonical Form
•A maximization linear program is said to be in canonical form if all constraints are
"less than or equal to" constraints and the variables are non-negative.
•Aminimization linear program is said to be in canonical form if all constraints are
"greater than or equal to" constraints and the variables are non-negative.
3
Canonical Form
• Convert any linear program to a maximization problem in canonical form as
follows:
● minimization objective function:
multiply it by -1
● "less than or equal to" constraint:
leave it alone
● "greater than or equal to" constraint:
multiply it by -1
● "equal to" constraint:
form two constraints, one "less than or equal to", the other "greater or equal to";
then multiply this "greater than or equal to" constraint by -1.
4
Primal and Dual Problems
• Everylinear program (called the primal) has associated with it another linear
program called the dual.
• Thedual of a maximization problem in canonical form is a minimization problem in
canonical form.
• The rows and columns of the two programs are interchanged and hence the
objective function coefficients of one are the right hand side values of the other and
vice versa.
5
Primal and Dual Problems
• Theoptimal value of the objective function of the primal problem equals the
optimal value of the objective function of the dual problem.
• Solving
the dual might be computationally more efficient when the primal has
numerous constraints and few variables.
6
Primal vs Dual
• With the primal problem in maximization form, the dual problem is in minimization
form instead. Furthermore, the dual problem uses exactly the same parameters as
the primal problem, but in different locations, as summarized below.
1. The coefficients in the objective function of the primal problem are the right-hand
sides of the functional constraints in the dual problem.
2. The right-hand sides of the functional constraints in the primal problem are the
coefficients in the objective function of the dual problem.
3. The coefficients of a variable in the functional constraints of the primal problem
are the coefficients in a functional constraint of the dual problem.
7
Primal vs Dual
8
Primal vs Dual
9
Primal vs Dual: Property
• Weak duality property: If x is a feasible solution for the primal problem and y is a
feasible solution for the dual problem, then cx < yb.
• Strong duality property: If x* is an optimal solution for the primal problem and y*
is an optimal solution for the dual problem, then cx* = y*b.
10
Primal vs Dual
• Complementary solutions property: At each iteration, the simplex method
simultaneously identifies a CPF solution x for the primal problem and a
complementary solution y for the dual problem (found in row 0, the coefficients of
the slack variables), where cx = yb.
x is not optimal for the primal problem, then y is not feasible for the dual
• If
problem.
• Complementary optimal solutions property: At the final iteration, the simplex
method simultaneously identifies an optimal solution x* for the primal problem and
a complementary optimal solution y* for the dual problem (found in row 0, the
coefficients of the slack variables), where cx* = y*b.
• The yi* are the shadow prices for the primal problem.
11
Primal vs Dual: Symmetry Property
• Symmetry property: For any primal problem and its dual problem, all
relationships between them must be symmetric because the dual of this dual
problem is this primal problem.
12
Duality Theorem
The following are the only possible relationships between the primal and dual problems.
1. If one problem has feasible solutions and a bounded objective function (and so has an
optimal solution), then so does the other problem, so both the weak and strong duality
properties are applicable.
2. If one problem has feasible solutions and an unbounded objective function (and so no
optimal solution), then the other problem has no feasible solutions.
3. If one problem has no feasible solutions, then the other problem has either no feasible
solutions or an unbounded objective function.
Primal Dual
Feasible Solution and Bounded Objective Function Feasible Solution and Bounded Objective Function
Feasible Solution and Unbounded Objective Function No Feasible Solutions
No Feasible Solutions No Feasible Solutions
No Feasible Solutions Feasible Solution and Unbounded Objective Function
13
Complementary Property
• Complementary basic solutions property: Each basic solution in the primal
problem has a complementary basic solution in the dual problem, where their
respective objective function values (Z and W) are equal. Given row 0 of the
simplex tableau for the primal basic solution, the complementary dual basic solution
(y, z – c) is found as shown in the next slide.
14
Row 0 and Corresponding Dual Solution
15
Complementary Property
•
16
Association between Variables
17
Complementary Basic Solutions
18
Primal Dual
Answer Report Answer Report
R
e
d
u
R
c
ed
e
uc
d
ed
C
Ty Not C
o
pe atio os Type Notat V V
V V st
of n in t/ of ion in al al
al al /
Var Si S Varia Simpl u u
ue ue S
iabl mp ha ble ex e e
h
Sensitivity Report e lex do Sensitivity Report a
w
d
Pr
o
ic
w
e
P
ri
c
e
20
Session 6: LP Sensitivity
• Shadow Price
• Reduced Cost
• Objective Function Coefficients and Range of Optimality
• Right-Hand Side Values and Range of Feasibility
21
Introduction to Sensitivity Analysis
• Sensitivity
analysis (or post-optimality analysis) is used to determine how the
optimal solution is affected by changes, within specified ranges, in:
● the objective function coefficients
● the right-hand side (RHS) values
• Sensitivity
analysis is important to a manager who must operate in a dynamic
environment with imprecise estimates of the coefficients.
• Sensitivity analysis allows a manager to ask certain what-if questions about the
problem.
22
Sensitivity Analysis: Computer Solution
• Softwarepackages such as LINGO and Microsoft Excel provide the following LP
information:
• Information about the objective function:
● its optimal value
● coefficient ranges (ranges of optimality)
• Information about the decision variables:
● their optimal values
● their reduced costs
• Information about the constraints:
● the amount of slack or surplus
● the dual prices
● right-hand side ranges (ranges of feasibility)
23
Objective Function Coefficients
• Letus consider how changes in the objective function coefficients might affect the
optimal solution.
• The range of optimality for each coefficient provides the range of values over which
the current solution will remain optimal.
• Managers should focus on those objective coefficients that have a narrow range of
optimality and coefficients near the endpoints of the range.
24
O.F. Coefficients and Range of Optimality
• Therange of optimality for an objective function coefficient is the range of that
coefficient for which the current optimal solution will remain optimal (keeping all
other coefficients constant).
• The objective function value might change in this range.
25
Simultaneous Changes
• Range of Optimality and 100% Rule
The 100% rule states that simultaneous changes in objective function coefficients
will not change the optimal solution as long as the sum of the percentages of the
change divided by the corresponding maximum allowable change in the range of
optimality for each coefficient does not exceed 100%.
26
Simultaneous Changes
• Forsimultaneous changes of two or more objective function coefficients the 100%
rule provides a guide to whether the optimal solution changes.
• It
states that as long as the sum of the percent changes in the coefficients from their
current value to their maximum allowable increase or decrease does not exceed
100%, the solution will not change.
• Similarly,
for shadow prices, the 100% rule can be applied to changes in the
right-hand side coefficients.
27
Right-Hand Sides
• Letus consider how a change in the RHS for a constraint might affect the feasible
region and perhaps cause a change in the optimal solution.
• The improvement in the value of the optimal solution per unit increase in the RHS
is called the shadow price.
• The range of feasibility is the range over which the shadow price is applicable.
• Therange of feasibility for a change in the RHS value is the range of values for this
coefficient in which the original dual price remains constant.
• As the RHS increases, other constraints will become binding and limit the change in
the value of the objective function.
28
RHS Values and Range of Feasibility
• Therange of feasibility for a RHS coefficient is the range of that coefficient for
which the shadow price remains unchanged.
• Therange of feasibility is also the range for which the current set of basic variables
remains the optimal set of basic variables (although their values change.)
29
Simultaneous Changes
• Range of Feasibility and 100% Rule
The 100% rule states that simultaneous changes in right-hand sides will not change
the dual prices as long as the sum of the percentages of the changes divided by the
corresponding maximum allowable change in the range of feasibility for each
right-hand side does not exceed 100%.
30
Shadow Price
• Graphically,a shadow price is determined by adding +1 to the RHS value in
question and then resolving for the optimal solution in terms of the same two
binding constraints.
• The shadow price for a nonbinding constraint is 0.
•Anegative shadow price indicates that the objective function will not improve if the
RHS is increased.
31
Sign of Shadow Prices for MAX Problem
•“≤ constraint” : The shadow price is non-negative. Zero for non-binding
constraints and positive for binding constraints.
•“ ≥ constraint” : The shadow price is non-positive. Zero for non-binding
constraints and negative for binding constraints.
•“ = constraint” : The shadow price could be zero or positive or negative.
32
Sign of Shadow Prices for MIN Problem
• The shadow price for a minimization problem is the “increase” in the objective
function per unit increase in the RHS.
33
Shadow Price and Reduced Cost
•A shadow price for a constraint is the increase in the objective function value
resulting from a one unit increase in its right-hand side value.
• Inlinear programming, reduced cost, or opportunity cost, is the amount by which an
objective function coefficient would have to improve (so increase for maximization
problem, decrease for minimization problem) before it would be possible for a
corresponding variable to assume a positive value in the optimal solution.
34
Shadow Price and Reduced Cost
•A shadow price value is associated with each constraint of the model. It is the
instantaneous change in the objective value of the optimal solution obtained by
changing the RHS of constraint by one unit.
•A reduced cost value is associated with each variable of the model. It is the amount
by which an objective function parameter would have to improve before it would be
possible for a corresponding variable to assume a positive value in the optimal
solution.
• Itshould be intuitively clear that the reduced cost is equal to the shadow price
of the non-negativity constraint of the variable.
35
Changes in Constraint Coefficients
• Classical
sensitivity analysis provides no information about changes resulting from
a change in the coefficient of a variable in a constraint.
• We must change the coefficient and rerun the model to learn the impact the change
will have on the solution.
36
Operations Research
Term II, PGP 2020-22, Session 7
1
Session 7: Network Model - I
• Transportation Problem
• Transshipment Problem
2
Network Problems
•A network model is one which can be represented by a set of nodes, a set of arcs,
and functions (e.g. costs, supplies, demands, etc.) associated with the arcs and/or
nodes.
• Transportation,
transshipment, assignment, shortest-route, minimum spanning tree
problem, and maximal flow problems of this chapter as well as the PERT/CPM
problems (in Chapter 13) are all examples of network problems.
3
Supply Chain Models
•A supply chain describes the set of all interconnected resources involved in
producing and distributing a product.
• In
general, supply chains are designed to satisfy customer demand for a product at
minimum cost.
• Thosethat control the supply chain must make decisions such as where to produce a
product, how much should be produced, and where it should be sent.
4
Transportation Problem
• Sources: group of supply centers, each source has a certain supply of units to
distribute to the destinations.
• Destinations: group of receiving centers, each destination has a certain demand for
units to be received from the sources.
• The requirements assumption: Each source has a fixed supply of units, where this
entire supply must be distributed to the destinations. (We let si denote the number of
units being supplied by source i, for i = 1, 2, . . . , m.) Similarly, each destination
has a fixed demand for units, where this entire demand must be received from the
sources. (We let dj denote the number of units being received by destination j, for j
= 1, 2, . . . , n.)
5
Transportation Problem
•
6
Transportation Problem
7
Transportation Problem
• Theonly data needed for a transportation problem model are the supplies, demands,
and unit costs. These are the parameters of the model.
• The model: Any problem (whether involving transportation or not) fits the model
for a transportation problem if it can be described completely in terms of a
parameter table and it satisfies both the requirements assumption and the cost
assumption. The objective is to minimize the total cost of distributing the units.
• Integer solutions property: For transportation problems where every si and dj have
an integer value, all the basic variables (allocations) in every basic feasible (BF)
solution (including an optimal one) also have integer values.
8
Transportation Problem
• Parameter Table
9
Transportation Problem
• Eachof the problems of this chapter can be formulated as linear programs and
solved by general purpose linear programming codes.
• For each of the problems, if the right-hand side of the linear programming
formulations are all integers, the optimal solution will be in terms of integer values
for the decision variables.
• However, there are many computer packages that contain separate computer codes
for these problems which take advantage of their network structure.
10
Transportation Problem
• The transportation problem seeks to minimize the total shipping costs of
transporting goods from m origins (each with a supply si) to n destinations (each
with a demand dj), when the unit shipping cost from an origin, i, to a destination, j,
is cij.
• The network representation for a transportation problem with two sources and three
destinations is given on the next slide.
11
Transportation Problem
• Network Representation
1 d1
c11
s1 1 c12
c13
2 d2
c21
s2 2 c22
c23
3 d3
Sources Destinations
12
Transportation Problem
• Linear Programming Formulation
Using the notation:
xij = number of units shipped from
origin i to destination j
cij = cost per unit of shipping from
origin i to destination j
si = supply or capacity in units at origin i
dj = demand in units at destination j
continued
13
Transportation Problem
• Linear Programming Formulation (continued)
14
Transportation Problem
• LPFormulation Special Cases
Total supply exceeds total demand:
Add a dummy destination with demand equal to the shortage amount. Assign a
zero shipping cost per unit. The amount “shipped” to the dummy destination
(in the solution) will not actually be shipped.
Total demand exceeds total supply:
Add a dummy origin with supply equal to the shortage amount. Assign a zero
shipping cost per unit. The amount “shipped” from the dummy origin (in the
solution) will not actually be shipped.
15
Transportation Problem
• LP Formulation Special Cases (continued)
● The objective is maximizing profit or revenue:
Solve as a maximization problem.
● Unacceptable route:
16
Transportation Problem
• Parameter Table
17
Transportation Problem
18
Transportation Problem
19
Transportation Problem
20
Transportation Problem: Example #1
• The Navy has 9,000 pounds of material in Albany, Georgia that it wishes to ship to three
installations: San Diego, Norfolk, and Pensacola. They require 4,000, 2,500, and 2,500
pounds, respectively. Government regulations require equal distribution of shipping
among the three carriers.
• The shipping costs per pound for truck, railroad, and airplane transit are shown below.
Destination
Mode San Diego Norfolk Pensacola
Truck $12 $6 $5
Railroad 20 11 9
Airplane 30 26 28
• Formulate and solve a linear program to determine the shipping arrangements (mode,
destination, and quantity) that will minimize the total shipping cost.
21
Transportation Problem: Example #1
• Define the Decision Variables
• We want to determine the pounds of material, xij , to be shipped by mode i to
destination j. The following table summarizes the decision variables:
22
Transportation Problem: Example #1
• Define the Objective Function
Min: (shipping cost per pound for each mode per destination pairing) x (number of
pounds shipped by mode per destination pairing).
Min: 12x11 + 6x12 + 5x13 + 20x21 + 11x22 + 9x23 + 30x31 + 26x32 + 28x33
23
Transportation Problem: Example #1
• Definethe Constraints
Equal use of transportation modes:
(1) x11 + x12 + x13 = 3000
(2) x21 + x22 + x23 = 3000
(3) x31 + x32 + x33 = 3000
Destination material requirements:
(4) x11 + x21 + x31 = 4000
(5) x12 + x22 + x32 = 2500
(6) x13 + x23 + x33 = 2500
Non-negativity of variables:
xij > 0, i = 1, 2, 3 and j = 1, 2, 3
24
Transportation Problem: Example #1
• Computer Output
25
Transportation Problem: Example #1
Solution Summary
❖ San Diego will receive 1000 lbs. by truck and 3000 lbs. by airplane.
❖ Norfolk will receive 2000 lbs. by truck and 500 lbs. by railroad.
❖ Pensacola will receive 2500 lbs. by railroad.
❖ The total shipping cost will be $142,000.
26
Transportation Problem: Example #2
• Acme Block Company has orders for 80 tons of concrete blocks at three suburban
locations as follows:
Northwood -- 25 tons, Westwood -- 45 tons, and Eastwood -- 10 tons.
Acme has two plants, each of which can produce 50 tons per week. Delivery cost
per ton from each plant to each suburban location is:
Delivery Cost Per Ton
Northwood Westwood Eastwood
Plant 1 24 30 40
Plant 2 30 40 42
How should end of week shipments be made to fill the above orders?
27
Transportation Problem: Example #2
• Optimal Solution
28
Transshipment Problem
• Transshipment problems are transportation problems in which a shipment may
move through intermediate nodes (transshipment nodes) before reaching a particular
destination node.
• Transshipment problems can be converted to larger transportation problems and
solved by a special transportation program.
• Transshipment problems can also be solved by general purpose linear programming
codes.
• The network representation for a transshipment problem with two sources, three
intermediate nodes, and two destinations is shown on the next slide.
29
Transshipment Problem
• Network Representation
c36
3
c13
s1 1 c37 6 d1
c14
c15 c46
Supply 4 c47 Demand
c23
c24 c56
s2 2 7 d2
c25
5 c57
Sources Destinations
Intermediate Nodes
30
Transshipment Problem
• Linear Programming Formulation
●
31
Transshipment Problem
• Linear Programming Formulation (continued)
Transshipment nodes
Destination nodes j
32
Transshipment Problem
• LP Formulation Special Cases
● Total supply not equal to total demand
● Maximization objective function
● Route capacities or route minimums
● Unacceptable routes
The LP model modifications required here are identical to those required for the special
cases in the transportation problem.
33
Transshipment Problem: Example
• The Northside and Southside facilities of Zeron Industries supply three firms (Zrox,
Hewes, Rockrite) with customized shelving for its offices. They both order
shelving from the same two manufacturers, Arnold Manufacturers and Supershelf,
Inc.
Currently weekly demands by the users are 50 for Zrox, 60 for Hewes, and 40 for
Rockrite. Both Arnold and Supershelf can supply at most 75 units to its customers.
Additional data is shown on the next slide.
34
Transshipment Problem: Example
Because of long standing contracts based on past orders, unit costs from the
manufacturers to the suppliers are:
Zeron N Zeron S
Arnold 5 8
Supershelf 7 4
36
Transshipment Problem: Example
Linear Programming Formulation
• Decision Variables Defined
xij = amount shipped from manufacturer i to supplier j
xjk = amount shipped from supplier j to customer k
where i = 1 (Arnold), 2 (Supershelf)
j = 3 (Zeron N), 4 (Zeron S)
k = 5 (Zrox), 6 (Hewes), 7 (Rockrite)
• Objective Function Defined
Minimize Overall Shipping Costs:
Min 5x13 + 8x14 + 7x23 + 4x24 + 1x35 + 5x36 + 8x37 + 3x45 + 4x46 + 4x47
37
Transshipment Problem: Example
• Constraints Defined
Amount Out of Arnold: x13 + x14 < 75
Amount Out of Supershelf: x23 + x24 < 75
Amount Through Zeron N: x13 + x23 – x35 – x36 – x37 = 0
Amount Through Zeron S: x14 + x24 – x45 – x46 – x47 = 0
Amount Into Zrox: x35 + x45 = 50
Amount Into Hewes: x36 + x46 = 60
Amount Into Rockrite: x37 + x47 = 40
39
Transshipment Problem: Example
• Solution
Zro
x 50
50
5
75 Zer 1
Arn
75 old
on 5 25
N
8 8 He
we 60
35 s
Su 7 3 4
Zer
per 40
75 on
Sh Ro
4 75 S 4
elf ck-
Rit 40
e
40
Operations Research
Term II, PGP 2020-22, Session 8
1
Session 8: Network Model - II
• Shortest-Route Problem
• Maximal Flow Problem
• Assignment Problem
•A Production and Inventory Application
2
Shortest-Route Problem
• Theshortest-route problem is concerned with finding the shortest path in a network
from one node (or set of nodes) to another node (or set of nodes).
• If
all arcs in the network have nonnegative values, then a labeling algorithm can be
used to find the shortest paths from a particular node to all other nodes in the
network.
• The criterion to be minimized in the shortest-route problem is not limited to distance
even though the term "shortest" is used in describing the procedure. Other criteria
include time and cost. (Neither time nor cost are necessarily linearly related to
distance.)
3
Shortest-Route Problem
Linear Programming Formulation
Using the notation:
continued
4
Shortest-Route Problem
Linear Programming Formulation (continued)
Transshipment nodes
Destination nodes j
5
Algorithm for Shortest-Route Problem
Shortest distance from “O” to “T”
6
Algorithm for Shortest-Route Problem
7
Shortest-Route Problem: Example
• Susan Winslow has an important business meeting in Paducah this evening. She
has a number of alternate routes by which she can travel from the company
headquarters in Lewisburg to Paducah. The network of alternate routes and their
respective travel time, ticket cost, and transport mode appear on the next two slides.
• IfSusan earns a wage of $15 per hour, what route should she take to minimize the
total travel cost?
8
Example: Shortest-Route
Network Representation
F
2 5
K L
A
B G
C 3 J
6
1 D
H I Paducah
Lewisburg E M
4
9
Example: Shortest-Route
Transport Time Ticket
Route Mode (hours) Cost
A Train 4 $ 20
B Plane 1 $115
C Bus 2 $ 10
D Taxi 6 $ 90
E Train 3.333 $ 30
F Bus 3 $ 15
G Bus 4.333 $ 20
H Taxi 1 $ 15
I Train 2.333 $ 15
J Bus 6.333 $ 25
K Taxi 3.333 $ 50
L Train 1.333 $ 10
M Bus 4.666 $ 20
10
Example: Shortest-Route
Transport Time Time Ticket Total
Route Mode (hours) Cost Cost Cost
A Train 4 $60 $ 20 $ 80
B Plane 1 $15 $115 $130
C Bus 2 $30 $ 10 $ 40
D Taxi 6 $90 $ 90 $180
E Train 3.333 $50 $ 30 $ 80
F Bus 3 $45 $ 15 $ 60
G Bus 4.666 $70 $ 20 $ 90
H Taxi 1 $15 $ 15 $ 30
I Train 2.333 $35 $ 15 $ 50
J Bus 6.333 $95 $ 25 $120
K Taxi 3.333 $50 $ 50 $100
L Train 1.333 $20 $ 10 $ 30
M Bus 4.666 $70 $ 20 $ 90
11
Example: Shortest-Route
LP Formulation
• Objective Function
Min 80x12 + 40x13 + 80x14 + 130x15 + 180x16 + 60x25
+ 100x26 + 30x34 + 90x35 + 120x36 + 30x43 + 50x45
+ 90x46 + 60x52 + 90x53 + 50x54 + 30x56
13
Maximal Flow Problem
• Themaximal flow problem is concerned with determining the maximal volume of
flow from one node (called the source) to another node (called the sink).
• Inthe maximal flow problem, each arc has a maximum arc flow capacity which
limits the flow through the arc.
•A capacitated transshipment model can be developed for the maximal flow problem.
• We will add an arc from the sink node back to the source node to represent the total
flow through the network.
• There is no capacity on the newly added sink-to-source arc.
• We want to maximize the flow over the sink-to-source arc.
14
Maximal Flow Problem
LP Formulation
(as Capacitated Transshipment Problem)
● There is a variable for every arc.
● There is a constraint for every node; the flow out must equal the flow in.
● There is a constraint for every arc (except the added sink-to-source arc); arc capacity
cannot be exceeded.
● The objective is to maximize the flow over the added, sink-to-source arc.
15
Maximal Flow Problem
LP Formulation
(as Capacitated Transshipment Problem)
16
Example: Maximal Flow
• NationalExpress operates a fleet of cargo planes and is in the package delivery
business. NatEx is interested in knowing what is the maximum it could transport in
one day indirectly from San Diego to Tampa (via Denver, St. Louis, Dallas,
Houston and/or Atlanta) if its direct flight was out of service.
• NatEx'sindirect routes from San Diego to Tampa, along with their respective
estimated excess shipping capacities (measured in hundreds of cubic feet per day),
are shown on the next slide.
• Is
there sufficient excess capacity to indirectly ship 5000 cubic feet of packages in
one day?
17
Example: Maximal Flow
Network Representation
3
Denver 2 5 St. Louis
3
4 2 3 2
3 4
San 4 3
Diego 1 4 7 Tampa
3 1
3 5 1 5 Dallas
Houston 3 6 Atlanta
6
18
Example: Maximal Flow
Modified Network Representation
3
2 5
3
4 2 3 2
Source 3 4 Sink
4 3
1 4 7
3 1
Added
3 5 1 5 arc
3 6
6
19
Example: Maximal Flow
LP Formulation
● 18 variables (for 17 original arcs and 1 added arc)
● 24 constraints
● 7 node flow-conservation constraints
● 17 arc capacity constraints (for original arcs)
20
Example: Maximal Flow
LP Formulation
• Objective Function
Max x71
21
Example: Maximal Flow
LP Formulation (continued)
● Arc Capacity Constraints
x42 < 3 x43 < 5 x45 < 3 x46 < 1 x47 < 3
22
Example: Maximal Flow
Alternative Optimal Solution #1
Objective Function Value = 10.000
Variable Value Variable Value
x12 3.000 x45 0.000
x13 3.000 x46 0.000
x14 4.000 x47 3.000
x24 1.000 x52 0.000
x25 2.000 x54 0.000
x34 0.000 x57 2.000
x36 5.000 x64 0.000
x42 0.000 x67 5.000
x43 2.000 x71 10.000
23
Example: Maximal Flow
Alternative Optimal Solution #1
2
2 5
3 1 22
Source Sink
4 3
1 4 7
3 2 5
10 3 6
5
24
Example: Maximal Flow
Alternative Optimal Solution #2
Objective Function Value = 0.000
Variable Value Variable Value
x12 3.000 x45 0.000
x13 3.000 x46 1.000
x14 4.000 x47 3.000
x24 1.000 x52 0.000
x25 2.000 x54 0.000
x34 0.000 x57 2.000
x36 4.000 x64 0.000
x42 0.000 x67 5.000
x43 1.000 x71 10.000
25
Example: Maximal Flow
Alternative Optimal Solution #2
2
2 5
3 1 22
Source Sink
4 3
1 4 7
1
3 1 5
10 3 6
4
26
Assignment Problem
• Anassignment problem seeks to minimize the total cost assignment of m workers to
m jobs, given that the cost of worker i performing job j is cij.
• It assumes all workers are assigned and each job is performed.
• An assignment problem is a special case of a transportation problem in which all
supplies and all demands are equal to 1; hence assignment problems may be solved
as linear programs.
• The network representation of an assignment problem with three workers and three
jobs is shown on the next slide.
27
Assignment Problem
Network Representation
c1
1 1
1
c12
c13
Agents Task
c21 s
c22
2 2
c23
c31
c32
3 c33 3
28
Assignment Problem: Example
Linear Programming Formulation
Using the notation:
continued
29
Assignment Problem
Linear Programming Formulation (continued)
30
Assignment Problem: Example
LP Formulation Special Cases
• Number of agents exceeds the number of tasks:
Extra agents simply remain unassigned.
31
Assignment Problem: Example
LP Formulation Special Cases (continued)
The assignment alternatives are evaluated in terms of revenue or
profit:
Solve as a maximization problem.
• An assignment is unacceptable:
Remove the corresponding decision variable.
32
Assignment Problem: Example
An electrical contractor pays his subcontractors a fixed fee plus mileage for work
performed. On a given day the contractor is faced with three electrical jobs
associated with various projects. Given below are the distances between the
subcontractors and the projects.
Projects
Subcontractor A B C
Westside 50 36 16
Federated 28 30 18
Goliath 35 32 20
Universal 25 25 14
How should the contractors be assigned so that total mileage is minimized?
33
Assignment Problem: Example
Network Representation
W 50
es A
t. 36
16
28
Fe
30 B
d.
18
Subcontractors 35 32 Projects
G
C
ol. 20
25 25
Un
iv. 14
34
Assignment Problem: Example
Linear Programming Formulation
Min 50x11+36x12+16x13+28x21+30x22+18x23
+35x31+32x32+20x33+25x41+25x42+14x43
s.t. x11+x12+x13 < 1
x21+x22+x23 < 1
x31+x32+x33 < 1 Agents
x41+x42+x43 < 1
x11+x21+x31+x41 = 1
x12+x22+x32+x42 = 1 Task
x13+x23+x33+x43 = 1 s
xij = 0 or 1 for all i and j
35
Assignment Problem: Example
The optimal assignment is:
36
A Production and Inventory Application
• Transportationand transshipment models can be developed for applications that
have nothing to do with the physical movement of goods from origins to
destinations.
• Forexample, a transshipment model can be used to solve a production and
inventory problem.
37
Example: Production and Inventory Application
Kodak must schedule its production of camera film for the first four months of the
year. Film demand (in 000s of rolls) in January, February, March and April is
expected to be 300, 500, 650 and 400, respectively. Kodak's production capacity is
500 thousand rolls of film per month.
The film business is highly competitive, so Kodak cannot afford to lose sales or keep
its customers waiting. Meeting month i's demand with month i+1's production is
unacceptable.
38
Example: Production and Inventory Application
Film produced in month i can be used to meet demand in month i or can be held in
inventory to meet demand in month i+1 or month i+2 (but not later due to the film's
limited shelf life). There is no film in inventory at the start of January.
The film's production and delivery cost per thousand rolls will be $500 in January and
February. This cost will increase to $600 in March and April due to a new labor
contract. Any film put in inventory requires additional transport costing $100 per
thousand rolls. It costs $50 per thousand rolls to hold film in inventory from one
month to the next.
39
Example: Production and Inventory Application
Network Representation
40
Example: Production and Inventory Application
Linear Programming Formulation
Define the decision variables:
Define objective:
41
Example: Production and Inventory Application
Linear Programming Formulation (continued)
Define the constraints:
42
Example: Production and Inventory Application
Linear Programming Formulation (continued)
Define the constraints:
43
Example: Production and Inventory Application
Linear Programming Formulation (continued)
Define the constraints:
44
Example: Production and Inventory Application
Computer Output
Objective Function Value = 1045000.000
Variable Value Reduced Cost
x15 150.000 0.000
x18 300.000 0.000
x26 0.000 100.000
x29 500.000 0.000
x37 0.000 250.000
x310 500.000 0.000
x411 400.000 0.000
x59 0.000 0.000
x510 150.000 0.000
x610 0.000 0.000
x611 0.000 150.000
x711 0.000 0.000
45
Example: Production and Inventory Application
Optimal Solution
From To Amount
January Production January Demand 300
January Production January Inventory 150
February Production February Demand 500
March Production March Demand 500
January Inventory March Demand 150
April Production April Demand 400
46