3.2.1. Power Balance Constraint

Electricity supply and demand should be balanced in the microgrid system:

$$\sum\_{i=1}^{I} P\_{i,t} + P\_{\text{grid},t} + \sum\_{j=1}^{J} PMT\_{j,t} + \sum\_{l=1}^{L} PV\_{l,t} - PEV\_t = P\_{\text{load},t} \tag{12}$$

where *Pload*,*<sup>t</sup>* is the total load demand at period *t*.

### 3.2.2. Generation Capacity Constraints

The output power of DEs and MTs should be within a certain range:

$$\begin{array}{c} P\_{i,\text{min}} \le P\_{i,t} \le P\_{i,\text{max}}\\ PMT\_{j,\text{min}} \le PMT\_{j,t} \le PMT\_{j,\text{max}} \end{array} \tag{13}$$

where *Pi*,min and *Pi*,max are the lower and upper limits of the power output of the *i*th DE, respectively. Similarly, *PMTj*,min and *PMTj*,max are the lower and upper limits of the power output of the *j*th MT, respectively.

### 3.2.3. Ramp Rate Limits

Ramp rate refers to the increase or decrease of output power per unit of time from traditional power sources.

$$\begin{array}{l}P\_{i,\text{down}} \le P\_{i,t} - P\_{i,t-1} \le P\_{i,\text{up}}\\P\_{j,\text{down}} \le PMT\_{j,t} - PMT\_{j,t-1} \le P\_{j,\text{up}}\end{array} \tag{14}$$

where *Pi*,*down* and *Pi*,*up* are the lower and upper limits of the ramp rate of the *i*th DE, respectively, and *Pj*,*down*, *Pj*,*up* are the lower, upper limits of the ramp rate of the *j*th MT, respectively.
