11.1 Introduction

As mentioned in the last chapter, the maritime transportation accounted for almost 90% world’s trades [1]. However, due to the high reliance on fossil fuels, the shipping industry has caused enormous gas emission and correspondingly made ports one of the major sources of shipping-related air pollution in recent decade [2, 3]. To solve the urgent environmental problems, the Marine Environment Protection Committee implemented an ambitious emissions reduction mission in 2018, targeting a 50–70% reduction in greenhouse gas emissions from the shipping industry by 2050 [4]. Under this context, maritime electrification technologies, including renewable energy-based seaport microgrids and all-electric ships, come into existence and become an inevitable trend toward sustainable development of seaports.

Conventionally, seaports only provide logistic services to berthing ships, including berth allocation [5,6,7] and quay crane (QC) assignment for handling cargos on ships [8,9,10], which are the emphasis of most existing literatures in maritime community. However, these studies only focus on transportation efficiency while completely ignoring energy management associated with these industrial processes. As a results, seaports consume a large amount of fossil energy, leading to noise and air pollutions on the harbor territory.

To reduce gas emission within harbor territory, seaport microgrids become a representative and promising technology toward future sustainable maritime transportation [11]. With the development of green technologies, many measures have been implemented in seaports recently. For example, cold-ironing technology can provide onshore electrical power to berthing ships [12]. Ships are powered by onshore electricity while completely shutting down auxiliary diesel generators. Besides, electricity-driven equipment [13], renewable energy [14], and integrated energy system [15, 16], have also be applied into seaports. In this sense, the connections between the seaport and ships are no longer limited in logistic-side, but also expanded to electric-side [17]. Better energy management strategies should be implemented in future seaports to improve energy efficiency and economic benefits.

Last decades have witnessed many results on seaport energy management. Literature [18] achieved the demand response of port reefers through adjusting their charging time. Literature [19] optimized the energy absorptions of port cranes in an evaluated drive system. They also shaved the peak power demands of port cranes by installing ultracapacitors and flywheels into port cranes [20]. In Literature [21,22,23,24], a multiagent-based hierarchical framework was proposed to optimize a large number of port flexible loads. Various power loads, including electric vehicles, reefers and all electric ship (AES), are aggregated into upper-level agents. Such method reduces the scale of optimization model, thereby enhancing the efficiency of seaport energy management. Although the above studies have made remarkable progresses in seaport energy management, most of them only optimized the curve of power demands that given in advance. The most distinctive features of seaports (e.g., berth allocation) are completely ignored.

In fact, since the power load distributions of AESs and QCs totally depend on berth allocation schemes, the berth allocation process has a significant impact on the power dispatch of microgrids. Therefore, the interdependency between berth allocation and the power dispatch should be considered in seaport microgrid operations. However, there is a limited number of existing studies on this topic. Literature [17] conceptually proposed the benefits of the coordination between berth allocation and power dispatch. Literature [25] optimized the electric and thermal demands of port integrated energy systems by considering flexible berth allocation, which provided adequate flexibility to facilitate port operation. Literature [26] adjusted ship’s berthing duration and the number of assigned cranes to reduce the operational costs of seaport microgrids under uncertain renewable generation.

Although the above literature has initially explored this area, and some of them considered the uncertainty of renewable energy generation, the impact of uncertainty from berth allocation, e.g., AES arrival time, on the seaport microgrid operations has not been fully discussed. In fact, the uncertain AES arrival directly affects berth allocation, and thus having an impact on power load distribution and power dispatch of seaport microgrids. Moreover, in literatures [25, 26], the berthing duration of AES are determined day-ahead. However, the uncertainty of AES arrival is revealed intra-day. The day-ahead decisions may be infeasible when actual arrival time of AES is later than planned berthing start time. From this perspective, considering the uncertainty of AES arrival is crucial for the operation of seaport microgrid. Besides, since the benefits of coordination between power dispatch and berth allocation highly depends on the available renewable generation [26], the uncertain renewable generation will also influence berth allocation process in turn. Therefore, the multiple uncertainties of both AES arrival and renewable generation will simultaneously post challenges on the operation of seaport microgrids, and thus should be considered comprehensively. However, to our best knowledge, there is no existing literatures considering this issue.

Based on the above discussion, it can be found that there may lack a coordination between berth allocation and power dispatch in seaport microgrids considering the multiple uncertainties of AES arrival and renewable generation. To fill the existing research gaps, this chapter proposes an optimal joint scheduling strategy to coordinate power dispatch and berth allocation in a uniform framework under the mentioned multiple uncertainties.

11.2 Deterministic Joint Scheduling Model

11.2.1 Problem Description

This study aims to jointly schedule berth allocation process of AES and the power dispatch of green port microgrids to improve energy efficiency and economic benefits. Figure 11.1 illustrates a typical structure of port microgrids. On the shore-side, a renewable energy-based microgrid combining onsite photovoltaic (PV), battery energy storage system (BESS), dispatchable distributed generator (DG) and substation connecting to the main grid provides electricity for power loads on both shore-side and ship-side. On the ship-side, AESs anchor to wait firstly when arrive the seaport. Then the seaport allocates berths to the anchoring AESs. At the same time, certain number of QCs are assigned for berthing AESs for cargo handling tasks.

Fig. 11.1
figure 1

Schematic diagram of port microgrids

Due to the application of cold-ironing and electrification technologies into seaports, AESs and QCs are both supported by onshore electricity. The berth allocation schemes will have a significant impact on the power load distribution of AESs and QCs, thereby influencing the power flow of shore-side microgrids. However, the objective of shore-side microgrids is to minimize electricity supply costs, while the ship-side aims to minimize the total services time of AESs. The two different objectives may conflict with each other due to the mutual impact between shore-side and ship-side. Therefore, the berth allocation and the power dispatch should be implemented in a coordinated framework to achieve a better synergy and trade-off between electricity supply costs and AES service efficiency.

The coordination between berth allocation and power dispatch is executed by seaport control center shown in Fig. 11.1. The microgrid determines unit commitment of DGs, charging and discharging power of BESS, power output of PV array and power flow in electrical networks. The decisions of ship-side includes the berthing position and duration of each AES, and the number of QCs assigned for each AES at each time slot. By jointly optimizing the decisions of microgrids and ship-side under the uniform management of seaport control center, an optimal joint scheduling scheme that can achieve the balance between electricity supply costs and AESs service efficiency can be obtained.

11.2.2 Objective Function

