Research Article

Two-Layer Optimization Method for Sharing Energy Storage and Energy considering Subjectivity

Algorithm 1

The Process of the Nested Algorithm.
Step 1: Load basic information and initialize parameters of the upper-level optimization.
Initialize n=0.
Initialize the NSGA-II parameters according to Table 1.
Step 2: Randomly generate the 0th population.
Stochastically generate Ecap.
Step 3:Initialize parameters of the lower level optimization.
Initialize .
Initialize =0, =max (If ≥0) or =min (If <0).
Initialize and .
Step 4: Optimize the lower-level model.
 Solve optimization models (22) and (23) to obtain and by using solvers of Gurobi 9.0.3. The target vector () is constant in the child layer, and the result vector () is constant in the parent layer
Step 5: Check the stop criterion of the lower optimization.
If formula (27) is met, go to Step 7; otherwise go to Step 6.
Step 6: Update parameters of the lower optimization.
Update the Lagrange multipliers with formulas (28) and (29).
Update the step size γ with formulas (30).
Update .
Go to Step 4.
Step 7: Output the optimal solution of the lower-level optimization.
Step 8: Passing the optimal solution of the lower optimization to the upper optimization.
Step 9: Optimize the upper-level model.
Solve optimization models (1) and (5) to generate the (n+1)th population (Ecap) by using NSGA-II.
Step 10: Check the stop criterion of the upper optimization.
If the maximum generation in Table 1 is met, go to Step 12; otherwise, go to Step 11.
Step 11: Update the parameters of the upper optimization.
Update population by using NSGA-II.
Update n=n+1.
Go to Step 3.
Step 12: Output the optimal solution of the upper-level optimization.