You are on page 1of 32

QBUS6310: Business

Operations Analysis
Linear Programming and its
Applications in OM
Taught by
Dr. Erick Li
Discipline of Business Analytics

The University of Sydney Page 1


Overview

– Linear Programming
– Formulation
– Sensitivity Analysis
– Facility Location Models
– Aggregate Planning
– Piece-Wise Tax Rates

The University of Sydney Page 2


1. Review of Linear Programming
1.1 What is LP?

– Decision variables describe the actions that can be taken by the decision maker
– Objective function is linear with respect to decision variables and measures the
utility (such as cost or profit) of the decision maker.
– All of the constraints are linear. Constraints specify what actions (or decision
variables) are feasible.

The University of Sydney Page 3


1. Review of Linear Programming
1.1 What is LP?

– Example. Strawberry ice cream is sold for $30/KG and chocolate ice cream is
sold for $28/KG. The strawberry ice cream needs 0.15KG sugar and 0.2KG
strawberry; chocolate ice cream needs 0.12KG sugar and 0.1KG chocolate. All
the ice cream made will be sold. We have 1KG sugar, 0.8KG strawberry, and
0.5KG chocolate available. Determine the optimal production plan to maximize
the total sales revenue.

The University of Sydney Page 4


1. Review of Linear Programming
1.1 What is LP?

– Let X be the quantity of strawberry ice cream to be made (in KG)


– Let Y be the quantity of chocolate ice cream to be made (in KG)

– Objective function is Z=30X+28Y


– Constraints on sugar: 0.15X+0.12Y ≤ 1;
– Constraints on strawberry: 0.2X ≤ 0.8;
– Constraints on sugar: 0.1Y ≤ 0.5;
– Non-negativity constraints: X≥0 and Y≥0.
The University of Sydney Page 5
1. Review of Linear Programming
1.1 What is LP?

– We use EXCEL to solve the model and obtain various reports.


Quantity Price Sugar Strawberry Chocolate
X 2.666667 30 0.15 0.2
Y 5 28 0.12 0.1

Z 220

Constraints Sugar Strawberry Chocolate


1 0.53333333 0.5

Availability 1 0.8 0.5

The University of Sydney Page 6


1. Review of Linear Programming
Microsoft Excel 15.0 Sensitivity Report
Worksheet: [LP-Example.xlsx]Sheet1
Report Created: 6/12/2016 2:11:58 PM Allowable
increase/decrease for
Variable Cells objective coefficient:
Final Reduced Objective Allowable Allowable
- If the change in the
Cell Name Value Cost Coefficient Increase Decrease
$B$2 X 2.6666666 0 30 5 30 objective coefficient (in this
$B$3 Y 5 0 28 1E+30 4
case, it is the price of ice
Constraints cream) does not exceed
Cell Name
Final
Value
Shadow Constraint Allowable
Price R.H. Side Increase
Allowable
Decrease
these limits, the optimal
$B$8 Sugar 1 200 1 0.2 0.4 solution remains unchanged,
$C$8 Strawberry
$D$8 Chocolate
0.5333333
0.5
0
40
0.8 1E+30 0.2666666
0.5 0.33333333 0.1666666
but the optimal objective
value changes.

The University of Sydney Page 7


1. Review of Linear Programming
Microsoft Excel 15.0 Sensitivity Report Allowable
Worksheet: [LP-Example.xlsx]Sheet1
Report Created: 6/12/2016 2:11:58 PM increase/decrease for
constraint and shadow price.
Variable Cells - If the change of RHS
Cell Name
Final
Value
Reduced Objective Allowable
Cost Coefficient Increase
Allowable
Decrease
constant is within the
$B$2 X 2.6666666 0 30 5 30 allowable
$B$3 Y 5 0 28 1E+30 4
decrease/increase, the
Constraints optimal objective function is
Cell Name
Final
Value
Shadow Constraint Allowable
Price R.H. Side Increase
Allowable
Decrease
piece-wise with slope that
$B$8 Sugar 1 200 1 0.2 0.4 equals the shadow price.
$C$8 Strawberry 0.5333333 0 0.8 1E+30 0.2666666
$D$8 Chocolate 0.5 40 0.5 0.33333333 0.1666666

The University of Sydney Page 8


2. Facility Location Model
2.1 The Basic Facility Model

– There are n potential supply sites that we can open.


– If we open site i (i=1,2…,n), a fixed cost of Ki is incurred.
– The maximum supply quantity that can be produced from opening supply site i is
Si.
– There are m (known) demand sites that are already open.
– Demand at demand site j (j=1,2,…,m) is Dj. All demands must be met.
– The transportation cost to move one unit of good from supply site i to demand
site j is Cij.
– Determine the optimal solution that minimizes the total cost.
The University of Sydney Page 9
2. Facility Location Model
2.1 The Basic Facility Model

– Total Cost = sum of fixed cost + sum of transportation cost


= K1X1+K2X2+… + C11Q11+C12Q12+…
– We use “sumproduct” in EXCEL.
– Here, Xi represents a binary variable that determines whether supply site i is
open. In particular, Xi=1, if supply site i is open; Xi=0 otherwise.
– The mathematical expression of “sumproduct” is
n n m
min Z   K i X i   C ij Qij
i 1 i 1 j 1

