“…where f 1 (x) is the objective function of the capacity allocation model of the first stage, which can be expressed by Formula (15); h(x) ≤ 0 is the first stage constraint, corresponding to the installed capacity constraint of Formula (21); f 2 (y, x, u) is the objective function of the second stage, which can be expressed by Formula ( 16); x defines the decision variable of the first stage, that is, the configuration capacity of each energy equipment; u defines the uncertain variable, including the PV and WT output; y defines the decision variable of the second stage, that is, the output power of each energy equipment; s defines the decision variable of the second stage, which is the 0/1 state variable related to the power of the ES and power grid; g(y, x, u) is the inequality constraint of the second stage, which can be expressed by Formulas ( 24)-( 28), (31), and (32); and l(y, s, u) is the equality constraint of second stage, which can be expressed by Formulas ( 22), ( 23), ( 29), (30), and (32).…”