Vous êtes sur la page 1sur 28

Introduction

The basic aim of production systems is to profit. Using some inputs such as workers, machines,
materials, knowledge, energy etc. they produce products or services, satisfies demand and earn
money. Inputs have a cost. So, in order to increase their total profits production systems search the
best ways of using their resources. Also, the competitiveness in the market forces them to do it.
Industrial engineers try to find these ways in production systems.
Operations research is a discipline that deals with the application of advanced analytical methods to
help make better decisions. Industrial engineers use the operations research discipline in their
decision making processes related with the ways of using the resources and time in production
systems.
Operations research studies consist of developing the linear programming (LP) or integer
programming (IP) or mixed integer programming (MIP) or non-linear programming
formulations/models of the problems and their solution methods.
In this course, we will focus on the modeling part of the operations research studies. Over several
modeling examples we will try to improve students modeling abilities. However, for some special
problems specific solution methods will be covered.
Linear Programming
Fixed values, based on the underlying nature of the problem being solved, are called parameters.
They are used as coefficients and constants in the mathematical models.
The variables in the mathematical model are a set of quantities that need to be determined in order to
solve the problem. These variables are called decision variables because the problem is to decide
what value each variable should take.
Parameters are fixed values, so we cannot change them. However, they affect our solution.
Objective is to maximize or minimize an evaluating criteria. The mathematical representation of the
evaluating criteria and the objective is called objective function.
We evaluate and compare solutions by the objective function. If a solution is better than another one,
we determine the better one by comparing them with their objective function values.
The properties (limitations, restrictions, relations, etc.) that a solution has to satisfy are called
constraints.
A solution which satisfies all constraints is called feasible solution. A solution which is not a
feasible solution is called infeasible solution. According to the objective function values the best
feasible solution is called optimum solution.
Linear programming (LP) is a mathematical technique for finding optimal solutions to problems that
can be expressed using linear equations and inequalities.
In an LP model the following properties should be satisfied:
Proportionality: a change in the value of a decision variable results in proportionate change in that
variables contribution to the value of the function.
Additivity: the value of a function is the sum of the contributions of each term
Divisibility: the decision variables can take fractional values
Deterministic: parameters are known with certainty
In a LP model a constraint may have the , or = form. < and > forms are not allowed.
As a conclusion an LP model may have the following form:

Min/max Z = c1x1 + c2x2 + + cnxn


Subject to
a11x1 + a12x2 + + a1nxn b1
a21x1 + a22x2 + + a2nxn b2
a31x1 + a31x2 + + a3nxn = b3
x1, x2, , xn 0
Note that there may be any number of constraints.
LP Modeling Examples:
Example 1:
A company produces yogurt and cheese using milk. One kg yogurt is produced by using 1.2 kg milk
and one kg cheese is produced using 1.5 kg milk. The company has 200 kg milk, daily. Selling price
of yogurt is $5 per kg and selling price of cheese is $12 per kg. There is high enough demand for both
type products. So, the company sells all of its products. In order to maximize the daily total income
how much yogurt and how much cheese must the company produce daily? Develop the LP model of
the problem.
Solution:
Generally in modeling studies we should first try to determine the decision variables. The question
here is that: To the value(s) of what we try to decide?. In this example we want to maximize the
companies daily total income. And in order to maximize the companies daily total income we must
decide to the amounts of daily yogurt and cheese productions (in kg). Actually, the daily total income
is a function of (result of) these daily production amounts.
One can use any letter, character, symbol etc. in order to represent his decision variables. But
generally, because x is commonly used to represent some unknown things, we prefer using x for
representing our decision variables. For this example lets define our decision variables.
x1 : the amount of daily yogurt production (in kg)
x2 : the amount of daily cheese production (in kg)
Sometime, students think that decision variable definitions are part of their models. Especially in the
integer programming studies they may think that because they write the condition when a binary
decision variable takes value 1 and 0, that decision variable takes these values automatically. They
may think that writing those conditions in their decision variable definitions is enough. This is
completely wrong! Decision variable definitions are not parts of mathematical models. They should
be given in a separate place than the mathematical model. You cannot write your objective function,
your constraints and your decision variable definitions in any order. The format of the LP models is
given above. It should be satisfied. We give our decision variable definitions because it may be hard
for some other people to interpret, understand our model if they dont know the meanings of our
decision variables.
Now, lets use our decision variables and express mathematically the daily total income (TI).
TI = 5x1 + 12x2 . Because our objective is to maximize daily total income, the objective function is:
max TI = 5x1 + 12x2 .
If we consider only the above TI function and try to maximize it we can say that x 1 and x2 go to
infinity and TI goes to infinity. But that is not a feasible solution for the company because the daily
yogurt production and cheese production cannot be infinitively high with the limited amount of milk.
So, we should determine the constraints that the solutions must satisfy. The total milk amount for
producing x1 kg yogurt and x2 kg cheese cannot exceed the daily available milk amount which is 200