The University of Sydney Page 10


2. Facility Location Model
2.1 The Basic Facility Model

– The Qij cannot be positive if supply site i is not open. How do we model this?
– Impose a constraint Qi1+Qi2+…Qim - XiSi ≤ 0 for each i=1,2…,n.
– Is the above constraint linear?
– Verify what happen if Xi =1 or Xi=0.
– How do we ensure that all demands are satisfied?
– Impose a constraint Q1j+Q2j+…Qnj = Dj for each j=1,2…,m.
– Other constraints: all Qij≥0 and Xi=0 or 1.

The University of Sydney Page 11


2. Facility Location Model
2.1 The Basic Facility Model

– Other practical considerations:


– What if no more than g locations can be opened? The constraint is
X1+X2+…+Xn ≤ g.

The University of Sydney Page 12


2. Facility Location Model
2.1 The Basic Facility Model

– Solve the model by using EXCEL.

– You may need a premium solver if the size of the model grows rapidly.

The University of Sydney Page 13


2. Facility Location Model
2.2 Other Applications

– The sites to open include: factory, retail store, warehouse, sea port, inter module
hub, airport, and so forth.
– All you need to do is to interpret the decision variables properly.
– For instance, you can evaluate the performance of an infrastructure plan that decides
where to build an airport.

– Transportation research uses facility location models.

The University of Sydney Page 14


2. Facility Location Model
2.3 Sensitivity Analysis

– Because the location decision is of integer nature, the sensitivity analysis is not
straightforward. Usually, we compare two sets of scenarios (i.e., solve the location model
twice with two different input parameters).
– However, if the location decision is fixed and only the transportation quantity can be
varied, then the standard LP sensitivity analysis works.
– It is important to exclude the impact of integer variables before performing any
sensitivity analysis.

The University of Sydney Page 15


3. Aggregate Planning
3.1 What is aggregate planning?

– It is a tactical decision model (with medium planning horizon).


– Given the demand forecast (usually point estimate), for each period in the
planning horizon, determine the production level, inventory level, capacity level
(internal and outsourced), any backorder for each period that maximize the
firm’s profit over the planning horizon.
– Input parameters:
– Demands, capacity, lead time (assumed to be deterministic), backorder cost, holding
cost, production cost, labour cost, selling price, and so forth.

The University of Sydney Page 16


3. Aggregate Planning
3.2 An Example
Item Cost
– Input parameters
Material cost $10/unit
Month Demand Forecast
Inventory holding cost $2/unit/month
January 1600
Marginal cost of backorder $5/unit/month
February 3000
Hiring and training cost $300/worker
March 3200
Layoff cost $500/worker
April 3800
Labour hours required 4/unit
May 2200
Regular time cost $4/hour
June 2200
Overtime cost $6/hour
Cost of subcontracting $30/unit
The University of Sydney Page 17
3. Aggregate Planning
3.2 An Example Symbols Meaning

Decision Variables Wt Number of workers for month t, t=1,2…,6

Ht Number of workers hired at the beginning of month t,

Lt Number of workers laid off at the beginning of month t,

Pt Number of units produced in month t,

It Inventory at the end of month t,

St Number of units stockout at the end of month t,

Ct Number of units subcontracted in month t,

Ot Number of overtime hours in month t.

The University of Sydney Page 18


3. Aggregate Planning
3.2 An Example

Objective is to minimize the total costs.


6 6 6 6 6 6 6 6
min Z   640Wt   6Ot   300 H t   500 Lt   2 I t   5S t  10 Pt   30C t
t 1 t 1 t 1 t 1 t 1 t 1 t 1 t 1

Use sumproduct function in EXCEL, regardless whether the cost parameters are time-
dependent. (In this example, cost parameters are time-independent.)
Each worker can produce 40 units per month on regular time and 0.25 unit per
overtime hour. Each worker cannot work on more than 10 over time hours in each
month.
All the demands must be satisfied at the end of the sixth month.
The University of Sydney Page 19
3. Aggregate Planning
3.2 An Example

Constraints on workers available for the month: Wt=Wt-1+Ht-Lt;


Capacity constraints: Pt - 40Wt- Ot/4 ≤ 0; (The coefficients depend on data.)
Inventory balancing constraints: It-1 – St-1 +Pt+Ct – Dt – (It – St)=0;
- Note that It-St is the inventory position IP that we learned before.
Overtime limits: Ot -10Wt≤ 0;
Ending inventories: S6=0.

The University of Sydney Page 20


3. Aggregate Planning
3.2 An Example

You must know how to perform sensitivity analysis.


– What if cost of hiring/laying off changes?
– What if subcontracting cost changes?
– …

In practice, SAP/ERP software has embedded aggregate plan optimization tools.


But you can build your own model and solve it by using EXCEL.

The University of Sydney Page 21


3. Aggregate Planning
3.3 Various Constraints

– A fixed setup cost: Qt – Yt × Kt ≤ 0, where Yt is a binary decision variable and