The objective of ship-side is to minimize the total service time of AES, which is measured differently from the electricity supply costs of microgrids. To compare the benefits between power dispatch and berth allocation, berthing related cost coefficients are introduced to convert service time of AES into economic costs. Then, the objective function of deterministic joint optimization model can be formulated to minimize the total costs of microgrid operations and AES berth allocation services as follows:

$$ \begin{array}{*{20}c} \begin{aligned} F & = \mathop \sum \limits_{t \in T} \mathop \sum \limits_{{g \in N_{DG} }} \left( {u_{g,t} S_{g}^{on} + v_{g,t} S_{g}^{off} } \right) \\ & \quad + \mathop \sum \limits_{t \in T} \left[ {c_{t}^{grid} P_{t}^{grid} + \mathop \sum \limits_{g = 1}^{{N_{DG} }} \left[ \begin{gathered} h_{g,2} \left( {P_{g,t}^{DG} } \right)^{2} \hfill \\ + h_{g,1} P_{g,t}^{DG} + h_{g,0} \hfill \\ \end{gathered} \right]} \right] \\ & \quad + \mathop \sum \limits_{s \in S} \left[ {c_{s}^{w} \left( {t_{s}^{a} - t_{s}^{b} } \right) + c_{s}^{b} \left( {t_{s}^{d} - t_{s}^{b} } \right)} \right] \\ \end{aligned} \\ \end{array} $$
(11.1)

where T, S, \(N_{DG}\) are the set of dispatch period, AESs and DG units, t is the indice of time slot, g is the indice of DG unit, s is the indice of AES, \(u_{g,t}\) is the binary variable indicating whether DG unit g start-up, \(v_{g,t}\) is the binary variable indicating whether DG unit g shut-down. \(S_{g}^{on}\) and \(S_{g}^{off}\) are the start-up/shut-down cost of DG unit g respectively. \(c_{t}^{grid}\) is the unit purchasing price of electricity from the grid, \(P_{t}^{grid}\) is the purchased electricity from the grid, \(P_{g,t}^{DG}\) is the power output of DG unit g, \(h_{g,2}\), \(h_{g,1}\) and \(h_{g,0}\) are the generation cost coefficient of DG unit g, \(c_{s}^{w}\), \(c_{s}^{b}\) are the cost coefficients related to anchoring and berthing of AES respectively, \(t_{s}^{a}\) is the arrival time of AES s, \(t_{s}^{b}\) is the berthing start time of AES s, \(t_{s}^{d}\) is the end of berthing time of AESs.

The first and second terms are electricity supply costs of microgrids, which includes the start-up and shut-down cost of dispatchable DGs, electricity purchase cost from the main grid, and generation cost of dispatchable DGs. The third term is the equivalent economic costs of AES berth allocation services, which includes the waiting and berthing costs of AES.

11.2.3 Constraints

  1. 1.

    Modeling of Ship-Side

  1. (1)

    Berth Allocation of AES

The berth allocation aims to determine the berthing position and berthing duration of each AES. Conventionally, berth allocation process is formulated by a binary variable φbsk that represents the berthing status of ships [27]. The binary variable φbsk is indexed by berthing position b, ship number s, and service order k, meaning that ship s is served at berth b as the kth ship if φbsk = 1. Such model formulation is applicable in terms of independent berth allocation problems. However, since the binary variable φbsk is irreverent to time slot t, the power demands of AES at each time slot cannot be expressed by the binary variable φbsk. Therefore, if adopting the traditional AES service order-based model, berth allocation and power dispatch cannot be operated in a uniform time scale.

To establish the bridge between berth allocation and power dispatch, we improve the traditional AES service order-based berth allocation model by replacing the binary variable φbsk with a new time-indexed binary variable φbst. The binary variable φbst represents ship s is served at berth b at time slot t if φbsk = 1. In this way, the power demands of AES can be expressed mathematically. Meanwhile, the time-indexed model can still formulate the process of berth allocation. Therefore, the time-index model mathematically couples berth allocation and power dispatch. The time-indexed berth allocation model is formulated as follows:

Firstly, the binary variable \(\varphi_{bst}\) is a binary variable indicating if AES s is served at berth b at timeslot t, which is associated with berthing position Bs, berthing start time \(t_{{\text{s}}}^{{\text{b}}}\), and berthing end time \(t_{{\text{s}}}^{{\text{d}}}\) by Eq. (11.2):

$$ \begin{array}{*{20}c} {\varphi_{bst} = \left\{ \begin{gathered} 1\quad {\text{if }}b = B_{s} {\text{ and }}t \in \left( {t_{s}^{b} ,t_{s}^{d} } \right) \hfill \\ 0\quad {\text{otherwise}} \hfill \\ \end{gathered} \right.,\quad \forall s} \\ \end{array} $$
(11.2)

Equation (11.2) can be linearized by big-M method as follows:

$$ \begin{array}{*{20}c} {b\varphi_{bst} \le B_{s} ,\quad \forall b,s,t} \\ \end{array} $$
(11.3)
$$ \begin{array}{*{20}c} {b\varphi_{bst} + M\left( {1 - x_{bst} } \right) \ge B_{s} ,\quad \forall b,s,t} \\ \end{array} $$
(11.4)
$$ \begin{array}{*{20}c} {t\varphi_{bst} \le t_{2,s} ,\quad \forall b,s,t} \\ \end{array} $$
(11.5)
$$ \begin{array}{*{20}c} {t\varphi_{bst} + M\left( {1 - \varphi_{bst} } \right) \ge t_{s}^{b} ,\quad \forall b,s,t} \\ \end{array} $$
(11.6)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{b \in B} \mathop \sum \limits_{t \in T} \varphi_{bst} = t_{s}^{d} - t_{s}^{b} + 1,\quad \forall s} \\ \end{array} $$
(11.7)

where B is the set of berths.

Constraints (11.3) and (11.4) ensure that the AES cannot change its berthing position once it starts berthing. Constraints (11.5) and (11.6) ensure that the binary variable φbst is equal to 1 only when the AES s is served at berth.

$$ \begin{array}{*{20}c} {t_{s}^{a} \le t_{s}^{b} ,\quad \forall s} \\ \end{array} $$
(11.8)
$$ \begin{array}{*{20}c} {t_{s}^{b} + 1 \le t_{s}^{d} \le t_{s}^{latest} ,\quad \forall s} \\ \end{array} $$
(11.9)
$$ \begin{array}{*{20}c} {1 \le B_{s} \le B_{{{\text{max}}}} ,\quad \forall s} \\ \end{array} $$
(11.10)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{b \in B} \varphi_{bst} \le 1,\quad \forall s,t} \\ \end{array} $$
(11.11)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{s \in S} \varphi_{bst} \le 1,\quad \forall b,t} \\ \end{array} $$
(11.12)

