Линейное программирование. Практикум. Учебное пособие для бакалавриата
.pdf
6. DUALITY
g = 3y1 +5y2 +2y3 → max |
||||
y +2y +y |
≤1, |
|||
|
1 |
2 |
3 |
|
|
|
|
−7y3 ≤2, |
|
2y1 −8y2 |
||||
−5y +6y +y ≤ −1, |
||||
|
|
1 |
2 |
3 |
y |
≥ 0, y |
≥ 0,y ≥ 0. |
||
|
1 |
2 |
|
3 |
f = x1 +3x2 +x3 −3 → min
c)x1 −x2 +x3 =1,3x1 −2x2 +x3 =5,
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0.
g = y1 +5y2 −3 → maxy1 +3y2 ≤1,
−y1 −2y2 ≤2,y1 +y2 ≤1.
f = x1 +2x2 −x3 +5 → max
d)2x1 −x2 +3x3 =1,4x1 +3x2 +7x3 =5,
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0.
g = y1 +5y2 +5 → max2y1 +4y2 ≥1,
−y1 +3y2 ≥2,3y1 +7y2 ≥ −1.
— 71 —
6.DUALITY
2)The solution of the primal problem
f = −3x4 −6x5 +2 → min
x1 +2x2 +x5 = 6,x2 −x4 +x5 =10,x3 +x4 −x5 =18.
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0, x5 ≥ 0.
is fmin = f(0, 4, 24, 0, 6) = −34 . Find a solution of the dual problem
gmax = f(−6, 0, 0) = −34
— 72 —
7.TRANPORTATION PROBLEM
7.1.Statement of a Transportation Problem
The transportation problem is a special class of the linear programming problem in which it is required to find the optimal plan that minimizes the total cost of transportation from a finite number of suppliers to a finite number of consumers.
Let A1, , Am be points of departure and
a1, ,am be corresponding supplies at these points, B1, ,Bn points of destination;
b1, ,bm be corresponding demands at these points;
cij be cost of transportation one unit of the product from Ai to Bj ;
xij be quantity of the product transported from Ai to
Bj ;
m |
n |
Then ∑ai is total supply; |
∑bj is total demand; |
i=1 |
j=1 |
m n
∑∑cijxij is total cost of transportation.
i=1 j=1
Transportation problem
m n
z(X) = ∑∑cijxij → min
i=1 j=1
subject to
— 73 —
7. Tranportation problem
m |
|
j =1, ,n, |
∑xij = bj, |
||
i=1 |
|
|
n |
|
i =1, ,m, |
∑xij = ai, |
||
j=1 |
|
|
x |
≥ 0. |
|
ij |
|
|
|
|
|
Remark. The equations of the constraint system mean
that
1)all demands are satisfied;
2)all supplies are taken out.
Definition. A solution X = (xij ) of the system of constraints is called a feasible plan, and a solution of the transportation problem is called an optimal plan.
All information |
about the |
transportation |
problem |
|||
is conveniently located in the following table. |
|
|||||
|
The Transportation Table |
|
||||
|
|
|
|
|
|
|
|
|
|
Destinations |
|
||
Departures |
B1 |
|
B2 |
… |
Bn |
Supply |
A1 |
c11 |
|
c12 |
… |
c1n |
a1 |
x |
|
x |
x |
|||
|
11 |
|
12 |
|
1n |
|
|
|
|
|
|
|
|
… |
… |
|
… |
… |
… |
… |
Am |
cm1 |
|
cm2 |
… |
cmn |
am |
x |
|
x |
x |
|||
|
m1 |
|
m2 |
|
mn |
|
|
|
|
|
|
|
|
Demand |
b1 |
|
b2 |
… |
bn |
|
|
|
|
|
|
|
|
— 74 —
7. Tranportation problem
Definition. A transportation problem is said to be closed
(balanced) if
|
|
m |
n |
|
|
|
∑ai = ∑bj . |
|
|
|
|
i=1 |
j=1 |
|
m |
n |
|
|
|
If ∑ai ≠ |
∑bj then a transportation problem is called |
|||
i=1 |
j=1 |
|
|
|
an open (unbalanced) one. |
|
|
||
Theorem. A transportation problem is solvable iff |
||||
|
|
m |
n |
|
|
|
∑ai = ∑bj . |
|
|
|
|
i=1 |
j=1 |
|
,. 1) Let X* = (xij* ) |
is an optimal plan |
|||
|
m |
|
j =1, ,n, |
|
|
∑xij* = bj, |
|||
|
i=1 |
|
|
|
|
n |
|
|
|
|
∑xij* = ai, |
i =1, ,m. |
||
|
|
|
|
|
|
j=1 |
|
|
|
We get |
m |
n |
m |
|
|
∑∑xij* |
= ∑ai |
|
|
|
i=1 j=1 |
i=1 |
|
|
|
n |
m |
n |
|
|
∑∑xij* |
= ∑bj |
|
|
|
j=1 i=1 |
j=1 |
|
|
|
|
m |
n |
|
|
|
∑ai = ∑bj . |
|
|
|
|
i=1 |
j=1 |
|
mn
2)∑ai = ∑bj = M .
i=1 j=1
— 75 —
7. Tranportation problem
а) Let us show that the feasible set D is non-empty.
Let
xij = aMibj ≥ 0 .
|
n |
||
n |
ai ∑bj |
||
∑xij = |
j=1 |
||
M |
|||
j=1 |
|||
|
m |
||
m |
bj ∑ai |
||
∑xij = |
i=1 |
|
|
M |
|||
i=1 |
|||
So, xij is a feasible plan.
= |
|
aiM |
= ai |
( i =1, ,m) |
||
M |
||||||
|
|
|
|
|||
= |
bj M |
|
= bj |
( j =1, ,n). |
||
|
||||||
|
|
M |
|
|
||
b) Let us show that the feasible set D is bounded.
Indeed
n
∑xij = ai 0 ≤ xij ≤ ai . j=1
The cost function z(X) is continuous so according to the Weierstrass theorem it reaches the least value on the non-empty closed bounded set D.,
Remark. The number of the basic variables of the system of non-trivial constraints of a transportation problem equals m +n −1.
The solving of a transportation problem consists of three parts.
1)Finding an initial basic plan.
2)Testing it for optimality.
3)Improving the basic plan if the test fails.
— 76 —
7. Tranportation problem
7.2.Finding an Initial Basic Plan
7.2.1The North-West Corner Rule
He simplest method finding the initial basic plan is North-West Corner Rule.
We describe it using the example given below.
Example. Find an initial basic plan of the transportation problembyusingthenorth-west corner rule(NWCR.Consider the transportation problem given by he transportation table
|
B1 |
B2 |
B3 |
B4 |
|
ai |
|
|
|
|
|
|
|
A1 |
11 |
5 |
4 |
|
2 |
80 |
|
|
|
|
|
||
|
|
|
|
|
|
|
A2 |
1 |
4 |
5 |
|
9 |
170 |
|
|
|
|
|
||
|
|
|
|
|
|
|
A3 |
9 |
8 |
7 |
|
10 |
150 |
|
|
|
|
|
||
|
|
|
|
|
|
|
bj |
70 |
60 |
180 |
90 |
|
400 |
Solution.
Let’s first check if the transport task is closed
80 +170 +150 =70 +60 +180 +90 = 400 . Thus, the transportation problem is closed.
Let us choose the cell A1B1 (the upper left corner) and make x11 as large as possible subject to the constraints:
x11 = min{a1;b1}= min{80;70}=70 , so x12 = min{80 −70;60}=10 .
— 77 —
7. Tranportation problem
|
B1 |
B2 |
B3 |
B4 |
ai |
|
|
|
|
|
|
A1 |
11 |
5 |
4 |
2 |
80 |
70 |
10 |
|
|
||
|
|
|
|
||
|
|
|
|
|
|
A2 |
1 |
4 |
5 |
9 |
170 |
|
|
|
|
||
|
|
|
|
|
|
A3 |
9 |
8 |
7 |
10 |
150 |
|
|
|
|
||
|
|
|
|
|
|
bj |
70 |
60 |
180 |
90 |
400 |
|
|
|
|
|
|
Similarly |
|
|
|
|
|
|
x22 = min{170;60 −10}=50 , |
|
|||
|
x23 = min{170 −50;180}=120 . |
|
|||
|
|
|
|
|
|
|
B1 |
B2 |
B3 |
B4 |
ai |
|
|
|
|
|
|
A1 |
11 |
5 |
4 |
2 |
80 |
70 |
10 |
|
|
||
|
|
|
|
||
|
|
|
|
|
|
A2 |
1 |
4 |
5 |
9 |
170 |
|
50 |
120 |
|
||
|
|
|
|
||
|
|
|
|
|
|
A3 |
9 |
8 |
7 |
10 |
150 |
|
|
|
|
||
|
|
|
|
|
|
bj |
70 |
60 |
180 |
90 |
400 |
|
|
|
|
|
|
And finally |
|
|
|
|
|
|
x33 = min{150;180 −120}= 60 ; |
|
|||
— 78 —
7. Tranportation problem
x34 =150 −60 = 90 .
|
|
B1 |
|
B2 |
|
B3 |
|
B4 |
|
ai |
|
|
|
|
|
|
|
|
|
|
|
A1 |
70 |
11 |
10 |
|
5 |
|
4 |
|
2 |
80 |
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
A2 |
|
1 |
50 |
|
4 |
120 |
5 |
|
9 |
170 |
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
A3 |
|
9 |
|
|
8 |
60 |
7 |
90 |
10 |
150 |
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
bj |
|
70 |
|
60 |
|
180 |
|
90 |
|
400 |
|
|
|
|
|
|
|
|
|||
Thus, we get the initial plan |
|
|
|
|
||||||
|
|
|
70 |
10 |
0 |
0 |
|
|
||
|
|
|
|
0 |
50 |
120 |
0 |
|
|
|
|
|
X = |
. |
|
|
|||||
|
|
|
|
0 |
0 |
60 |
90 |
|
|
|
|
|
|
|
|
|
|
||||
And
z(X) =70 11+10 5 +50 4 +120 5 +60 7 +90 10 =2940.
Remark. The main disadvantage of the NWCR is that it does not take into account the cost of transportation. Therefore, the initial basic plan may be far from the optimal one.
7.2.2 The Least-Cost Rule
The main idea of the Least-Cost Rule is choosing the cells with the smallest costs at first.
Example. Find an initial basic plan of the transportation problem above by using the Least-Cost Rule.
— 79 —
7. Tranportation problem
Solution.
|
B1 |
B2 |
B3 |
B4 |
ai |
|
|
|
|
|
|
A1 |
11 |
5 |
4 |
2 |
80 |
|
|
|
|
||
|
|
|
|
|
|
A2 |
1 |
4 |
5 |
9 |
170 |
|
|
|
|
||
A3 |
9 |
8 |
7 |
10 |
150 |
|
|
|
|
||
|
|
|
|
|
|
bj |
70 |
60 |
180 |
90 |
400 |
|
|
|
|
|
|
We |
have min cij = c21 , |
so x21 = min{170;70}=70 . |
|||
We obtain |
|
|
|
|
|
|
|
|
|
|
|
|
B1 |
B2 |
B3 |
B4 |
ai |
A1 |
11 |
5 |
4 |
2 |
80 |
|
|
|
|
||
A2 |
1 |
4 |
5 |
9 |
170 |
70 |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
A3 |
9 |
8 |
7 |
10 |
150 |
|
|
|
|
||
bj |
70 |
60 |
180 |
90 |
400 |
Next minimum cost c14 =2 , so x14 = min{80;90}= 90 . And we get
— 80 —