Kt is the maximum capacity available for period t. The objective function must
include YtFt, where Ft is the fixed setup cost for period t.
– What if shortage is not allowed?
Inventory balancing constraints: It-1 +Pt+Ct – Dt = It; where It ≥0.
In this case, do not include the above equation(s) as constraints in EXCEL. Use it to
determine It.

The University of Sydney Page 22


3. Aggregate Planning
3.3 Various Constraints

– Bill of materials:
The demand for a component is then equal to the consumption rate multiplied by the
production quantity of the product that the component is assembled to.
For example, Dt=2*Pt, where Pt is the production quantity of the finished goods
and the coefficient 2 indicates that 2 components are needed to assemble the final
product.

The University of Sydney Page 23


3. Aggregate Planning
3.3 Various Constraints

– Bill of materials:
The demand for a component is then equal to the consumption rate multiplied by the
production quantity of the product that the component is assembled to.
– Example. Product 1 uses 3 units of component 2. Shortage is not allowed. Lead
time is zero. The inventory balancing equation is: It-1 +P2t+Ct – 3*P1t = It; where
P2t is the production quantity of component 2, and P1t is the production quantity
of product 1.

The University of Sydney Page 24


4. Piece-Wise Tax Rate
Example

Strawberry ice cream is sold for $30/KG and chocolate ice cream is sold for
$28/KG. The strawberry ice cream needs 0.15KG sugar and 0.2KG strawberry;
chocolate ice cream needs 0.12KG sugar and 0.1KG chocolate. All the ice cream
made will be sold. We have 2000KG sugar, 1600KG strawberry, and 1000KG
chocolate available. The raw materials cost $50,000. Determine the optimal
production plan to maximize the total sales revenue. The marginal tax rate is the
following:
Range of annual profit Marginal Tax Rate
0-150,000 0%
150,000-300,000 20%

The University of Sydney Page 25


4. Piece-Wise Tax Rate
Example

Max Z = 30X+28Y-50,000-Tax;
Decision variables: X, Y, and Tax
Constraints:
0.15X+0.12Y<=2000;
0.2X <=1600;
0.1Y<=1000;
Pft = 30X+28Y-50,000;
Tax >=0; Tax>=0.2*(Pft-150,000)
The University of Sydney Page 26
Questions?

The University of Sydney Page 27


Exercise 1: Staff Scheduling in a Call Centre

– The demand for the number of staffs in a call centre from 9am to 5pm is
forecasted to be the following:
Time Period Number of Staffs Required
9-10am 10
10-11am 12
11am-noon 14
Noon-1pm 16
1pm-2pm 18
2-3pm 17
3-4pm 15
4-5pm 10
The University of Sydney Page 28
Exercise 1: Staff Scheduling in a Call Centre

– The call centre currently has 11 full-time staffs. A large number of part-time
staffs are available to be called upon. However, each part-time staff must work
in exactly 4 consecutive hours (starting from any time period) on each day. Full-
time staffs must take a 1 hour break for lunch between 11-1pm. The usual
practice is to ask half of the full-time staffs to take a break from 11-noon and
the remaining full-time to take the lunch break from noon to 1pm.
– The full-time staffs are paid $75 per day, whereas the part-time staffs are paid
$6 per hour.
– The part-time hour cannot exceed 50% of the day’s total requirement.
– Formulate a model to find the optimal schedule.

The University of Sydney Page 29


Exercise 1: Staff Scheduling in a Call Centre

– Decision variables:
F: Full-time staffs to be used on the day
P1: Part-time staffs to be used from 9am to 1pm.
P2: Part-time staffs to be used from 10am to 2pm.
P3: Part-time staffs to be used from 11am to 3pm.
P4: Part-time staffs to be used from noon to 4pm.
P5: Part-time staffs to be used from 1pm to 5pm.
– Objective:
min Z= 75F + 24×(P1+P2+P3+P4+P5)
The University of Sydney Page 30
Exercise 1: Staff Scheduling in a Call Centre

– Constraints include:
F≤11,
F+P1 ≥ 10 9-10am
F+P1+P2≥12 10-11am 4(P1+P2+P3+P4+P5)≤0.5(10+1
2+14+16+18+17+15+10)=56
0.5F+P1+P2+P3≥14 11am-noon
0.5F+P1+P2+P3+P4≥16 noon-1pm F, P1, P2, P3, P4, P5 are
integers.
F+P2+P3+P4+P5≥18 1pm-2pm
F+P3+P4+P5≥17 2pm-3pm
F+P4+P5≥15 3pm-4pm
F+P5≥10 4pm-5pm
The University of Sydney Page 31
Exercise 2: A Facility Location Model

– Tri-state Manufacturing has 3 warehouses and 3 possible sites to open factories.

Warehouse Warehouse Warehouse Fixed Cost Capacity


1 2 3 (Monthly) (Monthly)
Factory 1 $6 $5 $18 $10000 6000
Factory 2 $8 $10 $8 $15000 8000
Factory 3 $11 $14 $3 $12000 10000

– The demand at each warehouse is 6000 units per month.


– Formulate the model to find the best plan that minimizes the total monthly cost.

The University of Sydney Page 32

You might also like