where \(t_{s}^{latest}\) is the latest departure time of AES s, \(B_{{{\text{max}}}}\) is the number of available berths.

Constraints (11.8) and (11.9) present the relationship between arrival time, berthing start time, and departure time. The berthing start time should be greater than or equal to arrival time. The berthing end time should be greater than berthing start time and less than or equal to latest departure time. Constraint (11.10) limits the berthing position of each AES within an allowable range. Constraint (11.11) ensures that each AES can only be assigned to one berth, and constraint (11.12) restricts that each berth can only serve at most one AES at a time.

  1. (2)

    QC Assignment for AES

In berth allocation process, the actual berthing duration of AES relies on the cargo handling speed, which depends on the number of assigned QCs for each AES. The QCs assignment schemes not only directly influence the berthing duration of AES, but also have an impact on the power demands of QCs. Therefore, the QC assignment should also be considered in berth allocation process, which are formulated as follows:

$$ \begin{array}{*{20}c} {\mathop \sum \limits_{s \in S} \omega_{qst} \le 1,\quad \forall q,t} \\ \end{array} $$
(11.13)
$$ \begin{array}{*{20}c} {Q_{st} = \mathop \sum \limits_{q \in Q} \omega_{qst} ,\quad \forall s,t} \\ \end{array} $$
(11.14)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{s \in S} Q_{st} \le Q^{{{\text{max}}}} ,\quad \forall t} \\ \end{array} $$
(11.15)
$$ \begin{array}{*{20}c} {Q_{s}^{{{\text{min}}}} \mathop \sum \limits_{b \in B} \varphi_{bst} \le Q_{st} \le Q_{s}^{{{\text{max}}}} \mathop \sum \limits_{b \in B} \varphi_{bst} ,\quad \forall s,t} \\ \end{array} $$
(11.16)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{t} \eta Q_{st} \ge TEU_{s} ,\quad \forall s,t} \\ \end{array} $$
(11.17)

where Q is the set of QCs, \(\omega_{qst}\) is the binary variable to indicate if QC q is serving AES, \(\omega_{qst}\) equals to 1 when the QC q serves for the AES s at time slot t. \(Q_{st}\) is the number of QCs serving for AES s at time slot t, \(Q^{{{\text{max}}}}\) is the number of available QCs, \(Q_{s}^{{{\text{min}}}}\) and \(Q_{s}^{{{\text{max}}}}\) is the minimum and maximum number of QC hat can be assigned for AES, \(\eta\) is the cargo handling efficiency of QC, \(TEU_{s}\) is the number of carges on AES s.

Constraint (11.13) ensures that each QC can serve for at most one AES at each time slot. The number of assigned QCs for AES s is calculated by Eq. (11.14). Constraint (11.15) presents that the total number of working QCs cannot be larger than the total number of available QCs. Each AES has the minimum and maximum number of QCs that can be assigned, which is presented as constraint (11.16). Constraint (11.17) ensures that enough QCs should be assigned for AES to finish cargo handling tasks before AES departs the seaport.

(3) Power demands of AES and QC.

Based on the binary variables \(\varphi_{bst}\) and \(\omega_{qst}\), the power demands of AES \(P_{i,t}^{AES}\) and QC \(P_{i,t}^{QC}\) at electrical bus i at time slot t can be formulated respectively as follows:

$$ \begin{array}{*{20}c} {P_{i,t}^{AES} = \mathop \sum \limits_{s \in S} \varphi_{bst} P_{s}^{AES} ,b \in \Gamma \left( i \right)} \\ \end{array} $$
(11.18)
$$ \begin{array}{*{20}c} {P_{i,t}^{QC} = \mathop \sum \limits_{q \in \Phi \left( i \right)} \mathop \sum \limits_{s \in S} \omega_{qst} P_{q}^{QC} } \\ \end{array} $$
(11.19)

where Γ(i) and Φ(i) are the set of berths and QCs that are linked with the electrical bus i, \(P_{{\text{s}}}^{{{\text{AES}}}}\) and \({\text{P}}_{{\text{q}}}^{{{\text{QC}}}}\) are the rated power demands of AES s and QC q.

It can be found that the power demands of AES and QC should be restricted by berth allocation and QC assignment constraints since they are formulated by the binary variables φbsk and ωqst. Meanwhile, AES and QC are the power loads of microgrids, thus they should also be limited by operational constraints of microgrids. From this perspective, Eqs. (11.18) and (11.19) establish the interface between microgrids and ship-side.

  1. 2.

    Modeling of Microgrids

  1. (1)

    Power Flow Balance

The electrical network of seaport microgrids operates a radial network. The SOC-based DistFlow model [28] is employed to represent power flows in seaport microgrids:

