Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Asieh Hekmat
Optimization model
Optimization model prescribes the behavior for an organization that will enable it to best
meets in goal. Components of this model include:
– Objective function(s)
– Decision variables
– Constraints
An optimization model seeks to find values of the decision variables that optimize
(maximize or minimize) an objective among the set of values for the decision variables
that satisfy the given constraints.
Linear programming - Example
Universal Mines Inc. operates three mines in West Virginia. The ore from each mine is separated
into two grades before it is shipped; the daily production capacities of mines, as well as their daily
operating costs, are as follows:
High- grade ore, Low- grade ore, Operating cost,
(t/day) (t/day) $1000/day
Mine I 4 4 20
Mine II 6 4 22
Mine III 1 6 18
Universal has committed itself to deliver 54 tons of high-grade ore and 65 tons of low-grade ore
by the end of the week. It also has labor contracts that guarantee employees in each mine a full
day`s pay for each day or fraction of a day the mine is open. Determine the number of days each
mine should be operated during the upcoming week if Universal Mines is to fulfill its commitment
at minimum total cost.
Linear programming - Example
High- grade ore, Low- grade ore, Operating cost,
(t/day) (t/day) $1000/day
Mine I 4 4 20
Mine II 6 4 22
Mine III 1 6 18
O.F . Min Z 20 x1 22 x2 18 x3
S .t.
4 x1 6 x2 x3 54
4 x1 4 x2 6 x3 65
x1 , x2 , x3 0
x1 , x2 , x3 7
The Knapsack Problem
Consider a set of items each of which has a predefined weight and a monetary value (profit).
These items have to be packed into a bag whose maximum weight is limited in such a way that it
can not carry all of the available items. The problem consists in choosing a subset of items which
1. fit into the bag with respect to the weight limit and
Xj =1 : if John takes item j in the knapsack; Xj =0, otherwise. John has to take at least one
of the items 1 and 4:
Max: Z= 16 X1 + 22 X2 + 12 X3 + 8 X4 X1 + X4 = 1
Xj =1 or Xj =0 for j= 1, 2, 3, 4 X1 + X4 = 2
The Traveling Salesman Problem
The traveling salesman problem consists of a salesman and a set of cities. The
salesman has to visit each one of the cities starting from a certain one (e.g. the
hometown) and returning to the same city. The challenge of the problem is that the
traveling salesman wants to minimize the total length of the trip.
n n
MinZ cij xij i j
i j
n
Enter x 1 i 1,2,.., n
j 1
ij
1
xij
0
n
Exit x ij 1 j 1,2,.., n
i 1
The Traveling Salesman Problem
1 2 3 4
1 X 8 7 5
2 2 X 6 4
3 3 10 X 3
4 7 5 4 X
Min Z= 8x12 +7x13 +5x14 + 2x21 +6x23 +4x24 +3x31 +10x32 +3x34 +7x41 +5x42 +4x43
The Traveling Salesman Problem-
Example
Constraint:
1 Will travel
xij
0 Will not travel
Travel from place i just to one place j Arrive to place j just from one place i
x12 +x13 +x14 = 1 x21 +x31 +x41 = 1
x21 +x23 +x24 = 1 x12 +x32 +x42 = 1
x31 +x32 +x34 = 1 x13 +x23 +x43 = 1
x41 +x42 +x43 = 1 x14 +x24 +x34 = 1
The Traveling Salesman Problem-
Example
Constraint:
If the salesman travel from i to j, cannot go back from j to i.
x12 +x21 ≤ 1
x13 +x31 ≤ 1
x14 +x41 ≤ 1
x23 +x32 ≤ 1
x42 +x24 ≤ 1
x43 +x34 ≤ 1
The Traveling Salesman Problem- Example
Constraint:
If the salesman travel from i to j and then to k, cannot go back from k to i.
A transportation problem basically deals with the problem, which aims to find the best
way to fulfill the demand of n demand points using the capacities of m supply points.
While trying to find the best way, generally a variable cost of shipping the product from
one supply point to a demand point or a similar constraint should be taken into
consideration.
Transportation problems
A typical transportation problem requires three sets of numbers:
– Capacities (or supplies) Indicate the most each plant can supply in a given time
period.
– Demands (or requirements) They are typically estimated from some type of
forecasting model. Often demands are based on historical customer demand
data.
The problem: Given needs at the demand locations, how should we take the limited
supply at supply locations and move the goods. The objective is to minimize the total
transportation cost.
Transportation problems
Variables
x24 = Tonnes of copper plate to go from Refinery 2 to Factory D
x11 = Tonnes of copper plate to go from Refinery 1 to Factory A x25 = Tonnes of copper plate to go from Refinery 2 to Factory E
x12 = Tonnes of copper plate to go from Refinery 1 to Factory B x26 = Tonnes of copper plate to go from Refinery 2 to Factory F
x13 = Tonnes of copper plate to go from Refinery 1 to Factory C x27 = Tonnes of copper plate to go from Refinery 2 to Factory G
x14 = Tonnes of copper plate to go from Refinery 1 to Factory D x31 = Tonnes of copper plate to go from Refinery 3 to Factory A
x15 = Tonnes of copper plate to go from Refinery 1 to Factory E x32 = Tonnes of copper plate to go from Refinery 3 to Factory B
x16 = Tonnes of copper plate to go from Refinery 1 to Factory F x33 = Tonnes of copper plate to go from Refinery 3 to Factory C
x17 = Tonnes of copper plate to go from Refinery 1 to Factory G x34 = Tonnes of copper plate to go from Refinery 3 to Factory D
x21 = Tonnes of copper plate to go from Refinery 2 to Factory A x35 = Tonnes of copper plate to go from Refinery 3 to Factory E
x22 = Tonnes of copper plate to go from Refinery 2 to Factory B x36 = Tonnes of copper plate to go from Refinery 3 to Factory F
x23 = Tonnes of copper plate to go from Refinery 2 to Factory C x37 = Tonnes of copper plate to go from Refinery 3 to Factory G
Transportation problems
■ Refinery 1: 1,400
Refinery 2: 2,600
Refinery 3: 2,900
■ Factory A: 900
Factory B: 1,200
Factory C: 600
Factory D: 400
Factory E: 1,700
Factory F: 1,100
Factory G: 1,000
Transportation problems
Transportation model
A transportation problem involves m sources, each of which has available ai (i = 1, 2, …, m) units
of homogeneous product, and n destinations, each of which requires bj (j = 1, 2, …, n) units of the
product.
The numbers of ai and bj are positive integers. The cost Cij of transporting one unit of product
from the ith source to the jth destination is given for each i and j.
The objective is to develop an integral transportation schedule (the product may not be
fractionalized) that meet all demands from current inventory at the minimum total shipping cost.
That is assumed that total supply and total demand are equal:
𝑚 𝑛
𝑎𝑖 = 𝑏𝑗
𝑖=1 𝑗=1
Standard form
Let xij represent the (unknown) number of units to ship from source i to destination j. then the
standard mathematical mode for this problem is:
𝑚 𝑛
𝑥𝑖𝑗 = 𝑎𝑖 (𝑖 = 1, 2, … . , 𝑚)
𝑖=1
𝑛
𝑥𝑖𝑗 = 𝑏𝑖 (𝑗 = 1, 2, … . , 𝑛)
𝑗=1
Balanced
transportation model
Transportation problem example
A mining company extracts gravel, the basic product it sells, from three mines, L1, L2 and L3. The
weekly production of each mine is 75, 150 and 75 tones of gravel respectively. The gravel has to
be transported to five main consumers, K1, K2, K3, K4 and K5 requiring for their needs 100, 60,
40, 75 and 25 tones of gravel per week respectively.
The problem that concerns the company's management is the minimization of the required cost
for the transportation of the product to the consumers. For this purpose a detailed cost analysis
was carried out which gave the results of the following table (the numbers denote the
transportation cost in $ per ton of gravel).
Transportation problem example
Cost table of gravel transportation
Consumers
Mines
Solution- Step 1: finding an initial basic feasible solution
1. The maximum possible quantity is assigned to the northwest (up left) cell
depending on the supply and demand of the corresponding row or column. The
supply of the row and the demand of the column are adjusted appropriately.
2. Either the row of which the supply is exhausted or the column of which the demand
is satisfied is crossed out.
3. If all supplies are exhausted and all demands are satisfied then END, otherwise:
transfer to step 1.
Solution- Step 1: Northwest corner method
Initial feasible solution with the Northwest corner method
The minimum cost method uses shipping costs in order to come up with a basic feasible
solution that has lower total cost. To begin the method, first the variable xij with the
smallest shipping cost is located. The largest possible value is assigned to variable xij;
this value is the minimum of ai and bj .
After that, as in the Northwest Corner Method, row i or column j is crossed out and the
supply or the demand of the non-crossed out row or column is reduced by the value of
xij. The next route (cell) with the minimum shipping cost is chosen among the ones
which do not belong to the crossed-out row or column. This procedure is repeated until
all capacities are exhausted and all demands are satisfied.
Solution- Step 1: Minimum cost method
Initial feasible solution with the minimum cost method
1. Addition - below and right of the transportation tableau – of a new row and a new column with
elements the difference of the two smaller cost elements of each row and each column
respectively.
2. Selection of the largest element of the added two new lines.
3. Finding of the minimum element of row i or column j in which belongs the element identified
in step 2.
4. Assignment of the value xij = min (ai , bj) to the route corresponding to the position of the
smallest element in order to meet the capacity of a source or the demand of a destination.
5. If the capacity of a source is exhausted, the demand bj of the corresponding destination is
reduced by ai . In contrary, if the demand of a destination is satisfied, the capacity ai of the
corresponding source is reduced by bj . The source (row) or destination (column) that was
satisfied is crossed-out and is not taken further into account.
Solution- Step 1: Vogel method
Each time the above procedure is repeated the capacity of a source is exhausted or the needs of
a destination are satisfied. The implementation of the method is completed when the capacity of
the last row and the needs of the last column are simultaneously satisfied. The solution yielded is
feasible because it meets all capacities and all needs.
Solution- Step 1: Vogel method
Solution- Step 1: Vogel method
Initial basic feasible solution (Vogel method)
So far we have only looked at ways of obtaining an initial basic feasible solution to the balanced
transportation problem. We now develop a method for checking whether the current basic
feasible solution is optimal. For illustrative purposes, we will start with the initial basic feasible
solution that was provided by the North-West Corner method. Usually, initial basic feasible
solutions obtained by the Least-Cost method or Vogel’s method will give better starting
configurations.
Suppose that the cost cij of transporting 1 unit from source i to destination j is made up of a
dispatch cost ui and a reception cost vj so that
ui + vj = cij
whenever xij is a basic variable
Solution-Step 2: Checking for optimality
Remarks
The total number of ui and vj variables is n+m. However, there are only n+m−1 basic
variables. Thus, we are free to choose one of the ui ’s or vj ’s arbitrarily. It is usual to set
u1 = 0.
These “costs” can take negative values if required
Considering only these dispatch and reception costs, it would cost ui + vj to send 1 unit from
source i to destination j. For (i, j) not corresponding to a basic variable, it will often be the case
that ui + vj ≠ cij . In particular, if ui + vj > cij for a particular (i, j) not corresponding to a basic
variable, then there would be a benefit from sending more goods that way.
Solution-Step 2: Checking for optimality