You are on page 1of 24

Optimisation Techniques in Transportation and Traffic

Engineering- Linear/Integer Programming


Objectives
Introduce optimisation techniques; problem formulation and
solution using graphical methods and the LINDO software tool.

Topics

What is mathematical modelling?


What are optimisation techniques?
How to formulate a LP?
Graphical Solution
Types of outcomes to LP Problems
Special cases of LP Problems: Transportation Problem
Solution and Interpretation using LINDO
1

Mathematical Modelling
`

MODEL = Organised Representation of Reality

Simplification
Assumptions
Variables (Key)
Structure
Accuracy
Sensitivity Analysis

Page 1

Microscopic Traffic Simulation


Coronation Drive-Milton Road Corridor
Base Model (2000)

Updated (2002)

Operations Research (OR)


` The application of scientific method by interdisciplinary teams to problems involving organised
systems so as to provide solutions
Set of techniques
Mathematically/Computer based
Complex systems
Optimum configuration

Page 2

OR Techniques
`

Linear programming

Network analysis

Simulation

Queuing analysis

Decision theory

Dynamic programming

What are Optimisation Techniques ?


Optimisation techniques are applied to problems which can
be represented by
a mathematical model consisting of an objective
function and constraints.

e.g. Objective: maximise profit


Constraint: limited capacity to produce a product
Resource under consideration: factory capacity

e.g. Objective: minimise public transport travel time


Constraint: must provide some capacity for private vehicles
Resource under consideration: road infrastructure

applied to maximise the achievements of a number of objectives


while ensuring that various constraints are satisfied.
6

Page 3

Elements of a mathematical optimisation problem


`

A set of (n) decision variables, xj ( j = 1,..., n)

A set of (q) objective functions, Z k = g k ( x1 ,..., xn ) (k = 1,..., q )


A set of (m) constraints, ( x1 ,..., xn ) {, =, } b (i = 1,..., m)

A set of known right-hand sides of the constraints denoted by


bi (i = 1,..., m)

Mathematical Optimisation Problem stated as:


Select values for the decision variables so as to maximise (or
minimise) the objective functions, subject to the constraints.
the optimal solution includes finding the values of the decision
variables and the objective functions.
7

Linear Programming (LP)


`

LP is the simplest case of the general mathematical


optimisation problem.

It consists of a single linear objective function and one or more


linear constraints.

Developed to solve US Air Force planning problems.

Programming: optimising, i.e. choosing the best values of


decision variables in situations where these variables compete
for limited resources.

Page 4

Linear Programming (LP)


`

An LP may be written as:


n

Maximise/Minimise Z=
subject to:
n

a
j =1

ij

xj

xi 0

c x

{, =, }

j =1

bi

(i = 1,..., m)

( j = 1,..., n)

Where:
(n) is the number of decision variables
(m) is the number of constraints
(a) is a known coefficient for each variable in the constraints
(b) is a known right-hand side of the constraint
(c) is a known cost/revenue coefficient for the decision variable
9

Application Areas
allocating factory space among competing product lines
developing work schedules that use personnel times efficiently
determining expenditure levels of various activities
optimising mix of products from an operation
optimising assignment of crews to vehicles for a public transport
system
Classical Transport-Related Problems
Postman problem
Travelling salesman problem
Vehicle routing problem
Transportation problem
10

Page 5

Application Areas
Vehicle Routing

11

Application Areas
Transportation Problem e.g. transporting goods from
Coles warehouses to suburban stores

12

Page 6

Example 1
A concrete factory produces two types of products: pre-stressed concrete
beams and reinforced concrete pipes.
Only 1000 units of cement are available for the production of beams and
only 40 moulds are available for the production of pipes.
Each beam produced requires two units of cement and each pipe produced
requires one unit of cement. Each mould has a capacity of 10 pipes.
Furthermore, each beam produced yields a profit of $20 and each pipe
produced yields a profit of $50.
What is the optimal production mix?
In other words, how many beams and pipes should be produced so as to
maximise profits?

13

Example 1: Solution
Step 1:

Beams

Pipes

X1

X2

Define the decision variables and objective


function.

Profit ($)

20

50

Let X1= number of beams

cement units

moulds

400

Let X2= number of pipes


Let Z=objective function=Profits
Maximise $PROFIT$=Z= 20 X1 + 50 X2

14

Page 7

Example 1: Solution
Step 2: Define constraints:

Beams

Pipes

X1
20

X2
50

400

Constraint 1:
Limited number of cement units: The total number
of cement units used in the production of beams and
pipes should not exceed 1000 units.
2 x1+ x2 1000
Constraint 2:

Profit
cement
units
moulds

Limited capacity of moulds for the production of


pipes. Only 40 available and each has a capacity of
10 pipes.
x2 400
Non-negativity constraints
x1, x2 0