$$ \begin{array}{*{20}c} {\mathop \sum \limits_{i \in \Pi \left( j \right)} P_{ij,t} + P_{j,t}^{in} - r_{ij} i_{ij,t} = \mathop \sum \limits_{k \in \Theta \left( j \right)} P_{jk,t} + P_{j,t}^{L} } \\ \end{array} $$
(11.20)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{i \in \Pi \left( j \right)} Q_{ij,t} + Q_{j,t}^{in} - x_{ij} i_{ij,t} = \mathop \sum \limits_{k \in \Theta \left( j \right)} Q_{jk,t} + Q_{j,t}^{L} } \\ \end{array} $$
(11.21)
$$ \begin{array}{*{20}c} {U_{j,t} = U_{i,t} - 2\left( {r_{ij} P_{ij,t} + x_{ij} Q_{ij,t} } \right) + \left( {r_{ij}^{2} + x_{ij}^{2} } \right)i_{ij,t} } \\ \end{array} $$
(11.22)
$$ \begin{array}{*{20}c} {2P_{ij,t} 2Q_{ij,t} i_{ij,t} - U_{i,t2} \le i_{ij,t} + U_{i,t} } \\ \end{array} $$
(11.23)
$$ \begin{array}{*{20}c} {i_{ij,t} \le i_{ij,t}^{{{\text{max}}}} ,U_{j,t}^{{{\text{min}}}} \le U_{j,t} \le U_{j,t}^{{{\text{max}}}} } \\ \end{array} $$
(11.24)
$$ \begin{array}{*{20}c} {P_{j,t}^{in} = P_{j,t}^{RE} + P_{j,t}^{dis} + P_{j,t}^{DG} } \\ \end{array} $$
(11.25)
$$ \begin{array}{*{20}c} {P_{j,t}^{L} = P_{j,t}^{d} + P_{j,t}^{ch} + P_{j,t}^{AES} + P_{j,t}^{QC} \# \left( {11.26} \right)} \\ \end{array} $$
(11.26)

where \(\Pi \left( j \right)\) and \(\Theta \left( j \right)\) are the sets of upstream/downstream buses of bus j, \(P_{ij,t}\) and \(Q_{ij,t}\) are the active and reactive power flow from bus i to j at time slot t, similarly, \({ }P_{j,t}^{in}\) and \(Q_{j,t}^{in} \) are the injected active/reactive power of bus j at time slot t, \(P_{jk,t}\) and \(Q_{jk,t}\) are the active and reactive power flow from bus j to k at time slot t. \(r_{ij}\) and \(x_{ij}\) are the resistance and inductance of the line ij, \(P_{j,t}^{L}\) and \(Q_{j,t}^{L}\) are the active and reactive power of the load at bus j at time slot t, \(i_{ij,t}\) is the amplitude square of current from bus i to j, \(U_{i,t}\) is the voltage at bus i at time slot t, \(i_{ij,t}^{{{\text{max}}}}\) is the maximum current allowed for line ij at time slot t, \(U_{j,t}^{{{\text{min}}}}\) and \(U_{j,t}^{{{\text{max}}}}\) are the lower and upper bound of voltage of bus j at time slot t, \(P_{j,t}^{RE}\), \(P_{j,t}^{DG}\), \(P_{j,t}^{QC}\) are the power of renewable generation, DG and QC of bus j at time slot t, \(P_{j,t}^{dis}\) and \(P_{j,t}^{ch}\) are the discharging/charging power of BESS, \(P_{j,t}^{d}\) is the conventional load power of bus j at time slot t.

Constraints (11.20) and (11.21) present the nodal active and reactive power balance. The line power flow \(P_{ij,t} = P_{t}^{grid} { }\) and \(Q_{ij,t} = Q_{t}^{grid}\) if j is the substation bus. Constraints (11.22) presents the voltage drop at each electrical bus. Constraints (11.23) is the SOC relaxation of the limit \(P_{ij,t}^{2} + Q_{ij,t}^{2} = i_{ij,t} U_{i,t}\). Constraint (11.24) imposes bounds on line currents and nodal voltages. Constraints (11.25) and (11.26) show the nodal power injections and loads, where AES and QC are regarded as the part of nodal power loads.

  1. (2)

    Energy Technologies

Energy technologies, including dispatchable DG units, BESS and renewable generators, are implemented in seaport microgrids. The operational constraints of these devices are presented as follows:

$$ \begin{array}{*{20}c} {I_{g,t} P_{g}^{{{\text{min}}}} \le P_{g,t}^{DG} \le I_{g,t} P_{g}^{{{\text{max}}}} } \\ \end{array} $$
(11.27)
$$ \begin{array}{*{20}c} { - D_{g}^{{{\text{max}}}} \le P_{g,t}^{DG} - P_{g,t - 1}^{DG} \le U_{g}^{{{\text{max}}}} } \\ \end{array} $$
(11.28)
$$ \begin{array}{*{20}c} {T_{g}^{on} \left( {I_{g,t}^{DG} - I_{g,t - 1}^{DG} } \right) + \mathop \sum \limits_{{\tau = t - T_{g}^{on} }}^{t - 1} I_{g,\tau } \ge 0} \\ \end{array} $$
(11.29)
$$ \begin{array}{*{20}c} {T_{g}^{off} \left( {I_{g,t - 1}^{DG} - I_{g,t}^{DG} } \right) + \mathop \sum \limits_{{\tau = t - T_{g}^{off} }}^{t - 1} I_{g,\tau } \ge 0} \\ \end{array} $$
(11.30)
$$ \begin{array}{*{20}c} {u_{g,t} + v_{g,t} = I_{g,t} - I_{g,t - 1} } \\ \end{array} $$
(11.31)
$$ \begin{array}{*{20}c} {u_{g,t} + v_{g,t} \le 1} \\ \end{array} $$
(11.32)
$$ \begin{array}{*{20}c} {SOC_{e,t}^{BESS} = SOC_{e,t - 1}^{BESS} + \eta_{e}^{ch} P_{e,t}^{ch} - \frac{{P_{e,t}^{dis} }}{{\eta_{e}^{dis} }}} \\ \end{array} $$
(11.33)
$$ \begin{array}{*{20}c} {SOC_{{e,{\text{min}}}}^{BESS} \le SOC_{e,t}^{BESS} \le SOC_{{e,{\text{max}}}}^{BESS} } \\ \end{array} $$
(11.34)
$$ \begin{array}{*{20}c} {P_{{e,{\text{min}}}}^{{\frac{ch}{{dis}}}} \le P_{e,t}^{{\frac{ch}{{dis}}}} \le P_{{e,{\text{max}}}}^{{\frac{ch}{{dis}}}} } \\ \end{array} $$
(11.35)
$$ \begin{array}{*{20}c} {P_{r,t}^{RE} \le P_{r,t}^{{RE,{\text{max}}}} } \\ \end{array} $$
(11.36)

where \(I_{g,t}\) is the binary variable indicating whether DG unit g is on, \(P_{g}^{{{\text{min}}}}\) and \(P_{g}^{{{\text{max}}}}\) are the lower and upper bound of power of DG unit g, \(D_{g}^{{{\text{max}}}}\) and \(U_{g}^{{{\text{max}}}}\) are the ramp-up/ramp down limit of DG unit g, \(T_{g}^{on}\) and \(T_{g}^{off}\) are the minimum up/down time of DG unit g, \(SOC_{e,t}^{BESS}\) is the SOC of the BESS at time slot t, \(SOC_{{e,{\text{min}}}}^{BESS}\) and \(SOC_{{e,{\text{max}}}}^{BESS}\) are the lower and upper bound of the SOC of the BESS, \(\eta_{e}^{ch}\) and \(\eta_{e}^{dis}\) are the charging/discharging efficiency of the BESS, \(P_{e,t}^{ch}\), \(P_{e,t}^{dis}\) are the charging/discharging power of the BESS e at time slot t, \(P_{{e,{\text{min}}}}^{ch}\), \(P_{{e,{\text{max}}}}^{ch}\) are the lower and upper bound of the charging power of the BESS, \(P_{{e,{\text{min}}}}^{dis}\) and \(P_{{e,{\text{max}}}}^{dis}\) are the lower and upper bound of the discharging power of the BESS, \({ }P_{r,t}^{RE}\) is the power output of the renewable generator r at time slot t, \(P_{r,t}^{{RE,{\text{max}}}}\) is the upper limit of the power output of the renewable generator r at time slot t.

Constraint (11.27) imposes the lower and upper bound on the power output of DG unit. Constraint (11.28) presents the up and down ramp limit. Constraints (11.29) and (11.30) limit the minimum up- and down-time of DG unit. Constraints (11.31) and (11.32) present the logical relation between the binary variables that indicate whether DG unit is on, start-up and shut-down. Constraints (11.33–11.35) present the operational restrictions of BESS, which include the limits of charging status (11.33 and 11.34) and charging/discharging power (11.35). Constraint (11.36) limits the available renewable generation.

11.3 DRO-Based Joint Scheduling Model Under Multiple Uncertainties

11.3.1 Joint Scheduling Framework

In Sect. 11.2, the deterministic joint optimization model is formulated with objective function and operational constraints. To hedge with the multiple uncertainties from both AES arrival and renewable energy output, this section proposes a two-stage joint scheduling model based on DRO approach for seaport microgrids.

Different from traditional power load uncertainty that is revealed in the second stage and influences the decisions of the second stage, the uncertainty of AES arrival time is revealed in the second stage but influences the berthing allocation decision in the first stage. Specifically, in literature [25, 26], the berth allocation decision is determined in the first stage, ignoring the uncertainty of AES arrival time. However, the day-ahead berth allocation schemes may become infeasible if actual arrival time is later than planned berthing start time.

To this end, a novel two-stage joint scheduling framework is proposed as Fig. 11.2 shows. The berthing position of AES and the unit commitment of dispatchable DGs are determined in the first stage. The berthing start and departure time of AES, the power dispatch of microgrids and the QC assignment schemes are adjusted according to the actual AES arrival and renewable generations observed in the second stage. In this way, the feasibility of berth allocation scheme can be guaranteed regardless of future uncertainty realizations.

Fig. 11.2
figure 2

The proposed two-stage joint scheduling framework

11.3.2 Two-Stage Joint Scheduling Model Based on DRO Method

  1. (1)

    Ambiguity Set Construction

In this section, data-driven distributionally robust approaches are adopted to describe the uncertainties. In literatures, the probability distribution is generally established based on moment [29], Wasserstein metric [30] and so on. The moment and Wasserstein metric-based method will lead to a semi-infinite subproblem in the second stage, thus strong dual theory is required for model solution. However, in this study, various binary and integer variables are included in berth allocation and QC assignment model, which does not meet strong dual theory and cannot directly adopt the moment and Wasserstein metric-based method. To this end, a discrete scenarios-based DRO method [31] is adopted to modeling the multiple uncertainties. The subproblem in each scenario is independent to the scene probability distribution and thus can be solved independently without complex transformation.

Based on the historical data samples K, typical scenarios set N are obtained. The historical data includes renewable energy output and the difference between actual and estimated arrival time at each historical AES visiting. Then, the arrival time of AES in each typical scenario is calculated as the sum of estimated arrival time \(t_{s}^{a,e}\) in the next operational day and the historical data of arrival time deviation \(\Delta t_{s}^{a}\), i.e., \(t_{s}^{a} = t_{s}^{a,e} + \Delta t_{s}^{a}\).

Theoretically, the probability distribution of independent scenarios can be any value. However, to make the scene probability distribution more appropriate to the actual data, a probability distribution set is constructed based on the initial probability value of each scenario. It includes the 1-norm and ∞-norm constraints:

$$ \begin{array}{*{20}c} {\Omega = \left\{ {\left\{ {p_{n} } \right\}\left| {\begin{array}{*{20}c} {p_{n} > 0,n = 1,2, \ldots ,N} \\ {\mathop \sum \limits_{n = 1}^{N} p_{n} = 1} \\ {p_{n} - p_{n1}^{0} \le \theta_{1} } \\ {p_{n} - p_{n\infty }^{0} \le \theta_{\infty } } \\ \end{array} } \right.} \right.} \\ \end{array} $$
(11.37)

where \(p_{n}^{0}\) is the nominal probability distribution obtained from the historical data, \(p_{n}\) is the probability distribution, θ1 and θ∞ are the allowable deviation limit of possibility. They are relevant with the confidence of scenario probability α1 and α∞:

$$ \begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {\theta_{1} = \frac{N}{2K}ln\frac{2N}{{1 - \alpha_{1} }}} \\ {\theta_{\infty } = \frac{1}{2K}ln\frac{2N}{{1 - \alpha_{\infty } }}} \\ \end{array} } \right.} \\ \end{array} $$
(11.38)
  1. (2)

    DRO Model Construction