kg. Lets write the total milk amount (in kg) for producing x 1 kg yogurt and x2 kg cheese. It is 1.2x1 +
1.5x2. This amount cannot exceed 200. Thus the constraint is:
1.2x1 + 1.5x2 200.
Logically the production amounts cannot be negative. So we have the following constraints:
x1, x2 0.
Here is the entire model:
max TI = 5x1 + 12x2
s.t.
1.2x1 + 1.5x2 200
x1, x2 0
Example 2:
A company produces two types of products (P1, P2) using two machines (machine A and machine B).
Each unit of P1 products require 2 hours for being processed on A and 4 hours for being processed on
B. Each unit of P2 products require 5 hours for being processed on A and 3 hours for being processed
on B. Machine A can be used at most 40 hours and machine B can be used at most 55 hours, weekly.
Selling prices are $18 and $25 for P1 and P2 products, respectively. The company wants to determine
the weekly P1 and P2 production amounts in order to maximize its weekly total income. Develop the
LP model of the problem.
Solution:
Decision variable definitions:
x1 : the weekly P1 production amount
x2 : the weekly P2 production amount
Objective function: max 18x1 + 25x2 (maximization of weekly total income)
Constraints:
2x1 + 5x2 40 (weekly total processing time on machine A needed for producing x 1 units of P1 and
x2 units of P2 cannot exceed weekly total available time on machine A)
4x1 + 3x2 55 (weekly total processing time on machine B needed for producing x 1 units of P1 and x2
units of P2 cannot exceed weekly total available time on machine B)
x1, x2 0 (production amounts cannot be negative)
Here is the entire model:
max 18x1 + 25x2
s.t.
2x1 + 5x2 40
4x1 + 3x2 55
x1, x2 0
Example 3:
A farmer has 50 acres to plant wheat and corn. Each acre of wheat costs $120 to plant and each acre
of corn costs $180 to plant. He has only $8000 to spend for planting. Furthermore, each acre of wheat
takes 2 hours to plant and each acre of corn takes 1.3 hours to plant. The farmer has to complete
planting in 48 hours. He has to plant at least 30 acres. The profit is $700 per acre of wheat and $900
per acre of corn. How many acres of each should be planted to maximize total profit? Develop the LP
model of the problem.

Solution:
Decision variable definitions:
x1 : the amount of land planted with wheat (in acre)
x2 : the amount of land planted with corn (in acre)
Objective function: max 700x1 + 900x2 (maximization of total profit)
Constraints:
x1 + x2 50 (total planted land cannot exceed the total land he has)
120x1 + 180x2 8000 (total planting cost cannot exceed his budget)
2x1 + 1.3x2 48 (total planting time cannot exceed 48 hours)
x1 + x2 30 (total planted land has to be at least 30 acres)
x1 , x2 0 (planted land amounts cannot be negative)
The entire model is:
max 700x1 + 900x2
s.t.
x1 + x2 50
120x1 + 180x2 8000
2x1 + 1.3x2 48
x1 + x2 30
x1 , x2 0
Example 4: (A case of the Diet Problem)
A company uses at least 800 lb of special feed daily. The special feed is a mixture of earn and
soybean with the following compositions.
Feedstuff
Protein (%)
Fiber (%)
Cost ($/lb)
Corn
9
2
0.30
Soybean
60
6
0.90
The dietary requirements of the special feed stipulate at least 30% protein and at most 5% fiber. The
company wishes to determine the daily minimum cost feed mix. Formulate the problem as an LP
model.
Solution:
x1 : lb of corn in the daily feed mix
x2 : lb of soybean in the daily feed mix
Objective function: min 0.3x1 + 0.9x2 (minimization of total daily cost)
Constraints:
x1 + x2 800 (the daily total feed mix must be at least 800 lb)
0.09x1 + 0.60x2 0.30(x1 + x2) (the amount of protein obtained from x 1 lb corn is 0.09x1 lb and the
amount of protein obtained from x2 lb soybean is 0.60x2 lb. The total protein amount must not be less
than 30% of total mix amount. Note that total mix amount is not 800 lb, it is (x 1 + x2) and it can be
higher than 800 lb. Please see the first constraint.)
In a constraint, generally, we collect the terms with decision variables in the left hand side and give
the constant value in the right hand side of the equality (or inequality) sign. So, one can easily reexpress this constraint after some very simply calculations as,
-0.21x1 + 0.30x2 0