15

Example 1: Solution
Step 3: Solve the problem
For a problem with two variables, we can find the solution using a graphical
method. For problems with more than two decision variables, the solution is
found using a computer software based on the Simplex Method. We will use
LINDO.
Feasible region (feasible solution space): The set of all variable values which
satisfy the constraints. Each element of the feasible region is called a feasible
solution.
Optimal solution is always found at one (or more) corner points. A corner
point is a feasible solution defined by the intersection of two (or more)
constraints.
Any set of variable values which violates at least one the constraints is called
an infeasible solution.
16

Page 8

Example 1: Solution
X2

Maximise

Z=20 x1 + 50 x2
2 x1+ x2 1000
x2 400

Subject to:

(0,1000)

x1,x2 0

C (300,400)

B (0,400)

A (0,0)

Z=0

B (0,400)

Z=20,000

C (300,400)

Z=26,000

D (500,0)

Z=10,000

Optimal Solution:

Feasible Region

300 beams, 400 pipes, Profit= $26K


A (0,0)

X1
D (500,0)
17

Example 2
A company needs to dispose of 2500 tons of plastic waste per week
using two incinerators. The company has been instructed by the EPA to
limit its sulfur dioxide emissions to 400,000 units per week and its
particulate emissions to 50,000 units per week. What is the maximum
amount that the company can burn per week such that the EPA
requirements are met ?
Emissions per ton burned
Incinerator

Capacity
(tons/week)

Units of Sulfur
Dioxide

Units of
Particulate

A
B

1200
800

360
250

40
60
18

Page 9

Example 2: Solution
Let x1= tons of plastic waste burned in incinerator A
Let x2= tons of plastic waste burned in incinerator B
Emissions per ton burned

Objective function: Maximise x1+x2


Subject to:
360 x1 + 250 x2
40 x1 + 60 x2
x1
x2

Incinerator

Capacity
(tons/week)

Units of
Sulfur
Dioxide

A
B

1200
800

360
250

Units of
Particulate
40
60

400,000 (Sulfur dioxide emissions constraint)


50,000 (particulate emissions constraint)

1,200 (capacity of incinerator A)

800 (capacity of incinerator B)

x1,x2 0

19

Example 2: Solution
X2

Maximise x1+x2
Subject to:

(0,1600)

360 x1 + 250 x2
40 x1 + 60 x2
x1
x2

(0,833.3)

400,000
50,000
1,200
800

C (50,800)
B (0,800)

D (991.4,172.4)

Feasible Region

A (0,0)

A (0,0)

Z=0

B (0,800)

Z=800

C (50,800)

Z=850

D (991.4, 172.4)

Z=1163.8

E (1111.1,0)

Z=1111.1
X1

E (1111.1,0)(1200,0)

(1250,0)
20

Page 10

Example 3
Minimise 10 X1 + 8 X2
Subject to:
X1 4
X1+ 3X2 12
X1 + X2 8
X1, X2 0

21

Example 3: Solution
Minimise 10 X1 + 8 X2

X2

Subject to:
X1 4
X1+ 3X2 12
X1 + X2 8

(0,8)

X1, X2

Feasible Region
A (4,4)

A (4,4)

Z=72

B (6,2)

Z=76

C (12,0)

Z=120

(0,4)

B (6,2)

C (12,0)
X1
(4,0)

(8,0)
22

Page 11

Example 4- Student Practice

Maximise
Subject to:

Z=3 x1 + 5 x2
2 x1+ x2 12
4x1 + 5x2 40
x1,x2 0

23

Example 4- Solution
X2

Maximise
Subject to:

(0,12)

Z=3 x1 + 5 x2

2 x1+ x2 12
4x1 + 5x2 40
x1,x2 0

B (0,8)

C (10/3,16/3)

A (0,0)

Z=0

B (0,8)

Z=40

C (10/3,16/3)

Z=36.7

D (6,0)

Z=18

Feasible Region

A (0,0)

X1
D (6,0)
24

Page 12

Types of outcomes to LP problems