The proposed two-stage joint scheduling model intends to minimize the total costs of both microgrid operations and AES services under the worst-case probability distribution. The objective function (11.1) is rewritten as follows:

$$ \begin{array}{*{20}c} {\mathop {{\text{min}}}\limits_{x \in X} F_{1} + \mathop {{\text{max}}}\limits_{p \in \Omega } \mathop \sum \limits_{n = 1}^{N} \left( {p_{n} \mathop {{\text{min}}}\limits_{{y_{n} \in Y}} F_{2}^{n} } \right)} \\ \end{array} $$
(11.39)

where x = {Bs, Ig,t, ug,t, vg,t} are the decision variables of the first stage, and F1 is the first stage costs shown as follows:

$$ \begin{array}{*{20}c} {F_{1} = \mathop \sum \limits_{t \in T} \mathop \sum \limits_{{g \in N_{DG} }} \left( {u_{g,t} S_{g}^{on} + v_{g,t} S_{g}^{off} } \right)} \\ \end{array} $$
(11.40)

The second stage determines the berthing duration of each AES, the QC assignment schemes and the power dispatch of microgrids. The decision variables of the second stage are represented by variable y. The operational costs of the second stage in each scenario is stated as follows:

$$ \begin{aligned} F_{2} & = \mathop \sum \limits_{t \in T} \left[ {c_{t}^{grid} P_{t}^{grid} + \mathop \sum \limits_{g = 1}^{{N_{DG} }} \left[ {h_{g,2} \left( {P_{g,t}^{DG} } \right)^{2} + h_{g,1} P_{g,t}^{DG} + h_{g,0} } \right]} \right] \\ & \quad + \mathop \sum \limits_{s \in S} \left[ {c_{s}^{w} \left( {t_{s}^{a} - t_{s}^{b} } \right) + c_{s}^{b} \left( {t_{s}^{d} - t_{s}^{b} } \right)} \right] \\ \end{aligned} $$
(11.41)