0.02x1 + 0.06x2 0.05(x1 + x2) (the amount of fiber obtained from x1 lb corn is 0.02x1 lb and the
amount of fiber obtained from x2 lb soybean is 0.06x2 lb. The total fiber amount must not exceed 5%
of total mix amount.) After simple calculations this constraint can be written as,
-0.03x1 + 0.01x2 0
x1 , x2 0 (lb of corn and lb of soybean in the daily mix cannot be negative)
Here is the entire model:
min 0.3x1 + 0.9x2
s.t.
x1 + x2 800
-0.21x1 + 0.30x2 0
-0.03x1 + 0.01x2 0
x1 , x2 0
The Graphical Solution Method
When there are two decision variables (let they are x1 and x2) in an LP model the feasible solution
space (FSS) of the model can be shown in a plane (2-dimensional space). One axis is x1 axis and the
other is x2 axis.
Example 4:
Max z = 3x1 + x2
s.t.
x1 <= 4
x1 + x2 <= 7
x1>=0
x2>=0
Our empty plane is:

Then we consider our constraints one by one. Let us consider first constraint: x1<=4.
We should determine the part of our plane that satisfies this constraint. First draw the x1=4 line. This
line is drawn in red below.

The red line is the x1=4 line. But, according to our first constraint (x1<=4) the points having smaller
x1 values than 4 are also valid. So we should select the side of the line x1=4 that satisfies the
constraint x1<=4. The invalid side is scrabbled with red dashes. The valid side is the clean side.

Now, lets consider our second constraint: x1+x2<=7. First we should draw the line: x1 + x2 = 7. The
line is drawn in blue and the side of the line which is invalid according to the constrain is scrabbled.

The remaining clean part of our plane is the solutions satisfying the first and second constraints
simultaneously.

Now, lets consider our third constraint: x1>=0. The invalid part is scrabbled below.

Now, the last constraint (x2>=0) is considered and the invalid side is scrabbled below.

The final clean part, the region OABC, is the feasible solution space (FSS) of the model. The FSS is
shown more clearly in the following figure.

FSS

The last work is searching the optimal solution in this FSS region. Our objective function is:
Max z = 3x1 + x2. Lets draw the line 3x1 + x2 = 3 (i.e., z = 3). The intersection points of the FSS
and 3x1 + x2 = 3 line are the feasible solution with objective function value 3.

Lets draw another line with a higher z value, for example the line 3x1 + x2 = 6 (i.e., z = 6). The
intersection points of the FSS and 3x1 + x2 = 6 line are the feasible solution with objective function
value 6. When we move the objective function in the direction shown below the objective function
value increases. So, in order to find the feasible solution with the maximum z value (the optimal
solution), we should move the objective function line in this direction as much as possible.

increasin
g
direction

Corner point B is the last feasible solution that touches the objective function line when we move the
line in the increasing direction. So, after that point we dont have any other feasible solution in the
increasing direction of the objective function. Then, corner point B is the OPTIMAL solution of the
model.

increasin
g
direction

We should determine the coordinates of the corner point B. Point B is the intersection point of the
constraint lines x1=4 and x1 + x2 = 7. We can use these equations and find the coordinates of point
B. We have two unknowns and two equations.
x1 = 4
x1 + x2 = 7
Solution is: x1=4, x2=3.
At this point B(4,3) the optimal objective function value is:
z = 3x1 + x2 = 3*4 + 3 = 15.
Example 5: Search the optimal solution of the following LP model by the graphical solution method.
Min z = x1 + x2
s.t.
-x1 + x2 <= 2
x1 + x2 >= 4
x2 >= 2
x1, x2 >= 0
The FSS of the model is depicted below. Notice that the right hand side of the FSS is open ended.

A
FSS

The z = x1 + x2 = 7 line and the decreasing direction of the objective function is shown below.

decreasi
ng
direction

A
B

In order to find the feasible solution(s) with the minimum z value (the optimal solution), we should
move the objective function line in this direction as much as possible. When we move the objective
function in its decreasing direction just before it leaves the FSS it coincides with a surface of the FSS
(the line part between points A and B). At this moment the value of z is 4 (i.e, z = x1 + x2 = 4). So, in
this example we have alternative optimal solutions. All the feasible solutions on this surface
(including corner points A and B) are alternate optimal solutions.

A
B

Example 6: Search the optimal solution of the following LP model by the graphical solution method.
Max z = x1 + x2
s.t.
-x1 + x2 <= 2
x1 + x2 >= 4
x2 >= 2
x1, x2 >= 0
This example is almost same with the Example 2. The only difference is that in this example we want
to maximize the objective function. So, the FSS and slope of the objective function is same. Now, we
should consider its increasing direction. It is shown below.