`

It is possible that some problems may not have an optimal


solution.

There are four types of outcomes to LP problems:

a unique optimal solution with a finite optimal objective function


alternative optimal solutions with a finite optimal objective function
Infeasible solution
Unbounded objective function value

25

Example 5: Unique Optimal Solution


Minimise 3x1 + 2x2
Subject to
x2
x1 + x2
x1 x2

8
10

(c)

(a)

(a)

(b)

x1,x2 0

(c)

(b)
26

Page 13

Example 6: Alternative Optimal Solutions


Maximise 4x1 + x2
Subject to
(a) 12x1 +3x2
(b) x1
(c) x1 + x2

36

2
4

x1,x2 0

27

Example 7: Infeasible Solution


Maximise x1 + x2
Subject to
-x1 +x2
4

x2
6
10
x1 + x2

x1,x2 0

(a)
No feasible region!

(a)
(b)

(b)
(c)

(c)

28

Page 14

Example 8: Unbounded Solution

There is no upper bound


for the feasible region.
The value of the objective
function keeps improving
without bounds.

d (2,50)

Minimise 2x1 - x2
Subject to
-x1 +x2 2
x1 6

x1,x2 0
(c)

Point a (0,2): U= -2
Point b (0,7): U= -7
Point c (0,12): U= -12

(b)

Point d (2,50): U= -46


etc

(a)

29

Example 9: Redundant Constraint


X2

Maximise 2x1 + x2
Subject to
x1 + x2 8
x1 + 2 x2 12
6 x1 + 5 x2 60

(0,12)

(0,8)

(1)
(2)
(3)

x1,x2 0

(0,6)

Constraint 3 is redundant. It can be


removed without affecting the feasible
region or the optimal solution!

Feasible Region
(12,0)
X1
(8,0)

(10,0)
30

Page 15

Special Cases of LPs: Transportation Problem


This type of problem is concerned with minimising the cost of transporting certain
commodities from a number of sources to a number of destinations.
Example: What is the minimum cost of transporting commodities from the three
factories to the four warehouses given the shown transportation costs.
Warehouse

Supply

$6

$2

$6

$7

30

$4

$9

$5

$3

25

$8

$8

$1

$5

21

Factory

76
Demand

15

17

22

12

66

31

Solution
Let xij= number of units transported from factory (i) to warehouse (j)
1

1
$6

2
$2

3
$6

4 S
$7 30

$4

$9

$5

$3

25

$8

$8

$1

$5

21

Objective function:
Minimise (6x11+2x12+6x13+7x14) + (4x21+9x22+5x23+3x24)+
(8x31+8x32+1x33+5x34)
Constraints:
1. Do not exceed the supply capacity at factories:
x11+x12+x13+x14 <= 30 ...(1)

76

x21+x22+x23+x24 <= 25 (2)

x31+x32+x33+x34 <= 21 (3)

15

17

22

12

66

2. Must satisfy demand at warehouses:


x11+x21+x31 >= 15 (4)
x12+x22+x32 >= 17 (5)

More than 2 variables: solve using


LINDO (Linear Integer Discrete Optimiser)

x13+x23+x33 >= 22 (6)


x14+x24+x34 >= 12 (7)
32

Page 16

Input

Solution

1
?

2
?

3
?

4
?

S
30

25

21

15 17 22 12

Solution
1

1
2

2
17

3
1

4
0

13

12 25

21

S
20
21

15 17 22 12

Why is the transportation problem a special case of LP?


33

Reduced Cost
A variable already in the optimal solution
has a reduced cost of ZERO (e.g. X11 in
example).
For all other variables, it represents the
amount of penalty you would pay to
introduce a variable in the solution.

Consider variable X14 in example.


Cost coefficient=7
value=0
reduced cost = 2.
This means that the objective function
by
$2
value
would
deteriorate
(transportation cost would increase to
$163) if this variable is brought into the
solution with a coefficient of (7).
It also means that the cost coefficient of
variable X14 would need to be less than 5
(7-2) before it becomes feasible to bring it
into the solution.

Page 17

34

Interpreting LINDOs Solution


Slack or Surplus: this indicates how close the optimal solution is to satisfying a
constraint as an equality.
For constraints <= : Referred to as SLACK
For constraints >= : Referred to as SURPLUS
If a constraint is exactly satisfied as an equality, the SLACK /SURPLUS will be ZERO
Consider ROW 3 (i.e. constraint 2)
SLACK=0
x21+x22+x23+x24 <= 25
13 + 0 +0 +12 = 25
Consider ROW 2 (i.e. constraint 1)
SLACK=10
x11+x12+x13+x14 <= 30
2 +17 + 1 + 0 = 20

35

Interpreting LINDOs Solution


Dual Price (Shadow Price)
The amount one is willing to pay for additional units of a resource.
It is also the amount by which the objective function would improve given a unit increase in
the RHS of the constraint.
Improvement means increase in a maximisation problem, and decrease in a minimisation
problem.
Consider ROW 3 (i.e. constraint 2)
We have used up all the supply (slack =0).
Increasing the RHS by one unit (i.e. supply at
factory #2) would improve the objective function
by $2 (reduce costs to $159!)

Demand

Consider ROW 2 (i.e. constraint 1)


Slack=10, Dual price = 0 (since we already
have a slack (or surplus) of 10)
Consider last row. Slack=0, Dual Price=-5.
Increasing the demand at warehouse 4 by one
unit would increase transportation costs by $5
to $166!
36

Page 18

Interpreting LINDOs Solution


Sensitivity Analysis
Allowable increase/decrease in objective
function coefficients: The amount by
which the objective function cost
coefficient can be increased/decreased
without causing a change in the optimal
solution (mix of variables) or their
values.

Question: X21 is currently 13 units.


What happens if the cost of
transporting units from factory 2 to
warehouse 1 (C21) decreases by $1?

Consider variable X11:


Current coefficient= $6
Allowable increase= $2
Allowable decrease= $1

Answer: The mix of variables and


their optimal values remain the same.
The Objective Function value would
decrease by $1 per unit ($13 total) to
become $148

As long as $5 <= C11 =< $8, then the


mix of variables in the optimal solution
(and their values) remain unchanged. No
need to re-solve the problem!
37

Interpreting LINDOs Solution


Sensitivity Analysis
Allowable increase/decrease in RHS:
The amount by which the RHS can be
increased/decreased without causing a
change in the mix of variables in the
optimal solution or their values.
Consider ROW 2 (constraint 1):
Current RHS=30
Allowable increase=INFINITY
Allowable decrease=10

As long as:
20 < Supply at Factory 1 < INFINITY
then the mix of variables in the optimal
solution (and their values) remain
unchanged.
38

Page 19

39

Problem Formulation

Max 25 vehicles can be


refurbished per month if
full capacity is spent on
refurbishing vehicles. In
this case, each vehicle
would take 1/25 of month
to refurbish.
But we have two activities
competing for the same
resource. We have the
following options:
Refurbish 25 and refit 0

Refurbish 0 and refit 35

Let S = total savings


Let x1= number of refurbished vehicles
Let x2= number of refitted vehicles

Do combinations e.g.
some refurbishment (<25)
and some refitting (<35).

Objective function: maximise savings S= 3000 x1 + 3500 x2


Constraints:

1/25 x1 + 1/35 x2 < 1


1/33 x1 + 1/17 x2 < 1

or
or

How do we write this as a


constraint?

35 x1 + 25 x2 <= 875 . (1)


17 x1 + 33 x2 <= 561 . (2)
x1
<=22 .. (3)
x2
<=15 ...(4)
x1,x2 >= 0
40

Page 20

Transit Authority Repair Shop Example


Let S = total savings
Let x1= number of refurbished vehicles
Let x2= number of refitted vehicles

X2

Objective function: maximise savings S= 3000 x1 + 3500 x2


(0,35)

Constraints:
1/25 x1 + 1/35 x2 < 1
1/33 x1 + 1/17 x2 < 1

(0,17)

C (3.88,15)

B (0,15)
D (20.34,6.5)

Feasible Region

E (22,4.2)

or
or

35 x1 + 25 x2 < 875 . (1)


17 x1 + 33 x2 < 561 . (2)
x1
<22
x2
<15
x1,x2 > 0

A (0,0)

Z= 0

B (0,15)

Z= 52,500

C (3.88,15)

Z= 64,140

D (20.34,6.5)

Z= 83,840

E (22,4.2)

Z= 80,700

F (22,0)

Z= 66,000
X1

A (0,0)

F (22,0)

(25,0)

(33,0)
41

LP Solution Using LINDO

42

Page 21

Transit Authority Repair Shop Example


Let S = total savings
Let x1= number of refurbished vehicles
Let x2= number of refitted vehicles
X2
Objective function: maximise savings S= 3000 x1 + 3500 x2
(0,35)

Constraints:
1/25 x1 + 1/35 x2 < 1
1/33 x1 + 1/17 x2 < 1

(0,17)

C (3.88,15)

B (0,15)

or
or

35 x1 + 25 x2 < 875 . (1)


17 x1 + 33 x2 < 561 . (2)
x1
<22
x2
<15
x1,x2 > 0

A (0,0)

Z= 0

B (0,15)

Z= 52,500

C (3.88,15)

Z= 64,140

D (20.34,6.5)

D (20.34,6.52)

Z= 83,840

D1 (20,6)
D2 (20,7)

Z= 81,000
outside feasible region

E (22,4.2)

Z= 80,700

F (22,0)

Z= 66,000

G (19,7) Z=81,500

Feasible Region

E (22,4.2)

X1
A (0,0)

F (22,0)

(25,0)

(33,0)
43

INT Solution using LINDO

44

Page 22

Demand for seats

45

Problem Formulation

Available aircrafts constraint

Capacity made available should meet demand

A maximum number of daily trips


All variables should be integers

Page 23

46

LINDO Solution

5
6
4

0
3
0

2
2
2

2
0
0

2
0
0

2
2
2

100

200

1
1
2

0
3
0
90

1
1
2
100

47

Example 10- Student Practice


Min 4 x1+ 2 x2
st
2x1+3x2 9

Solution

3x1+x2 6

X1=9/7, X2=15/7, Z=9.4

x1,x2 0

48

Page 24

You might also like