The above model is written in compact form as follows:

$$ \begin{array}{*{20}c} {\mathop {{\text{min}}}\limits_{x \in X} a^{T} x + \mathop {{\text{max}}}\limits_{p \in \Omega } \mathop \sum \limits_{n = 1}^{N} \left( {p_{n} \mathop {{\text{min}}}\limits_{{y_{n} \in Y}} \left( {b^{T} y_{n} + c^{T} \xi_{n} } \right)} \right)} \\ \end{array} $$
(11.42)

s.t.

$$ \begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {{\varvec{A}}_{1} x \le {\varvec{d}}_{1} } \\ {{\varvec{A}}_{2} x = {\varvec{d}}_{2} } \\ \end{array} } \right.} \\ \end{array} $$
(11.43)
$$ \begin{array}{*{20}c} {{\varvec{Bx}} + {\varvec{Cy}}_{{\varvec{n}}} \le e} \\ \end{array} $$
(11.44)
$$ \begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {{\varvec{D}}_{1} {\varvec{y}}_{{\varvec{n}}} \le {\varvec{f}}_{1} } \\ {{\varvec{D}}_{2} {\varvec{y}}_{{\varvec{n}}} = {\varvec{f}}_{2} } \\ {\left\| {{\varvec{D}}_{3} {\varvec{y}}_{{\varvec{n}}} + {\varvec{f}}_{3} } \right\|_{2} \le {\varvec{D}}_{4} {\varvec{y}}_{{\varvec{n}}} + {\varvec{f}}_{4} } \\ \end{array} } \right.} \\ \end{array} $$
(11.45)
$$ \begin{array}{*{20}c} {{\varvec{Ey}}_{{\varvec{n}}} + \user2{F\xi }_{{\varvec{n}}} \le {\varvec{g}}} \\ \end{array} $$
(11.46)

where A1, A2, B, C, D1−D4 are the constant matrixes, \(\xi_{n} = \left\{ {\Delta t_{s,n}^{a} ,\,{ }P_{r,t,n}^{{RE,{\text{max}}}} } \right\}\) is arrival time deviation of AES and available renewable generation in scenario n.

11.3.3 Solution Methodology

The proposed two-stage joint scheduling model can be solved by Column and Constraint Generation (C&CG) algorithm, and decomposed into main problem (MP) and subproblem (SP) as follows.

MP finds the decisions of the first stage under a given worst-case probability distribution:

$$ \begin{array}{*{20}c} {\mathop {{\text{min}}}\limits_{{\begin{array}{*{20}c} {{\varvec{x}} \in {\varvec{X}},W} \\ {{\varvec{y}}_{n}^{\left( l \right)} \in Y\left( {{\varvec{x}},{\varvec{\xi}}_{n} } \right)} \\ \end{array} }} {\varvec{a}}^{T} {\varvec{x}} + W} \\ \end{array} $$
(11.47)

s.t.

$$ \begin{array}{*{20}c} {W \ge \mathop \sum \limits_{n = 1}^{N} \left( {p_{n}^{\left( l \right)} \left( {{\varvec{b}}^{T} {\varvec{y}}_{n}^{\left( l \right)} + {\varvec{c}}^{T} {\varvec{\xi}}_{n} } \right)} \right)} \\ \end{array} $$
(11.48)
$$ \begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {{\varvec{A}}_{1} x \le {\varvec{d}}_{1} } \\ {{\varvec{A}}_{2} x = {\varvec{d}}_{2} } \\ \end{array} } \right.} \\ \end{array} $$
(11.49)
$$ \begin{array}{*{20}c} {{\varvec{Bx}} + C{\varvec{y}}_{n}^{\left( l \right)} \le e} \\ \end{array} $$
(11.50)
$$ \begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {{\varvec{D}}_{1} {\varvec{y}}_{n}^{\left( l \right)} \le {\varvec{f}}_{1} } \\ {{\varvec{D}}_{2} {\varvec{y}}_{n}^{\left( l \right)} = {\varvec{f}}_{2} } \\ {\left\| {{\varvec{D}}_{3} {\varvec{y}}_{n}^{\left( l \right)} + {\varvec{f}}_{3} } \right\|_{2} \le {\varvec{D}}_{4} {\varvec{y}}_{n}^{\left( l \right)} + {\varvec{f}}_{4} } \\ \end{array} } \right.} \\ \end{array} $$
(11.51)
$$ \begin{array}{*{20}c} {{\varvec{Ey}}_{n}^{\left( l \right)} + \user2{F\xi }_{n} \le {\varvec{g}}} \\ \end{array} $$
(11.52)

where l represents the current iteration number, \(y_{n}^{\left( l \right)}\) and \(p_{n}^{\left( l \right)}\) are second stage variables and worst-case distribution at lth iteration.

SP finds the worst-case-scenario distribution according to the first stage decision variables x* obtained in the MP:

$$ \begin{array}{*{20}c} {W\left( {{\varvec{x}}^{*} } \right) = \mathop {{\text{max}}}\limits_{{p_{n} \in \Omega }} \mathop \sum \limits_{n = 1}^{N} \left( {p_{n} \mathop {{\text{min}}}\limits_{{{\varvec{y}}_{n} \in {\varvec{Y}}\left( {{\varvec{x}}^{*} ,{\varvec{\xi}}_{n} } \right)}} \left( {{\varvec{b}}^{T} {\varvec{y}}_{n} + {\varvec{c}}^{T} {\varvec{\xi}}_{n} } \right)} \right)\# 11.53} \\ \end{array} $$
(11.53)

s.t.

$$ \begin{array}{*{20}c} {{\varvec{Bx}}^{*} + {\varvec{Cy}}_{n} \le {\varvec{e}}} \\ \end{array} $$
(11.54)
$$ \begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {{\varvec{D}}_{1} {\varvec{y}}_{n} \le {\varvec{f}}_{1} } \\ {{\varvec{D}}_{2} {\varvec{y}}_{n} = {\varvec{f}}_{2} } \\ {\left\| {{\varvec{D}}_{3} {\varvec{y}}_{n} + {\varvec{f}}_{3} } \right\|_{2} \le {\varvec{D}}_{4} {\varvec{y}}_{n} + {\varvec{f}}_{4} } \\ \end{array} } \right.} \\ \end{array} $$
(11.55)
$$ \begin{array}{*{20}c} {{\varvec{Ey}}_{n} + \user2{F\xi }_{n} \le {\varvec{g}}} \\ \end{array} $$
(11.56)

Then, the worst-case distribution can be easily obtained by solving the following optimization model.