increasin
g
direction

A
B

In order to find the feasible solution(s) with the maximum z value (the optimal solution), we should
move the objective function line in this direction as much as possible. Since, the FSS is open ended
in this direction always we can find a better feasible solution then our current solution. So, we cannot
determine any specific solution as our optimal solution. In this case it is said that the model has
unbounded solution.
Example 7: Search the optimal solution of the following LP model by the graphical solution method.
Max z = x1 + x2
s.t.
-x1 + x2 <= 2
x1 + x2 <= 1
x2 >= 4
x1, x2 >= 0
When you try to determine the FSS you will see that the entire plane will be cancelled and no FSS
will be remained. In this example the FSS is an empty set. The answer is infeasible solution. (Hint:
Last three constraints cannot be satisfied at the same time)
Important Property 1: The feasible solution space of an LP model is an empty set or a convex set.
Important Property 2: If there is an optimal solution of an LP model it is always a corner point of
the FSS.
Redundant Constraint: If a constraint has no active affect on the FSS then it is called redundant
constraint. Deleting a redundant constraint does not change the FSS.
Shortage of the Graphical Method: When the number of the decision variables is more than two
the graphical method is not applicable since we cannot visualize n-dimensional FSS (n>2).
Example 8: (Bankloan Policy)
A bank is in the process of formulating a loan policy involving a maximum of $12 million.
Type of loan

Yearly
Interest rate

Probability of
bad debt

Personal
Car
Home
Farm
Commercial

0.140
0.130
0.120
0.125
0.100

0.10
0.07
0.03
0.05
0.02

Bad debts are uncoverable and hence produce no interest revenue and furthermore loan itself is lost.
Competition in the area requires the bank to allocate at least 40% of total loan to farm and
commercial loans. To assist the housing industry in the region, home loans must be at least 50% of
total of personal, car and home loans. The bank wishes to maximize total expected return after one
year. (Assume that loans start today and return after one year) Develop the LP model of the problem.

Solution:
Decision variables:
x1: personal loan amount (in million dollar)
x2: car loan amount (in million dollar)
x3: home loan amount (in million dollar)
x4: farm loan amount (in million dollar)
x5: commercial loan amount (in million dollar)
If a customer takes 1 dollar personal loan from the bank after 1 year he pays this 1 dollar and its
interest which is 0.140 dollar, in total 1.140 dollar. With the probability 0.10 this personal loan does
not return and it is lost. But with the probability 0.90 it returns as 1.140 dollar. So, the expected
return from 1 dollar personal loan is 0.90*1.140 dollar.
Objective function:
Max z = 0.90*1.140x1 + 0.93*1.130x2 + 0.97*1.120x3 + 0.95*1.125x4 + 0.98*1.100x5
(maximization of total expected return)
Constraints:
x4 + x5 >= 0.40(x1 + x2 + x3 + x4 + x5) (farm and commercial loans must be at least the 40% of
total loans)
x3 >= 0.50(x1 + x2 + x3) (home loans must be at least 50% of total of personal, car and home loans)
x1, x2, x3, x4, x5 >= 0 (there cannot be negative loan)
The entire model is:
Max z = 0.90*1.140x1 + 0.93*1.130x2 + 0.97*1.120x3 + 0.95*1.125x4 + 0.98*1.100x5
s.t.
x4 + x5 >= 0.40(x1 + x2 + x3 + x4 + x5)
x3 >= 0.50(x1 + x2 + x3)
x1, x2, x3, x4, x5 >= 0
Example 9:
John must work at least 20 hours a week to supplement his income while attending school. He has the
opportunity to work in two retail stores: in store1, John can work between 5 and 12 hours a week, and
in store 2, he is allowed to work between 6 and 10 hours. Both stores pay the same hourly wage. John
thus wants to base his decision about how many hours to work in each store on a different criterion:
work stress factor. Based on interviews with present employees, John estimates that, on a scale of 1
to 10, the stress factors are 8 and 6 at stores 1 and 2, respectively. Because stress mounts by the hour,
he presumes that the total stress at the end of the week is proportional to the number of hours he
works in the store. How many hours should John work in each store?
Solution:
x1: working hours in store 1
x2: working hours in store 2

Min z = 8x1 + 6x2


