You are on page 1of 19

: ( Simplex).

simplex excel.
. .
MSc (..../ )
Team Site: A.E.A.C. Co. Project Manager-Site Administrator
e-mail: s_4goum@yahoo.com , My Blog.

09/05/2013


(Linear Programming) simplex
George Bernard Dantzig 1947
20 . simplex
.

simplex
.
(..) simplex,
(standard form).
(objective
function) (constraints) . ,

Min Max

f ( x1 , x2 , x3 ..xn ) ( )

c1T*n * xn*1

c
j =1`

* xj

Am*n * xn*1 = bm*1

x 0,

a
j =1

ij

* x j = bi

j=1,2,n, i=1,2,m m<n


c , 1*n,

x , n*1
m*n ij .
b , m*1

,
.
(feasible region)
, .
,
(convex polytope),
Rn, 1 (,
1). , ,
, (R2)
(R3).
.
.

S , x,y
x,y, S.

simplex ..,
.
:

1) . ..
, ,
,
. (. 2)
2) .
xj ,
f
3) . xj,
(.
3)

, x,y
x,y .
x,y .


, ,
,

, .
.
excel 2007, solver.
excel.
excel

----------------- solver
Menu Excel Options Add-Ins. Add-Ins
Go Solver. .
Solver Tab Data.
, google
(keyword: how to install solver in excel 2003,2007 )

1) : ( excel: product_1)
, ,,. , 25
30 / . 20
27 / . 15
20 / . 2.000 . ,
20 60 .
(P) ?

25

30

20

27

15

20


Max
P= 30*X+27*Y+20*Z

25 * X + 20 * Y + 15 * Z 2.000
X>20
Z>60

excel linear_problem.xls
.
1)
2) ,
(,,) (10,50,40) , P=30*X+27*Y+20*Z,
sumproduct excel.
3) . 25 * X + 20 * Y + 15 * Z 2.000
>20, >60
Solver .
Set Target Cell ( 25 )
Equal to Max
By Changing Cells (
B23:D23, )
Subject to the constrains ,

) <2.000, ( B33<D33 )
) >20. ( B23>B36 )
) >60 ( D23>B37, ).
, Options, Assume Linear Model Assume Non
Negative
Solve .
Reports .

:
(,,)= (20,30,60) P=2.610

2) : ( excel: product_2)
,
Integer

programming

(..),

(..). .. .. ..
(
), .. (
).

,
.

, (), ()
(). ,
,
.

40

50

35

43

26

34

5.200

Max
P= 50*+43*+34*

40 * M + 35 * B + 26 * 5..200

y1+ y2+ y3=1 ( )


< y1*
< y2*
< y3*
, , >0 , y = 0 /1

.
,
5.200 .
,
. 1,
, 0, . ,
,
1, 0.

, 2,
y = 0, 0,
. , ,
( ).
, :
/ .
5200/ 40= 130 ( )
5200/ 35= 148,5 ( )
5200/ 26= 200 ( ).
, =200
,
, 0 1

excel .
Solver.
.. ().
(y1=1, y2 =0, y3 =0)
Solver .
Set Target Cell ( 34 )
Equal to Max
By Changing Cells ,
( B46:48, )
Subject to the constrains .
i) <5.200 ( B42<D42)
ii) ( 46=BINARY , 47=BINARY, 48=BINARY)
iii) y1+ y2+ y3=1.
, . ( 49=D49)
iv) ( < y1*, < y2*. < y3*).
200 . ( 53=D53,
54=D54, 55=D55).

, Options, Assume Linear Model Assume Non


Negative
Solve .
Reports .
:
(200 ) P=6.800

3) . ( excel: transportation)


.
.
..
- .

,
.

.
.

,
(P1, P2) ,
, (W1,W2,W3). P1, 100
P2 170 / . W1 80 /
, W2 100 / W3 60 / .
(C ) / :

(/ )

(W1)

(W2)

(W3)

(P1)

70 /

40 /

80 /

(P2)

80 /

50 /

90 /

(W1): 80

(W2): 120

(W3): 60

(P1): 100

X11

X12

X13

(P2): 170

X21

X22

X23

Xij , Pi (=1,2) Wj
(j=1,2,3). Cij
. .
1) P1= 100 X11 + X12 + X13 100
2) P2= 170 X21 +X22 +X23 170
3) W1= 80 X11 +X21 80
4) W2= 100 X12 +X22 100
5) W3= 60 X13 +X23 100
6)
C=

i 1

j =1

ij

* X ij

C= C11 * X11 + C12 * X12 + C13 * X13 + C21 * X21 + C22 * X22 + C23 * X23.



Min
C=

i 1

j =1

ij

* X ij

Y
3

X
j =1

ij

X
i =1

ij

< S i =1,2
> Di , j=1,2,3

Si Di .

excel .
Solver.
Xij (
(Pi) (Wj) ).
(X11=30, X12=10, X13=60, X21=50, X22 =50, X23=20).
Solver .
Set Target Cell ( F60 )
Equal to Min
By Changing Cells Xij
P1, P2 W1,W2,W3
( C48:E49, )
Subject to the constrains ,
i) P1= 100 ( F48<E69)
ii) P2= 170 ( F49<E70)
iii) W1= 80 ( C50<E71)
iv) W2= 100 ( D50<E72)
v) W3= 60 ( E50<E73)

, Options, Assume Linear Model Assume Non


Negative
Solve .
Reports .

(W1)

(W2)

(W3)

(P1)

40

60

(P2)

40

100

C= 15.800.

.

!!
1) .
2) .
. ,

(.. 10,530 kg ). , ,
, (
) .
.


.
,
.
.
1) (operation research)
2) (network design)
3) . (Internet traffic)
4) (transportation problem)
5) (manufacturing problem)
6) (microeconomics)
7) (diet problem)
8) (portfolio optimization)
9) (game theory)
10) (design Very Large Scale
Integration (VLSI) integrated circuits)


(DUALITY)

,
.
.
, .
, ,
, .
(primal) .

c1T*n * xn*1

Am*n * xn*1 = bm*1


x>0

.
g

b1*m * wm*1

An*m * wm*1 = cm*1


w>0

(primal) (dual)
.

1) .
(f),
,
(g) .

(Primal Problem)
Minimize f: c1*n * xn*1
T

Am*n * xn*1 > bm*1 , x>0


(Dual Problem)
Maximize g: b1*m * wm*1
T

An*m * wm*1 < cn*1 , w>0


T

2) ,

. ,

.
,
!
, ,
c, b .



Minimize 3 * x1 + 5 * x2

4*x1+5*x2 >6
2*x1+9*x2 >3
x1, x2> 0

Maximize 6 * w1 + 3 * w2

4*w1+2*w2 <3
5*w1+9*w2 < 5
w1, w2> 0
3) .

) , c*x (primal problem)

b*w (dual

problem)
)

) .
4) w, (shadow
prices). ,
.

Max g: 1,5 * w1 + w2

w1+w2 <8
3*w1+w2 <18
w2 <6
w1, w2> 0
( w1 , w2)= (5 , 3)
1 . w1+w2 <9.
(w1 , w2)= (4.5 , 4.5), w1 0.5
w2 1.5 . g,
1.5*(-0.5) + 1*1.5= 0.75 0.75
(binding)
(not binding) . ,
. ,
. ,
.
,
. { },
, { },

.
, w1+w2 <8, ,
. ,
w2 <6, .

(binding) . (not binding)


-
-
-
-
- .

You might also like