EE 458, Spring 2008, HW#5, Due 3/14

advertisement
EE 458, Spring 2008, HW#5, Due 3/14
I. For each of the LPs below,
a. Formulate the dual problem
b. Use CPLEX to solve the primal and identify
i. the optimal value
ii. the values of the decision variables
iii. the values of the slack variables
iv. the values of the dual variables
c. Use CPLEX to solve the dual and identify
i. the optimal value
ii. the values of the decision variables
iii. the values of the slack variables
iv. the values of the dual variables
1.
max F  10 x1  5 x 2  3 x3
s.t.
3 x1  x 2  x3  4
x1  x 2  1
x1  0, x 2  0, x3  0
Solution:
a. Dual problem:
min G  4 y1  y 2
s.t.
3 y1  y 2  10
y1  y 2  5
y1  3
y1  0, y 2  0
b. CPLEX solution for primal:
i. optimal value: 14
ii. values of decision variables: x1=0, x2=1,x3=3
iii. values of slack variables: x4=0, x5=0
iv. values of dual variable : y1=3,y2=2
c. CPLEX solution for dual:
i. optimal value: 14
ii. values of decision variables: y1=3, y2=2
iii. values of slack variables: y3=-1, y4=0, y5=0
iv. values of dual variables: x1=0, x2=1, x3=3
2.
1
max F  3 x1  2 x 2
s.t.
x1  12
x1  3 x 2  45
2 x1  x 2  30
x1  0, x 2  0, x3  0
Solution:
a. Dual problem:
min G  12 y1  45 y 2  30 y3
s.t.
y1  y 2  2 y3  3
3 y 2  y3  2
y1  0, y 2  0, y3  0
b. CPLEX solution for primal:
i. optimal value: 51
ii. values of decision variables: x1=9, x2=12
iii. values of slack variables: x3=3, x4=0, x5=0
iv. values of dual variable : y1=0, y2=0.2, y3=1.4
c. CPLEX solution for dual:
i. optimal value: 51
ii. values of decision variables: y1=0, y2=0.2, y3=1.4
iii. values of slack variables: y4=0, y5=0
iv. values of dual variables: x1=9, x2=12
3.
max F  2 x1  2 x 2  4 x3
s.t.
 x1  x 2  x3  20
2 x1  x 2  x3  10
x1  x 2  3 x3  60,
x1  0, x 2  0, x3  0
Solution:
a. Dual problem:
min G  20 y1  10 y 2  60 y3
s.t.
 y1  2 y 2  y3  2
y1  y 2  y3  2
y1  y 2  3 y3  4
y1  0, y 2  0, y3  0
2
b.CPLEX solution for primal:
i. optimal value: 50
ii. values of decision variables: x1=0, x2=5, x3=15
iii. values of slack variables: x4=0, x5=0, x6=10
iv. values of dual variable : y1=1, y2=3, y3=0
c. CPLEX solution for dual:
i. optimal value: 50
ii. values of decision variables: y1=0, y2=3, y3=0
iii. values of slack variables: y4=-3, y5=0, y6=0
iv. values of dual variables: x1=0, x2=5, x3=15
4.
max F  6 x1  5 x 2  x3  4 x 4
s.t.
3 x1  2 x 2  3 x3  x 4  120
3 x1  3 x 2  x3  3 x 4  180
x1  0, x 2  0, x3  0, x 4  0
Solution:
a. Dual problem:
min G  120 y1  180 y 2
s.t.
3 y1  3 y 2  6
2 y1  3 y 2  5
 3 y1  y 2  1
y1  3 y 2  4
y1  0, y 2  0
b.CPLEX solution for primal:
i. optimal value: 315
ii. values of decision variables: x1=55, x2=0, x3=15, x4=0
iii. values of slack variables: x5=0, x6=0
iv. values of dual variable : y1=0.75, y2=1.25
c.CPLEX solution for dual:
i. optimal value: 315
ii. values of decision variables: y1=0.75, y2=1.25
iii. values of slack variables: y3=0, y4=-0.25, y5=0, y6=-0.5
iv. values of dual variables: x1=55, x2=0, x3=15, x4=0
5.
3
max F  15 x1  3x 2  9 x3  12 x 4
s.t.
x1  2 x 2  4 x3  3x 4  10
 4 x1  6 x 2  5 x3  4 x 4  20
2 x1  3x 2  3x3  8 x 4  25
x1  0, x 2  0, x3  0, x 4  0
Solution:
a. Dual problem:
min G  10 y1  20 y 2  25 y 3
s.t.
y1  4 y 2  2 y 3  15
 2 y1  6 y 2  3 y3  3