s.t.
x1 + x2 >= 20
x1 >= 5
x1 <=12
x2 >= 6
x2 <=10
x1, x2 >= 0
Example 10:
Two products are manufactured in a machining center. The production times per unit of products 1
and 2 are 10 and 12 minutes, respectively. The total regular machine time is 2500 minutes per day. In
any one day, the manufacturer can produce between 150 and 200 units of product 1, but no more than
45 units of product 2. Overtime may be used to meet the demand at an additional cost of $.50 per
minute. Assuming that the unit profits for products 1 and 2 are $6.00 and $7.50, respectively,
formulate LP model?
Solution:
x1: daily production amount of products 1
x2: daily production amount of products 2
y : daily overtime amount (in minute)
Max z = 6x1 + 7.5x2 0.5y
s.t.
10x1 + 12x2 <= 2500 + y
x1 >= 150
x1 <= 200
x2 <= 45
x1, x2, y >= 0
Note that if the total production time exceeds the regular time 2500 minutes then the difference is
hold by variable y as the over time.
Example 11:
B&K grocery store sells two types of soft drinks: brand A1 Cola and the store brand, B&K Cola. The
margin of profit for A1 is 5 cents per can and that of B&K is 7 cents per can. On the average, the
store sells no more than 500 cans of both colas a day. Although A1 is a recognized brand, customers
tend to buy more B&K because it is considerably cheaper. It is estimated that at least 100 cans of A1
are sold daily and that B&K outsells A! On a daily basis by a ratio of at least 2:1. How many cans per
day of each brand should the store carry to maximize profit?
Solution:
x1: number of the cans of A1 cola been carried per day
x2: number of the cans of B&K cola been carried per day

Max z = 5x1 + 7x2


s.t.
x1 + x2 <= 500
2x1 <= x2
x1 >= 100
x1, x2 >= 0
Example 12:
You have decided to enter the candy business. You are considering producing two types of candies.
Slugger Candy and Easy Out Candy, both of which consist of solely of sugar, nuts and chocolate. At
present, you have in stock 100 oz of sugar, 20 oz of nuts, and 30 oz of chocolate. The mixture used to
make Easy Out Candy must contain at least 20 % nuts. The mixture used to make Slugger Candy
must contain at least 10% nuts and 10% chocolate. Each ounce of Easy Out Candy can be sold for 25
cents, and each ounce of Slugger Candy for 20 cents. Formulate an LP model that will enable you to
maximize your revenue from candy sales.
Solution:
x11: amount of sugar in the Slugger Candy (in oz)
x21: amount of nut in the Slugger Candy (in oz)
x31: amount of chocolate in the Slugger Candy (in oz)
x12: amount of sugar in the Easy Out Candy (in oz)
x22: amount of nut in the Easy Out Candy (in oz)
x32: amount of chocolate in the Easy Out Candy (in oz)
Max z = 20(x11 + x21 + x31) + 25(x12 + x22 + x32)
s.t.
x11 + x12 <= 100
x21 + x22 <= 20
x31 + x32 <= 30
x22 >= 0.2(x12 + x22 + x32)
x21 >= 0.1(x11 + x21 + x31)
x31 >= 0.1(x11 + x21 + x31)
x11, x21, x31, x12, x22, x32 >= 0
Note that the amount of candy is equal to the sum of sugar, nut and chocolate in it.
Example 13:
O.J. Juice Company sells bags of oranges and cartons of orange juice. O.J. grades oranges on a scale
of 1 (poor) to 10 (excellent). At present, O.J. has on hand 100,000 lb of grade 9 oranges and 120, 000
lb of grade 6 oranges. The average quality of oranges sold in bags must be at least 7, and the average
quality of the oranges used to produce orange juice must be at least 8. Each pound of oranges that is
used for juice yields a revenue of $1.50 and incurs a variable cost (consisting of labor costs, variable
overhead costs, inventory costs etc.) of $1.05. Each pound of oranges sold in bags yields a revenue of
50 cents and incurs a variable cost of 20 cents. Formulate and LP to help O.J. maximize profit.
Solution:
x11: amount of grade 6 orange used in bags of oranges (in lb)
x21: amount of grade 9 orange used in bags of oranges (in lb)
x12: amount of grade 6 orange used in orange juice (in lb)
x22: amount of grade 9 orange used in orange juice (in lb)

Max z = 0.3(x11 + x21) + 0.45(x12 + x22)


s.t.
x11 + x12 <= 120000
x21 + x22 <= 100000
6x11 + 9x21 >= 7(x11 + x21)
6x11 + 9x21 >= 8(x12 + x22)
x11, x12, x21, x22 >= 0
Closed From Models:
Up to now the mathematical models are presented in open form. Let x 1, x2, x3, , xn are the decision
variables; c1, c2, c3, , cn are the objective function coefficients of the decision variables,
respectively. Lets have m constraints. Let aij is the coefficient of x j in the ith constraint. Let bi is the
right hand side (RHS) constant of the ith constraint.
Let the objective function in the open form is:
Min z = c1x1 + c2x2 + c3x3 + + cnxn
This objective function can be written in the closed form as fallows.
n