$$ \begin{array}{*{20}c} {W\left( {{\varvec{x}}^{*} } \right) = \mathop {{\text{max}}}\limits_{{p_{n} \in \Omega }} \mathop \sum \limits_{n = 1}^{N} p_{n} \left( {{\varvec{b}}^{T} {\varvec{y}}_{n}^{*} + {\varvec{c}}^{T} {\varvec{\xi}}_{n} } \right)} \\ \end{array} $$
(11.57)

Based on the above MP and SP, the C&CG algorithm can be implemented by the following steps:

Step 1: Set initial value of the worst-case distribution pn, lower bound \(LB = - \infty\), upper bound \({ }UB = + \infty\), iteration number \(l = 0\), convergence criterion ε.

Step 2: Solve the MP and obtain the optimal decisions of the first stage x* under the given worst-case distribution \(p_{n}^{\left( l \right)}\). Update \(LB^{{\left( {l + 1} \right)}} = {\text{max}}\left( {LB^{\left( l \right)} ,W^{*} } \right)\).

Step 3: Solve the inner minimization problem in SP based on the obtained x* and obtain the optimal value \({\varvec{b}}^{T} {\varvec{y}}_{n}^{*} + {\varvec{c}}^{T} {\varvec{\xi}}_{n}\) of each scenario. Based on that, the worst-case distribution \(p_{n}^{{\left( {l{ + }1} \right)}} \) can be obtained by solving the optimization problem. Update \(UB^{{\left( {l + 1} \right)}} = {\text{max}}\left( {UB^{\left( l \right)} ,W^{*} \left( {x^{*} } \right)} \right)\).

Step 4: Terminate the solution if the convergence criterion \(UB^{{\left( {l + 1} \right)}} - LB^{{\left( {l + 1} \right)}} \le \varepsilon\) is satisfied. Otherwise, generate variable \({\varvec{y}}_{n}^{{\left( {l + 1} \right)}}\) and constraints to the MP. Set l = l + 1 and repeat the above steps until the convergence criterion is satisfied

$$ \begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {W \ge \mathop \sum \limits_{n = 1}^{N} \left( {p_{n}^{{\left( {l + 1} \right)}} \left( {{\varvec{b}}^{T} {\varvec{y}}_{n}^{{\left( {l + 1} \right)}} + {\varvec{c}}^{T} {\varvec{\xi}}_{n} } \right)} \right)} \\ {{\varvec{Bx}} + {\varvec{Cy}}_{n}^{{\left( {l + 1} \right)}} \le {\varvec{e}}} \\ {{\varvec{D}}_{1} {\varvec{y}}_{n}^{{\left( {l + 1} \right)}} \le {\varvec{f}}_{1} } \\ {{\varvec{D}}_{2} {\varvec{y}}_{n}^{{\left( {l{ + }1} \right)}} = {\varvec{f}}_{2} } \\ {\left\| {{\varvec{D}}_{3} {\varvec{y}}_{n}^{{\left( {l{ + }1} \right)}} + {\varvec{f}}_{3} } \right\|_{2} \le {\varvec{D}}_{4} {\varvec{y}}_{n}^{{\left( {l{ + }1} \right)}} + {\varvec{f}}_{4} } \\ {{\varvec{Ey}}_{n}^{{\left( {l{ + }1} \right)}} + \user2{F\xi }_{n} \le {\varvec{g}}} \\ \end{array} } \right.} \\ \end{array} $$
(11.58)

11.4 Case Studies

11.4.1 Case Description

The effectiveness of the proposed model is verified through numerical experiments on a modified IEEE-33 bus seaport microgrids shown in Fig. 11.3. The operation horizon is 48 h. There are 6 berths, 12 deployable QCs, 2 dispatchable DG units, 2 PV units and 1 BESS. The parameters of these devices are shown in Table 11.1. Ten ships are considered in the operational days. The parameters of the ten ships are shown in Table 11.2. Each QC can handle 35 TEU cargo per hour and its rated power demand is 0.3 MW. The electricity purchase price of main grid during valley (1:00–7:00, 24:00), normal (8:00–10:00, 16:00–18:00, 22:00–23:00) and peak (11:00–15:00, 19:00–21:00) hours are 0.067, 0.139, and 0.216$/kWh respectively. The berthing related cost coefficient \({\text{c}}_{{\text{s}}}^{{\text{w}}}\) and \({\text{c}}_{{\text{s}}}^{{\text{b}}}\) in Eq. (11.1) are set as 15.6$/h. The number of the number of historical data samples K is 100, the number of independent scenarios N is 10, and the confidence levels α1 and α∞ are 0.2 and 0.5. The uncertainty realizations of AES arrival and PV generation in the second stage are shown in Table 11.2 and Fig. 11.4 respectively.

Fig. 11.3
figure 3

The topology of 33 bus-based seaport microgrid

Table 11.1 Parameters of devices
Table 11.2 Parameters of the ten ships
Fig. 11.4
figure 4

The uncertainty realization of PV output

Three cases are set to demonstrate the advantages of proposed model:

Case I: Two-stage non-joint scheduling model considering multiple uncertainties, where the berth allocation of AES and the QC assignment are determined independently under AES arrival uncertainty according to berth allocation and QC assignment constraints. Then power dispatch of microgrid is determined under renewable energy uncertainty based on the obtained berth allocation and QC assignment schemes.

Case II: Two-stage joint scheduling model without considering AES arrival uncertainty. The berthing position and berthing duration of AES, and the unit commitment of DG units are determined in the first stage. The QC assignment and the power dispatch of microgrids are decided in the second stage based on uncertainty realizations.

Case III: The proposed two-stage joint scheduling model, considering multiple uncertainties. The berthing position of AES and the unit commitment of DG units are determined in the first stage. The berthing duration of AES, QC assignment and the power dispatch of microgrids are decided in the second stage based on uncertainty realizations.

All simulations are implemented by Gurobi 9.5 and Python 3.8 on a laptop with an 8-core Intel Core i7 processor and 16 GB memory.

11.4.2 Comparison of Different Scheduling Model

Based on the day-ahead decisions obtained in the first stage and the uncertainty realizations of AES arrival and PV generation observed in the second stage, the optimization results are shown in Table 11.3. The power balance in microgrid and the berth allocation of AES are illustrated in Figs. 11.5 and 11.6 respectively.

Table 11.3 Optimization results in different cases
Fig. 11.5
figure 5

The power balance in microgrids: a Case I; b Case II; c Case III

Fig. 11.6
figure 6