4 y1  5 y 2  3 y 3  9
3 y1  4 y 2  8 y3  12
y1  0, y 2  0, y3  0
b.CPLEX solution for primal:
i. optimal value: Note that this one is unbounded (check it w Cplex)
ii. values of decision variables:
iii. values of slack variables:
iv. values of dual variable :
c.CPLEX solution for dual: And so this one should be infeasible (check it w Cplex)
i. optimal value:
ii. values of decision variables:
iii. values of slack variables:
iv. values of dual variables:
II. Set up and solve the DC load flow for the system below. Compute all line flows.
Compare the line flows to those for the solution given in the class notes, and
comment on the effect of the added line in terms of loading in other lines.
Pg2=2pu
Pg1
1
2
y12 =-j10
y14 =-j10
y13 =-j10
Pd2=1pu
y23 =-j10
y13 =-j10
y34 =-j10
4
Pg4=1pu
3
Pd3=4pu
4
Solution:
Relative to the P=B’θ relation from the notes, we need to modify four elements of the B’
matrix corresponding to entries for buses 2 and 4 between which the new line is
connected. Specifically, we need to modify elements (2,2), (2, 4), (4,2), and (4,4). The
result is as follows:
 2   30  10  10  10 1 
 1   10 30  10  10  
 
 2 
 4  10  10 30  10  3 
  
 
1

10

10

10
30
  
  4 
Now we need to remove row 1, column 1, resulting in:
1
 2   30  10  10  1   0.025
    10 30  10  4    0.15 
 3 
   

 4   10  10 30   1   0.025
This is exactly the same solution we obtained in the notes, using the system without the
line from bus 2 to bus 4. We should have predicted this because the angles of buses 2 and
4 were the same, and so placing a line between them would not result in any flow.
Therefore, the line flows should be exactly the same, an expectation we can check via
P B  ( D  A)   . The incidence matrix is constructed as in the notes, except we need
one more row corresponding to the extra branch between buses 2 and 4. We define
directionality on this branch as positive from bus 2 to bus 4.
node
number



2 3 4
 0 0 - 1
- 1 0 0 


 1 -1 0 
A

0
1
1


 0 -1 0 


1
0
1


5
1
2
3
 branch number
4
5

6
The D-matrix is
10 0 0 0 0 0 
 0 10 0 0 0 0 


 0 0 10 0 0 0 
D

0
0
0
10
0
0


 0 0 0 0 10 0 


 0 0 0 0 0 10
 PB1  10 0 0 0 0 0   0
 P   0 10 0 0 0 0  - 1
 B2  

 PB3   0 0 10 0 0 0   1
 

P
0
0
0
10
0
0
B
4
  
 0
 PB5   0 0 0 0 10 0   0
  

 PB 6   0 0 0 0 0 10  1
- 1
0.25
0.25
0 0 

 0.025 
-1 0 
 1.25 
   0.15   

-1 1 
1
.
25

 0.025 


-1 0
1.5 



0 - 1
 0 
0
Notice that the flow on the circuit we added is zero, which confirms that the solution is
the same. The solution is illustrated in the figure below.
Pg2=2pu
Pg1=2pu
1
2
P12=0.25
P14 =0.25
P13=1.5
Pd2=1pu
P43 =1.25
4
Pg4=1pu
P23 =1.25
3
Pd3=4pu
III. Now repeat problem II, using the same system, except change the bus 2 generation
from 2 to 4. Give all line flows.
6
1
 2   30  10  10  3   0.075 
    10 30  10  4   0.10
 3 
   

 4   10  10 30   1   0.025 
 PB1  10 0 0 0 0 0   0 0 - 1
 0.25
 P   0 10 0 0 0 0  - 1 0 0 


 B2  

  0.075   0.75
 PB 3   0 0 10 0 0 0   1 - 1 0  
  1.75 
 

  0.10  

P
0
0
0
10
0
0
0
1
1
1
.
25
B
4
  

  0.025  

  1.0 
 PB 5   0 0 0 0 10 0   0 - 1 0  
  




 PB 6   0 0 0 0 0 10  1 0 - 1
 0.5 
The solution is illustrated in the figure below. Notice the bus 1 generation must be 0 to
satisfy P1+P2+P3+P4+P5=0.
Pg2=3pu
Pg1=0pu
1
P14 = -0.25
2
P13=1.0
P12= -0.75
Pd2=1pu
P13=0.5
P43 =1.25
4
Pg4=1pu
3
Pd3=4pu
7
P23 =1.75
Download