Min z c j x j
j 1

Let the constraints in the open form are:


a11x1 + a12x2 + + a1nxn b1
a21x1 + a22x2 + + a2nxn b2
a31x1 + a31x2 + + a3nxn b3

am1x1 + am1x2 + + amnxn bm


x1, x2, , xn 0
These constraints can be written in the closed form as fallows.
n

cij x j bi

i 1,2,3,..., m

xj 0

j 1,2,3,..., n

j 1

The Transportation Problem:


In general, a transportation problem is specified by the following:
1. A set of m supply points (e.g. depots) from which a good is shipped. Supply point i can supply, at
most, Si units.
2. A set of n demand points (e.g. retailers, customers)to which the good is shipped. Demand point j
must receive at least dj units of the shipped goods.
3. Each unit produced at supply point i and shipped to demand point j incurs a variable cost cij.
The problem is to determine the amounts of shipments from each supply point to each demand point
such that the minimum total transportation cost is minimized.
The mathematical model of the transportation problem is:

Min z cij xij


i 1 j 1

s.t.
n

xij Si

i 1,2,3,..., m

(capacity constraint s)

xij d j

j 1,2,3,..., n

(demand constraint s)

xij 0

i 1,2 ,3,...,m; j 1,2,3,..,n

(nonnegati vity)

j 1
m

i 1

Example 14:
Powerco has three electric power plants that supply the needs of four cities. Each power plant can
supply the following numbers of kWhr of electricity: Plant 1 35 million; Plant 2 50 million; Plant
3 40 million. The peak power demands in these cities, which occur at the same time, are as follows
(in kWhr): City 1 45 million; City 2 20 million; City 3 30 million; City 4 30 million. The
costs of sending 1 million kWhr of electricity from plant to city depend on the distance the electricity
must travel (see Table). Formulate an LP problem to minimize the cost of meeting each citys peak
power demand.
To
From
City 1
City 2
City 3
City 4
Supply(M kWhr)
Plant 1
$8
6
10
9
35
Plant 2
9
12
13
7
50
Plant 3
14
9
16
5
40
Demand
45
20
30
30
We begin by defining a variable for each decision that Powerco must make. We define, (for i = 1, 2, 3
and j = 1, 2, 3, 4)
Xij = number of (million) kWhr produced at plant i and sent to city j
Then,
Min Z = 8X11 + 6X12 + 10X13 + 9X14 + 9X21 + 12X22 + 13X23 + 7X24 + 14X31 + 9X32 + 16X33 +
5X34
s.t.
X11 + X12 + X13 + X14 35
(Supply constraints)
X21 + X22 + X23 + X24 50
X31 + X32 + X33 + X34 40
X11 + X21 + X31 45
X12 + X22 + X32 20
X13 + X23 + X33 30
X14 + X24 + X34 30

(Demand constraints)

Xij 0
When the total supply is equal to total demand the problem is called the balanced transportation
problem. The balanced transportation problem can be solved by the Transportation Table Method.
This method actually is a special case of the Simplex Algorithm. The solution procedure starts with a
initial feasible solution and explores the optimal solution in the subsequent iterations. Three methods
are given below to find an initial feasible solution.

1) North-West Cell Method


Step 1: Select the north-west cell among the empty cells.
Step 2: Allocate as much as possible to the selected cell, and adjust the associated amounts of
supply and demand by subtracting the allocated amount.
Step 3: Cross out the row or the column with zero supply or demand to indicate that no
further assignments can be made in that row or column. If both the row and the column net to
zero simultaneously, cross out only one and leave a zero supply (demand) in the uncrossed
out row (column).
Step 4: If the south-east cell is filled, STOP. Otherwise, go to Step 1.
2) Least Unit Cost Method
Step 1: Select the cell with the least unit cost among the empty cells.
Step 2: Allocate as much as possible to the selected cell, and adjust the associated amounts of
supply and demand by subtracting the allocated amount.
Step 3: Cross out the row or the column with zero supply or demand to indicate that no
further assignments can be made in that row or column. If both the row and the column net to
zero simultaneously, cross out only one and leave a zero supply (demand) in the uncrossed out
row (column).
Step 4: If all cells are filled, STOP. Otherwise, go to Step 1.
3) Vogel Approximation Method (VAM)
Step 1: For each row and each column which are not entirely filled, determine a penalty
measure by subtracting the smallest unit cost from the second smallest unit cost in the same
row (column).
Step 2: Select the row or column with the largest penalty (break ties arbitrarily). Select the
cell with the least unit cost among the empty cells in the selected row (column). Allocate as
much as possible to the selected cell, and adjust the associated amounts of supply and demand
by subtracting the allocated amount. Cross out the row or the column with zero supply or
demand to indicate that no further assignments can be made in that row or column. If both the
row and the column net to zero simultaneously, cross out only one and leave a zero supply
(demand) in the uncrossed out row (column).
Step 3: If exactly one row (column) remains apply the least unit cost method in the remaining
cells. Otherwise go to Step 1.

