Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Linear Programming: © Bruce F. Wollenberg, University of Minnesota 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Lecture 5

Linear Programming
© Bruce F. Wollenberg, University of Minnesota 1
LP Problem
Maximize Production of 2 Plants

x1 is the output from plant 1


x2 is the output from plant 2

Benefit Of Product Plant 1, c1 = 3 [ $/MWh]


Benefit Of Product Plant 2, c2 = 5 [ $/MWh]

The “Objective Function” expresses the overall benefit


to be optimized, our objective function is:
Maximize: 3 x1 + 5 x2

Plant maximum output constraints:


Maximum Production of Plant 1, b1 = 4
Maximum Production of Plant 2, b2 = 6

Plants Must Meet an additional inequality constraint:


3 x1 + 2 x2 ≤ 18
© Bruce F. Wollenberg, University of Minnesota 2
Mathematical statement of the LP

© Bruce F. Wollenberg, University of Minnesota 3


The feasible region for the LP
X2
8 x2 ≤ 6

6 (2,6)
3x1 + 2x2 ≤ 18
5 (0,6)

x1 ≥ 0 4

3 FEASIBLE (4,3)
REGION
2
x1 ≤ 4

1
(0,0) (4,0)

X1
1 2 3 4 5 6
x2 ≥ 0

© Bruce F. Wollenberg, University of Minnesota 4


Summary of the LP

© Bruce F. Wollenberg, University of Minnesota 5


LP objective function

© Bruce F. Wollenberg, University of Minnesota 6


LP in canonical form with slack
variables

© Bruce F. Wollenberg, University of Minnesota 7


Basic feasible solutions

© Bruce F. Wollenberg, University of Minnesota 8


All basic feasible solutions
1 0 1 0 0  4
A= 0 1 0 1 0  b=  6 
 3 2 0 0 1  18

−1
 x1  1 0 1   4   2 
x4 = 0
Set 1:  x2  =0 1 0   6  = 6  ⇒ z =−36 (∗)
        x5 = 0
 x3   3 2 0  18  2 

−1
 x1  1 0 0   4   4 
x3 = 0
Set 2:  x2  =0 1 1   6  = 3  ⇒ z =−27
        x5 = 0
 x4   3 2 0  18  3 

© Bruce F. Wollenberg, University of Minnesota 9


−1
 x1  1 0 0   4  4
x3 = 0
Set 3: = x  0 1 0  = 6   6  ⇒ OUT fails condition that all x are ≥ 0
  2       x4 = 0
 x5   3 2 1  18  −6 

−1
 x1  1 1 0   4   6 
x2 = 0
Set 4:  x3  =0 0 1   6  = −2  ⇒ OUT fails condition that all x are ≥ 0
        x5 = 0
 x4   3 0 0  18  6 

−1
 x1  1 1 0   4  ∞ 
x2 = 0
Set 5:  x3  = 0 0 0   6  = ∞  ⇒ OUT A matrix singular
        x4 = 0
 x5   3 0 1  18 ∞ 

−1
 x1  1 0 0   4   4 
x2 = 0
Set 6:  x4  =0 1 0   6  = 6  ⇒ z =−12
        x3 = 0
 x5   3 0 1  18  6 

© Bruce F. Wollenberg, University of Minnesota 10


−1
 x2  0 1 0  4  9
x1 = 0
Set 7: = x  1 0 1  = 6   4  ⇒ NO fails condition that all x are ≥ 0
  3       x5 = 0
 x4   2 0 0  18  −3

−1
 x2   0 1 0   4   6 
x1 = 0
Set 8:  x3  =1 0 0   6  = 4  ⇒ z =−30
        x4 = 0
 x5   2 0 1  18  6 

−1
 x2   0 0 0   4  ∞ 
x1 = 0
Set 9:  x4  = 1 1 0   6  = ∞  ⇒ OUT A matrix singular
        x3 = 0
 x5   2 0 1  18 ∞ 

−1
 x3  1 0 0   4  4
x1 = 0
Set 10:  x4 =  0 1 0   6 =  6⇒=
        z 0 x2 = 0
 x5  0 0 1  18 18

© Bruce F. Wollenberg, University of Minnesota 11


The Simplex Method
Starting with our basic LP problem:

Minimize z = cT x
Subject to A x = b
x ≥ 0

We partition the A matrix and the x and c vectors into basic and non-basic parts:

=
Minimize z cBT xB + cTN xN
Subject to B xB + N xN = b
xB ≥ 0
xN ≥ 0

© Bruce F. Wollenberg, University of Minnesota 12


The Simplex Method
Last of all we carry out the following matrix multiplys:

xB B −1b − B −1 NxN
=
cBT B −1b − cBT B −1 NxN + cTN xN
z=

Now we will observe:

b ≡ B −1b
λ T ≡ cBT B −1
Y ≡ B −1 N

where λ is a vector called the “Dual” variable vector.

© Bruce F. Wollenberg, University of Minnesota 13


The Simplex Method
This leads to a reformulation of our standard form of the LP:

Minimize z = cTB b - λ T N − cTN  x N


Subject to x B = b - Y xN
xB ≥ 0
xN ≥ 0

We will now define d T ≡ λ T N − cTN as the reduced cost vector, and this allows us to write the new
standard form as:

Minimize z = cTB b - d T xN
Subject to x B = b - Y xN
xB ≥ 0
xN ≥ 0

© Bruce F. Wollenberg, University of Minnesota 14


Pivoting

© Bruce F. Wollenberg, University of Minnesota 15


Simplex Mechanism
• If d j is positive, the objective function decreases if the non- basic variable xNj increases
• If the non-basic variable xNj increases, the basic variable xBi decreases if Yij is positive

• If some Y 's are positive, the corresponding basic variables xBi ’s decrease if the non-
ij
basic variable xNj increases
• The non-basic variable xNj can be increased until the first basic variable becomes zero,

that is, until b − Y x becomes 0 for the first i


i ij Nj
Minimum  bi 

• the value of xNj becomes  :Yij >0
1 ≤ i ≤ m  Yij 

Figure 2.1 the value of xBi becomes 0

© Bruce F. Wollenberg, University of Minnesota 16


Simplex Pseudo Code
1. get a basic feasible solution (see next page)

2. find out if the current solution is the minimizer: if all d < 0 stop, the current solution is the
j
minimizer; otherwise go on

3. find out which non-basic variable enters the basis, xNj (most positive d j )

Minimum  bi 

4. find out which basic variable x leaves the basis,  :Yij >0
Bi 1 ≤ i ≤ m  Yij 

5. build the new basis

6. get a new basic feasible solution

3.07. go to 2

© Bruce F. Wollenberg, University of Minnesota 17


Steps to LP solution

© Bruce F. Wollenberg, University of Minnesota 18


LP features
Upper and Lower bounding: A feature of many LP algorithms
available today (for example the LP in the Matlab Optimization
Toolbox) is to directly give vectors of upper and lower bounds
on each LP variable instead of explicitly building constraints for
each limit. Most of the LP problems we have encountered in
power system operation have upper and lower bounds on
variables.
Sensitivity analysis: The Matlab LP allows students to see the
lambda values for all constraints including all variable upper
bound constraints, all variable lower bound constraints, all
linear equality constraints and all linear inequality constraints.
Initial value of the variables: For some problems this may make
a difference in run time, if not specified the algorithm will find
an initial basis by itself© and then proceed to the optimum.
Bruce F. Wollenberg, University of Minnesota 19
THANK YOU

© Bruce F. Wollenberg, University of Minnesota 20

You might also like