PH - Algorithm (New)

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

PH Algorithm

1. Step 0: Set s0 = 0 and λ 0 = perpendicular to s0 . Set i = 0.


2. Step 1: For each k = 1, 2, 3, solve the scenario subproblems:
ρ i,k
min [(ci1 )T xi,k + (ci2 )T yi,k + (ci3 )T wi,k ] + λ i,k (xi,k − si ) + ∥x − si ∥2
xi,k ,yi,k ,wi,k 2
W1 xi,k ≤ r1i
C2k xi,k +W2 yi,k + R2 wi,k ≤ r2i,k
where i is for the iteration, k is for the scenario,
xk = (x1k , x2k , x3k ),
s = (s1 , s2 , s3 ),
yk = (yk1 , yk2 ),
wk = (wk1 , wk2 , wk3 , wk4 ).
The only thing that is changing is C2k for each scenario k.
3. Step 2: Stop if satisfy the nonanticipativity constraints (that is, xi,k = si ), other-
wise go to step 3.
4. Step 3: For stage 1, calculate the components of si+1 using xi,k as follows:
3
1
si+1 = 3 ∑ xi,k .
k=1

5. Step 4: Calculate the multipliers λ i+1,k by λ i+1,k = λ i,k + ρ(xi,k − si+1 ).


6. Step 5: Increase iteration i by 1 and go to step 1.
In this algorithm, I want to enter initial values of s0 = (0, 0, 0), λ 0 = (0, 0, 0), p = 1, and
the only changing values for each scenario which is in matrix C2k after running the code.

For your understanding, 3 sceanrio subproblems are as follows:

min 150x1 + 230x2 + 260x3 + 238y1 + 210y2 − 170w1 − 150w2 − 36w3 − 10w4
s. t. x1 + x2 + x3 ≤ 500,
− 3x1 − y1 + w1 ≤ −200,
− 3.6x2 − y2 + w2 ≤ −240,
− 24x3 + w3 + w4 ≤ 0,
w3 ≤ 6000.
(Scenario 1)

1
min 150x1 + 230x2 + 260x3 + 238y1 + 210y2 − 170w1 − 150w2 − 36w3 − 10w4
s. t. x1 + x2 + x3 ≤ 500,
− 2.5x1 − y1 + w1 ≤ −200,
− 3x2 − y2 + w2 ≤ −240,
− 20x3 + w3 + w4 ≤ 0,
w3 ≤ 6000.
(Scenario 2)

min 150x1 + 230x2 + 260x3 + 238y1 + 210y2 − 170w1 − 150w2 − 36w3 − 10w4
s. t. x1 + x2 + x3 ≤ 500,
− 2x1 − y1 + w1 ≤ −200,
− 2.4x2 − y2 + w2 ≤ −240,
− 16x3 + w3 + w4 ≤ 0,
w3 ≤ 6000.
(Scenario 3)

ci1 = 150
 i 
210 , ci3 = −170 −150
   
230  , c2 = 
160 238 −36 −10 ,
−1 0
   0 −1
W1 = 1 1 1 , W2 =  0
,
0
0 0
 
−200
−240
r1 = [500], r2 = 
 0 ,

6000
 
1 0 0 0
0 1 0 0
R2 = 0 0 1 1

0 0 1 0
 
−3 0 0
 0 −3.6 0 
The input values I want to give after run the code are: C21 =  ,
0 0 −24
0 0 0
   
−2.5 0 0 −2 0 0
 0 −3 , C3 =  0 −2.4
0   0 
C22 =  , ρ = 1, s0 = (0, 0, 0), λ = (0, 0, 0)
 0 0 −20 2  0 0 −16
0 0 0 0 0 0

You might also like