Network Models
A network consists of a set of nodes linked by edges. A directed edge is called arc. A directed
network consists of only arcs. The notation for describing a network is (N, E), where N is the set of
nodes and E is the set of edges.
Example: G = (N, E) where N = {1, 2, 3, 4, 5} and E = {(1,2), (1,3), (2,4), (2,5), (3,4), (4,5)}. Draw
the network G.
A path is a sequence of district edges (or arcs) that join two nodes regardless of the directions of arcs.
A path forms a loop (or a cycle) if it connects a node to itself. In a network if there is at least one path
between all different node pairs then this network is called connected network. A tree is a network
that contains no loop. Spanning tree is a tree that links all the nodes of a network to each others.
Some weights may be assigned to the nodes and edges (arcs).

The Shortest Path Problem


In the shortest path problem the shortest (minimum total weighted) path from a node of a weighted
network (arcs are edges are weighted) to another node is searched.
Dijkstra Algorithm
Step 1: Assign the permanent label [-, 0]* to the origin node. i = origin node.
Step 2: If the destination node is labeled by a permanent label, STOP.
Step 3: Assign a temporary label [i, ui + dij] to the reachable and not permanently labeled node j
from node i. If node j previously labeled by a temporary label [k, uj] and (ui + dij)<uj cancel the label
[k, uj], else if node j previously labeled by a temporary label [k, uj] and (ui + dij)>=uj cancel the
label [i, ui + dij]. Repeat it for all possible j nodes.
Step 4: Among the temporary labels find the one with the smallest distance and turn it to a permanent
label, select that node as node i. Go to Step 2.
Example: Find the shortest path from node 1 to node 7 in the following network.
2

2
7

12
2
6

9
7

3
1

15

5
4
4

Solution:
Step 1:
2

2
7

12
2
[-,0]*
1

9
7

3
1

15

5
4
4

Step 2: Go to Step 3
Step 3:

[1,12]

2
7

12
2
[-,0]*
1

[1,6]

3
1

15

5
4

[1,2]

Step 4:
2

[1,12]

2
7

12
2
[-,0]*
1

[1,6]

3
1

15

5
4

[1,2]*

Step 2: Go to Step 3
Step 3:
[4,17]
2

[1,12]

2
7

12
2
[-,0]*
1

[1,6]

[4,10]
7

3 [4,3]
1

15

5
[1,2]*

4
4

5 [4,6]

Step 4:
2

[1,12]

2
7

12
2
[-,0]*
1

[1,6]

[4,10]
7

3 [4,3]*
1

15

5
[1,2]*

4
4

5 [4,6]

Step 2: Go to Step 3
Step 3:
[1,12] [3,5]
2

12
2
[-,0]*
1

[1,6]

[4,10]
7

3 [4,3]*
1

15

5
[1,2]*

4
4

5 [4,6]

Step 4:
[1,12] [3,5]*
2

12
2
[-,0]*
1

[1,6]

[4,10]
7

3 [4,3]*
1

15

5
[1,2]*

Step 2: Go to Step 3
Step 3:

4
4

5 [4,6]

[1,12] [3,5]*
2

12
2
[-,0]*
1

[1,6]

[4,10]
7 [2,12]

3 [4,3]*
1

15

5
[1,2]*

4
4

5 [4,6]
[2,14]

Step 4:
[1,12] [3,5]*
2

7
2
[1,6]

[2,7]*

12
[-,0]*
1

[2,7]

[4,10]
7 [2,12]

3 [4,3]*
1

15

5
[1,2]*

4
4

5 [4,6]
[2,14]

Step 2: Go to Step 3
Step 3:
[1,12] [3,5]*
2

12
2
[-,0]*
1

[1,6]

[2,7]*

[4,10]
7 [2,12]

3 [4,3]*
1

15

[6,9]
5

[1,2]*

4
4

5 [4,6]
[2,14]

Step 4:
[1,12] [3,5]*
2

12
2
[-,0]*
1

[1,6]

[2,7]*

[4,10]
7 [2,12]

3 [4,3]*
1

15

[6,9]