The intra-day berth allocation scheme of AES based on uncertainty realizations: a Case I; b Case II; c Case III

In Case I, the berth allocation of AES and the power dispatch of microgrids are determined independently. Berths and QCs are pre-allocated before power dispatch with the highest AES service efficiency. All AESs immediately dock at allocated berths after arriving the seaport, and then departing as soon as possible. Despite the waiting and berthing cost of AES in Case I is lowest in the three cases, because the berth allocation of AES is determined without considering power dispatch constraints, the electricity supply costs are much higher than Case III. Therefore, joint operation of berth allocation and power dispatch is necessary for energy efficiency and economic benefits of seaport microgrids.

In Case II, the berth allocation of AES and the unit commitment are determined without considering uncertain arrival. However, in the second stage, the actual arrival time of AES deviates from the planned arrival time, causing the infeasibility of the first stage decisions. That means for some AESs, the decision of berthing duration in the first stage cannot be implemented because the actual arrival time in the second stage is later than planned berthing start time (i.e., constraint (4.1) is violated). From this perspective, making day-ahead berth allocation schemes without considering AES arrival uncertainty may provide an infeasible solution when the actual arrival time of AES deviating from expectations. To obtain the scheduling results of operational day, we deliberately re-schedule the AESs whose the first stage decisions are infeasible, as Fig. 11.6b shows. Additionally, because uncertain AES arrival is ignored, the decisions in the first stage are not optimal for the actual arrival situation in the second stage. Correspondingly, the total costs of Case II are higher than Case III.

In Case III, the berth allocation of AES and the power dispatch of microgrids are jointly optimized considering multiple uncertainties. Compare with Case I, the berth allocation and QC assignment schemes can be adjusted according to electricity price of main grid and available PV generation. Correspondingly, the power loads of AES and QC shifts to the time-period with lower unit supply cost, thus the total costs reduce by 4937.6$. Compare with Case II, the feasibility of first stage decisions in Case III can be guaranteed. Besides, more AES and QC loads shift to time-period with lower supply cost since the AES arrival uncertainty is considered. As a result, the total cost reduces by 664.6$. Therefore, the proposed two-stage joint scheduling model not only can guarantee the feasibility of the first stage decisions, but also can hedge with the multiple uncertainties well.

Figure 11.5 illustrates the power balance in the second stage under uncertainty realizations. In Case I, AES and QC are non-dispatchable. The power loads of AES and QC distribute at the time-period with high unit supply cost, such as 15:00–20:00, leading to higher electricity purchase and DG generation costs. In Case II, AES and QC are scheduled jointly with power dispatch. The total costs reduce compared with Case I. However, the uncertainty of AES arrival is not considered. After re-scheduling of infeasible AES berthing duration, the electricity supply costs are still higher than Case III. Because the first stage decisions are made without considering uncertain AES arrival, which is not optimal under AES arrival uncertainty realization. In Case III, it can be found that some demands of AES and QC further shift to the time-period with lower unit supply costs. For example, the electricity purchase increases compared with Case II during 1:00–9:00 and 24:00–30:00. Correspondingly, the DG generation decreases during 10:00–24:00. Because the unit DG generation cost is higher than electricity price during valley, the increase of electricity purchase costs is lower than the decrease of DG generation costs. Therefore, the total costs of Case III are lower than Case II.

The berth allocation of AES in the second stage under uncertainty realizations is shown in Fig. 11.6. In Case I, the berths and QCs are allocated with highest AES service efficiency. All AES start berthing immediately after arriving the seaport. In Case II, the red dotted line represents the day-ahead berth allocation scheme of AES. Because the berthing duration of AES is determined in the first stage without considering uncertain arrival time, the decisions become infeasible. For example, the AES#1 is arranged to start berthing at 1:00 in the first stage. However, the AES#1 arrives the seaport at 3:00 in the second stage. The actual arrival time is later than planned berthing start time, causing that the first stage decision cannot be implemented. Thus, the AES#1 should be re-scheduled, and the actual berthing start time of AES#1 delays to 3:00. From this perspective, it can be found that the uncertain AES arrival influences not only the economic benefits, but also the feasibility of scheduling schemes. In Case III, the berthing duration of AES are determined in the second stage based on the uncertainty realizations. The total costs further reduce due to flexible adjustment of AES and QC. Moreover, the scheduling schemes in the first stage can be implemented in the second stage without infeasibility. Therefore, compared with Case I and Case II, the proposed method can guarantee both economic benefits and the feasibility of scheduling schemes.

11.4.3 Sensitivity Analysis of System Parameters

The advantages of the proposed joint scheduling model may be affected by various parameters. This section investigates the impact of system parameters on the optimization results.

The berthing related cost coefficients in Eq. (11.1) affects the proportion of berth allocation costs in total costs, thus further influencing the economic benefits of the proposed method. We set the cost coefficients as 10, 50, 100, 150 and 200% of basic value. Figure 11.7 shows the total cost and cost reduction ratio in different cost coefficients.

Fig. 11.7
figure 7

Sensitivity analysis of berthing-related cost coefficient

For Case I and Case III, when the cost coefficients are low (e.g., 10% and 50), the waiting and berthing costs are negligible compared to electricity supply costs. The results are dominated by the power dispatch of microgrids. AESs are willing to adjust berthing position and berthing duration to reduce electricity costs. However, with the increasing of cost coefficients, the priority of berth allocation is growing. AESs are more sensitive to service efficiency and try to reduce the total waiting and berthing duration, which may lead to higher electricity supply costs. Therefore, a trade-off between the service efficiency of AES and the economic benefits of microgrids can be found by adjusting the cost coefficients.

For Case II and Case III, considering that Case II and Case III both jointly optimize berth allocation and power dispatch, there is no an obvious unidirectional trend of cost reduction. Therefore, we can see that the berthing-related cost coefficients mainly influence the trade-off between berth allocation service efficiency and electricity supply costs.

Moreover, we further investigate the impact of the number of historical data samples and the confidence level on the optimization results, which are shown in Table 11.4 and Fig. 11.8 respectively.

Table 11.4 Optimization results under different historical data samples
Fig. 11.8
figure 8

Optimization results under different confidence level

With the increase of confidence level, the expected value of total operational costs increases. This is because the higher confidence level will lead to a wider volatility of probability distribution, causing stronger uncertainties. As a result, more resources need to be scheduled to hedge with the stronger uncertainties.

Similarly, the increase of historical data samples will decrease the value of θ1 and θ∞ in Eq. (11.38). Less volatility of probability distribution is allowed. Therefore, the expected value of total operational costs can reduce due to more realistic probability distribution.