5
[1,2]*

4
4

5 [4,6]*
[2,14]

Step 2: Go to Step 3
Step 3:
[1,12] [3,5]*
2

12
2
[-,0]*
1

[1,6]

[2,7]*

[4,10]
7 [2,12]

3 [4,3]*
1

15

[6,9]
[5,11]

5
[1,2]*

4
4

5 [4,6]*
[2,14]

Step 4:
[1,12] [3,5]*
2

12
2
[-,0]*
1

[1,6]

[2,7]*

[4,10]
7 [2,12]

3 [4,3]*
1

15

[6,9]*
[5,11]
5

[1,2]*

4
4

5 [4,6]*
[2,14]

Step 2: STOP: The shortest path: 143267, Distance = 9.


Mathematical Model of the Shortest Path Problem
Let u be the origin node and v be the destination node.
xij: if edge (i,j) is on the shortest path 1, otherwise 0.
min z
s.t.

( i , j )E
(i v ) ( j u )

dij xij

xuj 1

(1)

xiv 1

(2)

( u , j )E

( i , v )E

xij x ji

j N {u , v}

(3)

xij {0,1}

(i, j ) E | (i v) ( j u )

(4)

( i , j )E
i v

( j , i )E
i u

Objective function is the minimization of total weight on the path. Constraint (1) guarantees the
departure from the origin node. Constraint (2) guarantees the arrival to the destination node.
Constraint (3) balances the number of arrivals and departures for the remaining nodes. Notice that
arrival to origin node and departure from destination node are forbidden by not using the
corresponding decision variables.
The Minimum Spanning Tree Problem
In the minimum spanning tree problem the minimum total weighted spanning tree is searched over a
given network.
xij: if edge (i,j) is on the minimum spanning tree 1, otherwise 0.
min z d ij xij
s.t.

( i , j )E

( i , j )E
iS j N S

xij 1

xij {0,1}

S N | 1 | S |

(1)

(i, j ) E

( 2)

Prim Algorithm
Let Ck be the set of nodes that have been covered by the minimum spanning tree up to iteration k, and
Uk be the set of remaining nodes.
Step 1: Select any node i in set N. Set C1 = {i}, U1 = N-{i}, k = 2.
Step 2: Select the node j in the set Uk-1 that yields the shortest edge to a node in Ck-1. This edge is an
element of the minimum spanning tree. Set Ck=Ck-1 + {j}, and Uk = Uk-1 {j}.
Step 3: If Ck = N STOP, otherwise k=k+1 and go to Step 2.

Example: Find the minimum spanning tree in the following network.


2

2
7

10

12
2
1

9
7

3
1

15

13

15
4
4

Solution:
Step 1: Lets select node 2. C1 = {2}. U1 = {1, 3, 4, 5, 6, 7}. k = 2.
2

10

12
2
1

9
7

3
1

15

13

15
4
4

Step 2: Shortest edge from node 2 to remaining nodes is 2. (There are two edges having length 2, one
of them can be selected arbitrarily. Lets select node 3). C2 = {2, 3}. U2 = {1, 4, 5, 6, 7}.
2

10

12
2
1

9
7

15

13

15
4
4

Step 3: C2 N. k = 3. Go to Step 2.

Step 2: Shortest edge from node 2 and node 3 to remaining nodes is 1. C3={2, 3, 4}. U3={1, 5, 6, 7}.
2

10

12
2
1

9
7

15

13

15
4

Step 3: C3 N. k = 4. Go to Step 2.
Step 2: Shortest edge from nodes 2, 3 and 4 to remaining nodes is 2. C4={2, 3, 4, 6}. U4={1, 5, 7}.
2

10

12
2
1

9
7

15

13

15
4

Step 3: C4 N. k = 5. Go to Step 2.
Step 2: Shortest edge from nodes 2, 3, 4 and 6 to remaining nodes is 4. C5={2, 3, 4, 6, 5}. U5={1, 7}.
2

10

12
2
1

9
7

15

13

15
4

Step 3: C5 N. k = 6. Go to Step 2.
Step 2: Shortest edge from nodes 2, 3, 4, 5 and 6 to remaining nodes is 6. C6={2, 3, 4, 6, 5, 1}.
U6={7}.
2

10

12
2
1

9
7

15

13

15
4
5

Step 3: C6 N. k = 7. Go to Step 2.
Step 2: Shortest edge from nodes 1, 2, 3, 4, 5 and 6 to remaining node is 7. C7={2, 3, 4, 6, 5, 1, 7}.
U7={}.
2

10

12
2
1

9
7

15

13

15
4

Step 3: C7 = N, STOP.

Vous aimerez peut-être aussi