10.1 Introduction

Seaport is the significant hub of maritime industry, which undertakes nearly 90% global trades [1]. The increasing trade has led to high energy consumption and carbon emissions in the past few decades [2, 3]. It is estimated that 3–5% total global greenhouse gas (GHG) emission comes from maritime transportation [4]. This data will rise to 18% by 2025 if no measure being adopted. To solve the urgent environmental problem, seaports begin to introduce energy technologies at the aims of energy structure transition and restricting fuel use. These technical measures generally include shore-side power supply (cold-ironing) for docking ships, electrification of loading/unloading equipment and the integration of multiple energy sources (e.g., renewable energy, natural gas, heating and cooling) [5,6,7,8], which undoubtedly will contribute to the coupling between logistic system (LS) and energy system (ES). On one hand, the LS (ships and QCs) can be regarded as the load of ES, so it is constrained by both logistic operation and energy supply capacities. On the other hand, the behavior of LS impacts not only the transportation efficiency, but also the distribution of energy flows, then further influences the economic benefits.

Conventionally, LS and ES operate independently. The LS only focuses on transportation efficiency, while the ES is completely dominated by LS. However, the uncooperative operating mode may lead to mismatch between energy demand and supply in the case of coupling. In the spatial dimension, the berthing position of ships determines the electrical distance from nodes that connected with multiple energy sources in the electricity networks. Inappropriate docking position will cause more energy loss on the transmission line, or the energy cannot even be delivered to the ship. In the perspective of time dimension, due to the intermittent nature of renewable energy, its generation may not match the temporal distribution of ships/QCs loads. Then, the energy efficiency and economic benefits decline. Therefore, an effective coordination method is needed for the two systems, which minimizes the total cost without operating constraint violations.

Since the coordination between LS and ES is an interdisciplinary issue, the energy community and the seaport logistic community have conducted separate studies on the two systems for decades. In the area of seaport logistic engineering, two fundamental problems are berth allocation and QC assignment. These research, e.g., [9,10,11,12,13], emphasized only on the berth allocation problems, while others integrated berth allocation and QC assignment together [14,15,16,17,18,19]. These works only concerned about logistic operation and usually ignored the energy consumption. Therefore, their schemes may not be optimal (may be even unacceptable) from the viewpoints of energy dispatching.

In the terms of port energy management, literature [20] analyzed the significance of good energy management principles and electrical distribution architecture for seaport business from a conceptual level. Literature [21] discussed ways to reduce GHG emissions by integrating renewable energy into port microgrids. Demand response (DR), as an effective tool for peak-shaving and filling load valleys, has been applied in green ports to enhance the flexibility of power grid operation. Literature [22] proposed to reduce reefers’ peak power demand through adjusting charging time. The authors in [23] suggested an evaluated drive system for port cranes to optimize energy absorptions. They also discussed the installation of ultracapacitors and flywheels into port cranes to reduce the maximum power demands [24]. For large seaports, thousands of electricity loads cause heavy computational burden and curse of dimensionality. An multiagent framework was proposed in [25,26,27,28] to meet this challenge. Many power loads are aggregated into various agents to obtain less data scale and higher computing efficiency. In addition, some research such as [29] and [30] discussed the application of integrated energy systems (IES) into seaports. The above research solely analyze the energy management under given power demands and do not consider the operational characteristics of energy loads (e.g., logistic systems).

In recent years, researchers are beginning to recognize the interdependency between the LS and ES brought by the deeper electrification of seaports. Fang et al. [31] discussed the structure of future seaport microgrid with the indication of the connections between seaports and ships expanding from logistic-side to the electric-side. Their works are mostly reviews and did not give the specific coordination strategy. Peng et al. [32] proposed a cooperated optimization of berth and shore-side power allocation. Their method can obtain a balance between economic costs and environmental benefits but is only about shore-side power without modeling power grids. Although these research have made remarkable progresses in the interdisciplinary area, there are still some gaps to fill.

In this chapter, an optimal operation of port logistic-energy systems is proposed to minimize total costs including logistic operating and energy service costs. The discrete logistics operating model is adopted, which integrates the concepts of space and time to describe the time-space behaviors of ships and QCs. The ES is established by using Dist-Flow model and Weymouth flow equation, which can also describe the temporal and spatial characteristics of power and natural gas flows. Then the decisions of berth allocation, QC assignment, unit commitment and energy flows are determined simultaneously under energy-logistic dual-constraints. This not only maximizes the utility of dock sources to ensure transportation efficiency, but also matches energy demand and supply through temporal and spatial shifting of ship/QC loads, thereby improving energy efficiency and reducing carbon emission.

10.2 Structure of Port Integrated Energy Systems (PIES)

Figure 10.1 illustrates a general structure of PIES coupling LS and ES. The ES consists of energy equipment, electricity and natural gas network. Electricity and natural are purchased from main grid and natural gas wells, and then are transmitted via electric lines and gas pipelines. Various energy technologies including gas turbine (GT), power to gas (P2G), energy storage system (ESS) and photovoltaic (PV) are integrated in the two energy supply networks. The ES feed all the energy demands from docked ship and QCs, fixed electricity and natural gas loads.

Fig. 10.1
figure 1

The structure of port integrated energy systems

The LS comprises ships and QCs, as Fig. 10.2 shows. In the respect of logistic transportation, QCs are assigned for docked ships to load and unload containers on ships. The arrival ships anchor to wait or dock at free berth according to berth allocation plan. After loading/unloading tasks are completed, the ships leave the seaport. In the terms of energy consumption, electrified QCs and docked ships are support by electrical networks. The QCs are directly connected with certain electrical nodes while the docked ships are linked via shore-side power interfaces (cold-ironing).

Fig. 10.2
figure 2

The connection between electricity networks and logistic systems

Note that the berthing time of ships determines the start and end time of ships power demand. The QCs are allocated when ships dock at berth, so QCs also generate power demands during ship berthing period. Different berthing time leads to the energy demands of ships and QCs at different time intervals. On the other hand, because of the node-to-node connection between ships/QCs and electricity network, the different berthing position of ships and the QCs running state can cause different spatial distribution of energy flows. Therefore, a proper dispatching scheme of ships and QCs can realize the temporal and spatial shifting of power loads, at the same time to ensure logistic transportation efficiency, so as to minimize the total costs.

10.3 PIES Formulation

10.3.1 Logistics System

  1. (1)

    Berth Allocation of Ships

For the berth allocation problem, there are generally two decisions: berthing position and berthing time. In this work, discrete berth is adopted to correspond one berth to one shore-side power interface. The effects of the berthing positions on the QCs handling efficiency are ignored so that the berthing time are basically determined if the handling containers and the number of assigned QCs are known.

Note that ships are the cause of QCs assignment and power demands so that the docking status of ships needs to be defined firstly in Eq. (10.1):

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

The docking status Xbst is a three-dimensional binary variable that combines berthing position Bs, ship number s and berthing duration together. The value of Xbst is 1 if the ship docks at berth b at time interval t, otherwise, it equals to 0. Equation (10.1) has two implications, (1) ensure that the berthing position do not change in the whole scheduling period once it is allocated; (2) the value of Xbst remains 1 only during docking period.

The relationship between arrival time, docking start time and departure time are constrained by Eqs. (10.210.3). The docking start time should be greater than or equal to ship arrival time. The departure time should be greater than docking start time and less than or equal to latest departure time.

$$ \begin{array}{*{20}c} {t_{0,s} \le t_{1,s} , \forall s} \\ \end{array} $$
(10.2)
$$ \begin{array}{*{20}c} {t_{1,s} + 1 \le t_{2,s} \le t_{s}^{latest} , } \\ \end{array} $$
(10.3)

The above two equations restrict berthing time of ships. Based on the docking status Xbst, berthing position constraints can be formulated as follows:

$$ \begin{array}{*{20}c} {\mathop \sum \limits_{b \in B} X_{bst} \le 1,\quad \forall s,t} \\ \end{array} $$
(10.4)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{s \in S} X_{bst} \le 1, \quad \forall b,t} \\ \end{array} $$
(10.5)
$$ \begin{array}{*{20}c} {B_{s} = \mathop \sum \limits_{b \in B} b\sigma_{bs} ,\quad \forall s,t} \\ \end{array} $$
(10.6)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{b \in B} \sigma_{bs} = 1, \quad \forall s,t} \\ \end{array} $$
(10.7)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{{b \in Berth_{s} }} \sigma_{bs} = 1,\quad \forall s,t} \\ \end{array} $$
(10.8)
$$ \begin{array}{*{20}c} {1 \le B_{s} \le B_{max} } \\ \end{array} $$
(10.9)

Constraints (10.4) and (10.5) ensure that one ship is assigned to one berth. Constraint (10.6) establishes the relationship between integer variable and binary variable of berthing position. The binary variable σbs means that the ship s docks at berth b when its value is equal to 1. Constrain (10.7) is similar to (10.4) and (10.5) to ensure that each ship is assigned to one berth. Preferred and alternative berthing position are considered in constraint (10.8). Each ship can only dock at preferred or alternative berths. The set Berths represents all the possible berthing position for ship s. The preferred berth is usually the first choice of arrival ships. However, the ships may deviate from their preferred berths and are arranged at the other alternative berths in order to coordinate with energy systems. In addition, all the ships must dock within permissible berthing position (10.9).

  1. (2)

    QC Assignment

The QCs are used to load/unload containers on ships and directly influence the berthing duration of ships. A time-variant QC assignments model is considered in this book in order to increase the flexibility of logistic operation. That means the QCs allocated to a ship are not fixed from a period to another period of time. The QC assignment constraints are formulated as follows:

$$ \begin{array}{*{20}c} {\mathop \sum \limits_{s \in S} \omega_{qst} \le 1,\quad \forall q,t} \\ \end{array} $$
(10.10)
$$ \begin{array}{*{20}c} {Q_{st} = \mathop \sum \limits_{q \in Q} \omega_{qst} , \quad \forall s,t} \\ \end{array} $$
(10.11)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{{s \in {\mathcal{S}}}} Q_{st} \le Q^{max} } \\ \end{array} $$
(10.12)
$$ \begin{array}{*{20}c} {Q_{s}^{min} \mathop \sum \limits_{{b \in {\mathcal{B}}}} X_{bst} \le Q_{st} \le Q_{s}^{max} \mathop \sum \limits_{{b \in {\mathcal{B}}}} X_{bst} \quad \forall s,t} \\ \end{array} $$
(10.13)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{t} \eta Q_{st} \ge TEU_{s} ,\quad \forall s,t} \\ \end{array} $$
(10.14)

The running status of QC is also represented by a three-dimensional binary variable ωqst. The value of ωqst is equal to 1 when the QC q serves for the ship at time interval t. Constraint (10.10) guarantees that a specific QC is capable of serving only one ship at most during each time interval. The number of allocated QCs is calculated by constraint (10.11). Because of the limited resources of QCs, the sum of assigned QCs cannot be larger than the total number of available QCs (10.12). The ship length and loading/unloading requirements restrict the minimum and maximum number of QCs that can be allocated to each ship (10.13). Constraint (10.14) ensures that enough QCs are assigned to handle the containers on ships during docking time.

In addition to number-related constraints, the following practical operating constraints that can be seen from Fig. 10.2 should also be considered:

$$ \begin{array}{*{20}c} { - 1 \le \omega_{{\left( {q + 1} \right)st}} - \omega_{qst} + \omega_{{q^{\prime}st}} \le 1,\quad \forall q^{\prime} \le q - 1,s,t} \\ \end{array} $$
(10.15)
$$ \begin{array}{*{20}c} {B_{qt} = \left\{ {\begin{array}{*{20}c} {B_{s} {\text{if}} \omega_{qst} = 1} \\ {0 {\text{if}} \omega_{qst} = 0 } \\ \end{array} } \right. \quad \forall q,s,t} \\ \end{array} $$
(10.16)
$$ \begin{array}{*{20}c} {\xi_{qt} = \left\{ {\begin{array}{*{20}c} {1 {\text{if}} B_{qt} \ge 1} \\ {0 {\text{if}} B_{qt} = 0 } \\ \end{array} } \right. \quad \forall q,t} \\ \end{array} $$
(10.17)
$$ \begin{array}{*{20}c} {\xi_{{\left( {q + 1} \right)t}} \left( {B_{{\left( {q + 1} \right)t}} - B_{qt} } \right) \ge 0, \quad \forall q,t} \\ \end{array} $$
(10.18)

Constraint (10.15) ensures that all the QCs serving for one ship are adjacent. That means there should be no free QCs positioned between the running QCs. Each running QC is stationed at the same location as the ship it serves, while free QCs are assumed at the zeroth position that actually does not exist (10.16). This is because free QCs are not involved in loading/unloading containers and do not generate power demands, so they are not needed to be considered. Equation (10.17) indicates the relationship between the location of QC and its running status. All QCs are installed in a row thus they cannot cross each other.

Equations (10.110.18) limit the behaviors of ships and QCs within allowed range to ensure normal logistics transportation operations. However, the decision of berth allocation and QC assignment should also consider energy systems constraints.

10.3.2 Energy System

  1. (1)

    Energy Technologies

Constraints (10.1910.21) show the charge/discharge power limitations of ESS. The ESS hourly energy change is given in (10.22). Constraints (10.23) give the state limitation of ESS. The stored energy at the end of period should be equal to the initial stored energy to ensure that ESS can operate continuously (10.24).

$$ \begin{array}{*{20}c} {_{t}^{ch} P_{min}^{ch} \le P_{t}^{ch} \le_{t}^{ch} P_{max}^{ch} } \\ \end{array} $$
(10.19)
$$ \begin{array}{*{20}c} {_{t}^{dis} P_{min}^{dis} \le P_{t}^{dis} \le_{t}^{dis} P_{max}^{dis} } \\ \end{array} $$
(10.20)
$$ \begin{array}{*{20}c} {\upsilon_{t}^{ch} + \upsilon_{t}^{dis} = 1} \\ \end{array} $$
(10.21)
$$ \begin{array}{*{20}c} {S_{t}^{ESS} = S_{t - 1}^{ESS} + \eta^{ch} P_{t}^{ch} - \frac{{P_{t}^{dis} }}{{\eta^{dis} }}} \\ \end{array} $$
(10.22)
$$ \begin{array}{*{20}c} {S_{min}^{ESS} \le S_{t}^{ESS} \le S_{max}^{ESS} } \\ \end{array} $$
(10.23)
$$ \begin{array}{*{20}c} {S_{t = 1}^{ESS} = S_{t = T}^{ESS} } \\ \end{array} $$
(10.24)

The upper/lower bound of GT generation is imposed in (10.25). Constraint (10.26) shows the up/down ramp limit. Constraints (10.27) and (10.28) indicate the minimum up- and down-time. Constraints (10.29) and (10.30) present the logical relation of start-up and shut-down binary variables. The natural gas consumption is calculated by (10.31).

$$ \begin{array}{*{20}c} {I_{t}^{GT} P_{min}^{GT} \le P_{t}^{GT} \le I_{t}^{GT} P_{max}^{GT} } \\ \end{array} $$
(10.25)
$$ \begin{array}{*{20}c} { - D_{max}^{GT} \le P_{t}^{GT} - P_{t - 1}^{GT} \le U_{max}^{GT} } \\ \end{array} $$
(10.26)
$$ \begin{array}{*{20}c} {T_{on}^{GT} \left( {I_{t}^{GT} - I_{t - 1}^{GT} } \right) + \mathop \sum \limits_{{j = t - T_{on}^{GT} }}^{t - 1} I_{j}^{GT} \ge 0} \\ \end{array} $$
(10.27)
$$ \begin{array}{*{20}c} {T_{off}^{GT} \left( {I_{t - 1}^{GT} - I_{t}^{GT} } \right) + \mathop \sum \limits_{{t^{\prime} = t - T_{off}^{GT} }}^{t - 1} I_{{t^{\prime}}}^{GT} \ge 0} \\ \end{array} $$
(10.28)
$$ \begin{array}{*{20}c} {x_{t}^{GT} + y_{t}^{GT} = I_{t}^{GT} - I_{t - 1}^{GT} } \\ \end{array} $$
(10.29)
$$ \begin{array}{*{20}c} {x_{t}^{GT} + y_{t}^{GT} \le 1} \\ \end{array} $$
(10.30)
$$ \begin{array}{*{20}c} {g_{t}^{GT} = \frac{{h_{0}^{GT} \left( {P_{t}^{GT} } \right)^{2} + h_{1}^{GT} P_{t}^{GT} + h_{2}^{GT} }}{{HHV_{g} }}} \\ \end{array} $$
(10.31)

The electricity consumption and natural gas production of P2G are shown in (10.32) and (10.33).

$$ \begin{array}{*{20}c} {0 \le P_{t}^{P2G} \le P_{max}^{P2G} } \\ \end{array} $$
(10.32)
$$ \begin{array}{*{20}c} {g_{t}^{P2G} = \frac{{\phi P_{t}^{P2G} \eta^{P2G} }}{{HHV_{g} }}} \\ \end{array} $$
(10.33)
  1. (2)

    Electrical Network

The electrical network of seaport operates as a radial network. The DistFlow model proposed in [33] is employed to represent power flows in the electrical network:

$$ \begin{array}{*{20}c} {P_{ij} + P_{j}^{in} - r_{ij} I_{ij}^{2} = \mathop \sum \limits_{{k \in \Theta^{E} \left( j \right)}} P_{jk} + P_{j}^{L} } \\ \end{array} $$
(10.34)
$$ \begin{array}{*{20}c} {Q_{ij} + Q_{j}^{in} - x_{ij} I_{ij}^{2} = \mathop \sum \limits_{{k \in \Theta^{E} \left( j \right)}} Q_{jk} + Q_{j}^{L} } \\ \end{array} $$
(10.35)
$$ \begin{array}{*{20}c} {V_{j}^{2} = V_{i}^{2} - 2\left( {r_{ij} P_{ij} + x_{ij} Q_{ij} } \right) + \left( {r_{ij}^{2} + x_{ij}^{2} } \right)I_{ij}^{2} } \\ \end{array} $$
(10.36)
$$ \begin{array}{*{20}c} {I_{ij} = \sqrt {\frac{{P_{ij}^{2} + Q_{ij}^{2} }}{{V_{i}^{2} }}} , P_{ij} \ge 0, Q_{ij} \ge 0} \\ \end{array} $$
(10.37)
$$ \begin{array}{*{20}c} {0 \le I_{ij} \le I_{ij}^{r} , V_{i}^{f} \le V_{i} \le V_{i}^{r} } \\ \end{array} $$
(10.38)

Equations (10.34) and (10.35) show the nodal active and reactive power balance. Equation (10.36) presents the voltage drop at each electric line. Equation (10.37) relates voltage, current, active power, and reactive power. Constraint (10.38) imposes bounds on line currents and nodal voltages.

  1. (3)

    Natural Gas Network

Constraint (10.39) represents the nodal natural gas balance. Constraint (10.40) limits the supply of natural gas wells. Constraint (10.41) and (10.42) restricts nodal gas pressure and natural gas flow through pipelines. The natural gas flow is caused by gas pressure difference between nodes and can be formulated by Weymouth flow Eq. (10.43).

$$ \begin{array}{*{20}c} {\mathop \sum \limits_{{i \in \Omega^{G} \left( m \right)}} g_{lm} + g_{j}^{in} = \mathop \sum \limits_{{k \in \Theta^{G} \left( m \right)}} g_{mn} + g_{j}^{L} } \\ \end{array} $$
(10.39)
$$ \begin{array}{*{20}c} {\underline{G}_{m}^{W} \le g_{m}^{W} \le \overline{G}_{m}^{W} } \\ \end{array} $$
(10.40)
$$ \begin{array}{*{20}c} {\underline{\pi }_{m} \le \pi_{m} \le \mathop \pi \limits^{ - }_{m} } \\ \end{array} $$
(10.41)
$$ \begin{array}{*{20}c} {\underline{G}_{mn} \le g_{mn} \le \mathop G\limits^{ - }_{mn} } \\ \end{array} $$
(10.42)
$$ \begin{array}{*{20}c} {g_{mn} = K_{mn} {\text{sgn}} \left( {\pi_{m} - \pi_{n} } \right)\sqrt {\left| {\pi_{m}^{2} - \pi_{n}^{2} } \right|} } \\ \end{array} $$
(10.43)

10.3.3 The Nexus Between Logistics System and Energy System

As Fig. 10.2 shows, QCs and ships are connected with certain electrical nodes of electricity networks. The nodal power loads of QCs and ships can be formulated as Eqs. (10.44) and (10.45) using rated power Pcrane/Pship and status ωqst/Xbst, where Φ(i) and Γ(i) are the set of QCs and berths, respectively, that are linked with electrical node i.

$$ \begin{array}{*{20}c} {P_{i,t}^{crane} = \mathop \sum \limits_{q \in \Phi \left( i \right)} \mathop \sum \limits_{s \in S} \omega_{qst} P_{crane} } \\ \end{array} $$
(10.44)
$$ \begin{array}{*{20}c} {P_{i,t}^{ship} = \mathop \sum \limits_{s \in S} X_{bst} P_{s}^{ship} b \in \Gamma \left( i \right)} \\ \end{array} $$
(10.45)

Note that the nodal electricity demands of electricity networks originate from the fixed power loads, ESS charging, P2G, QCs and ships, so can be calculated by Eq. (10.46) as follows:

$$ \begin{array}{*{20}c} {P_{i,t}^{L} = P_{i,t}^{d} + P_{i,t}^{ch} + P_{i,t}^{P2G} + P_{i,t}^{ship} + P_{i,t}^{crane} } \\ \end{array} $$
(10.46)

The above three equations achieve the coupling between LS and ES. Equations (10.44) and (10.45) include binary variables ωqst/Xbst that represent ships/QCs status and are restricted by logistic operation constraints. Then the two variables are added to ES through Eq. (10.46), so as to also comply with energy dispatching constraints. In this regard, berth allocation of ships and QC assignment are restricted by logistic and energy dual-constraints. Thus, the two systems restrict and influence each other as a whole, and can be dispatched uniformly.

10.3.4 Coordinated Optimization of PIES

In this study, PIES is dispatched by seaport control center and is allowed to purchase energy from the main power grid and natural gas wells at certain prices. The control center is eligible to dispatch ships, QCs and energy flows. The objective is to minimize the total costs, including the logistic operating costs FL and the energy service costs FE as follows:

$$ \begin{array}{*{20}c} {\min F_{L} + F_{E} } \\ \end{array} $$

s.t.

$$ \begin{gathered} {\text{Logistic system constraints }}\left( {10.1 - 10.18} \right) \hfill \\ \begin{array}{*{20}c} \begin{gathered} {\text{Energy system constraints }}\left( {{10}{\text{.19}} - 10.43} \right) \hfill \\ {\text{Coupling constraints }}\left( {{10}{\text{.44}} - 10.46} \right) \hfill \\ \end{gathered} \\ \end{array} \hfill \\ \end{gathered} $$
(10.47)

where the logistic operating cost FL is given by

$$ \begin{array}{*{20}c} {F_{L} = \mathop \sum \limits_{s \in S} \left[ {c_{s}^{d} \left( {\sigma_{bs}^{pref} - \sigma_{bs} } \right) + c_{s}^{w} \left( {t_{1,s} - t_{0,s} } \right) + c_{s}^{b} \left( {t_{2,s} - t_{1,s} } \right)} \right]} \\ \end{array} $$
(10.48)

The first term is penalty cost of deviation from preferred berth, where \(\sigma_{{{\text{bs}}}}^{{{\text{pref}}}} - \sigma_{{{\text{bs}}}}\) is equal to 0 when the ship dock at preferred berth, otherwise, it equals to 1. The second and third terms are anchoring cost and docking cost respectively.

The energy service cost FE is expressed in Eq. (10.49), includes start-up and shut-down cost of GT, energy purchase cost and carbon emissions penalty. The carbon emission comes from energy consumption and auxiliary engines of anchored ships.

$$ \begin{aligned} F_{E} & = \mathop \sum \limits_{t \in T} \mathop \sum \limits_{{o \in N_{GT} }} \left[ {x_{o,t}^{GT} S_{i}^{on} + y_{o,t}^{GT} S_{i}^{off} } \right] + \mathop \sum \limits_{t \in T} \left( {c_{t}^{grid} P_{t}^{grid} + \mathop \sum \limits_{{j \in g^{W} }} c^{gas} g_{j,t}^{W} } \right) \\ & \quad + c^{{CO_{2} }} \mathop \sum \limits_{t \in T} \left( {\alpha^{{CO_{2} }} P_{t}^{grid} + \mathop \sum \limits_{{j \in g^{W} }} \beta^{{CO_{2} }} g_{j,t}^{W} } \right) \\ & \quad + \begin{array}{*{20}c} {c^{{CO_{2} }} \mathop \sum \limits_{s \in S} \left[ {\left( {t_{1,s} - t_{0,s} } \right)\left( {\gamma_{s}^{0} \left( {P_{s}^{ship} } \right)^{2} + \gamma_{s}^{1} P_{s}^{ship} + \gamma_{s}^{2} } \right)} \right]} \\ \end{array} \\ \end{aligned} $$
(10.49)

With the optimization goal and operating constraints, a coordinated optimization framework of PIES is proposed as Fig. 10.3 shows. In the framework, ships and QCs adjust their states under logistic-energy dual-constraints to achieve load temporal-spatial shifting and logistic operation. At the same time, energy dispatching schemes including GT unit commitment and energy flows are also determined in the coordination process.

Fig. 10.3
figure 3

Coordinated optimization framework of PIES

10.4 Solution Methodology

Clearly, the proposed model is a nonlinear and non-convex optimization problem, which is challenging to solve. The solution method is stated in this section.

10.4.1 Linearizing Logistic Constraints

The nonlinearity of logistic operation constraints comes from Eqs. (10.1), (10.1610.18), and can be linearized by big-M method.

Equation (10.1) can be transformed into Eqs. (10.5010.54), which are equal to Eq. (10.1) logically.

$$ \begin{array}{*{20}c} {bX_{bst} \le B_{s} ,\quad \forall b,s,t} \\ \end{array} $$
(10.50)
$$ \begin{array}{*{20}c} {bX_{bst} + M\left( {1 - X_{bst} } \right) \ge B_{s} ,\quad \forall b,s,t} \\ \end{array} $$
(10.51)
$$ \begin{array}{*{20}c} {tX_{bst} \le t_{2,s} ,\quad \forall b,s,t} \\ \end{array} $$
(10.52)
$$ \begin{array}{*{20}c} {tX_{bst} + M\left( {1 - X_{bst} } \right) \ge t_{1,s} ,\quad \forall b,s,t} \\ \end{array} $$
(10.53)
$$ \begin{array}{*{20}c} {\mathop \sum \limits_{b \in B} \mathop \sum \limits_{t \in T} X_{bst} = t_{2,s} - t_{1,s} + 1,\quad \forall s} \\ \end{array} $$
(10.54)

Equation (10.54) indicates that berthing duration is the difference between departure time t2,s and berthing start time t1,s, and it also equal to the sum of docking status Xbst in dimensions b and t.

Similarly, Eqs. (10.16), (10.17) and (10.18) are transformed to Eqs. (10.5510.57), (10.5810.59) and (10.60), respectively.

$$ \begin{array}{*{20}c} {B_{qt} \le B_{s} + M\left( {1 - \omega_{qst} } \right), \quad \forall q,s,t} \\ \end{array} $$
(10.55)
$$ \begin{array}{*{20}c} {B_{qt} + M\left( {1 - \omega_{qst} } \right) \ge B_{s} ,\quad \forall q,s,t} \\ \end{array} $$
(10.56)
$$ \begin{array}{*{20}c} {B_{qt} \le B^{max} \mathop \sum \limits_{s \in S} \omega_{qst} } \\ \end{array} $$
(10.57)
$$ \begin{array}{*{20}c} {B_{qt} \ge \xi_{qt} ,\quad \forall q,t} \\ \end{array} $$
(10.58)
$$ \begin{array}{*{20}c} {B_{qt} \le B^{max} \xi_{qt} } \\ \end{array} $$
(10.59)
$$ \begin{array}{*{20}c} {B_{{\left( {q + 1} \right)t}} + M\left( {1 - \xi_{{\left( {q + 1} \right)t}} } \right) \ge B_{qt} ,\quad \forall q,t} \\ \end{array} $$
(10.60)

10.4.2 Convexifying the Energy Systems Equations

Replace (Vi)2 with Ui and (Iij)2 with iij, then Eq. (10.37) is convexified by SOC relaxations as follows

$$ \begin{array}{*{20}c} {\left\| {\begin{array}{*{20}c} {2P_{ij} } \\ {2Q_{ij} } \\ {i_{ij} - U_{i} } \\ \end{array}_{2} } \right\|_{2} \le i_{ij} + U_{i} } \\ \end{array} $$
(10.61)

Replace (\(\pi_{m}\))2 with \(\widehat{\pi }_{m}\) and introduce binary variables u+/u to represent \({\text{sgn}} (\pi_{m} - \pi_{n} )\) in Eq. (10.43), then Eq. (10.43) transforms to Eq. (10.62):

$$ \begin{array}{*{20}c} {g_{mn}^{2} = K_{mn}^{2} \left( {u_{mn}^{ + } - u_{mn}^{ - } } \right)\left( {\hat{\pi }_{m} - \hat{\pi }_{m} } \right)} \\ \end{array} $$
(10.62)

Let \(\prod_{m}\) be squares of nodal pressure bound and binary variables u+/u can be calculated by:

$$ \begin{array}{*{20}c} {\left( {u_{mn}^{ + } - 1} \right)\mathop \Pi \limits^{ - }_{n} \le \hat{\pi }_{m} - \hat{\pi }_{n} \le \left( {1 - u_{mn}^{ - } } \right)\mathop \Pi \limits^{ - }_{m} } \\ \end{array} $$
(10.63)
$$ \begin{array}{*{20}c} {\left( {u_{mn}^{ + } - 1} \right)\mathop G\limits^{ - }_{mn} \le g_{mn} \le \left( {1 - u_{mn}^{ - } } \right)\mathop G\limits^{ - }_{mn} } \\ \end{array} $$
(10.64)
$$ \begin{array}{*{20}c} {u_{mn}^{ + } + u_{mn}^{ - } = 1} \\ \end{array} $$
(10.65)

Then, Eq. (10.62) is finally linearized and convexified as follows:

$$ \begin{array}{*{20}c} {\psi_{mn} \ge \hat{\pi }_{n} - \hat{\pi }_{m} + \left( {\underline{\prod }_{m} - \mathop \Pi \limits^{ - }_{n} } \right)\left( {u_{mn}^{ + } - u_{mn}^{ - } + 1} \right)} \\ \end{array} $$
(10.66)
$$ \begin{array}{*{20}c} {\psi_{mn} \le \hat{\pi }_{n} - \hat{\pi }_{m} + \left( {\mathop \Pi \limits^{ - }_{m} - \underline{\prod }_{n} } \right)\left( {u_{mn}^{ + } - u_{mn}^{ - } + 1} \right)} \\ \end{array} $$
(10.67)
$$ \begin{array}{*{20}c} {\psi_{mn} \ge \hat{\pi }_{m} - \hat{\pi }_{n} + \left( {\mathop \Pi \limits^{ - }_{m} - \underline{\prod }_{n} } \right)\left( {u_{mn}^{ + } - u_{mn}^{ - } - 1} \right)} \\ \end{array} $$
(10.68)
$$ \begin{array}{*{20}c} {\psi_{mn} \le \hat{\pi }_{m} - \hat{\pi }_{n} + \left( {\underline{\prod }_{m} - \mathop \Pi \limits^{ - }_{n} } \right)\left( {u_{mn}^{ + } - u_{mn}^{ - } - 1} \right)} \\ \end{array} $$
(10.69)
$$ \begin{array}{*{20}c} {\left\| {\begin{array}{*{20}c} {\frac{{2g_{mn} }}{{K_{mn} }}} \\ {\psi_{mn} - 1} \\ \end{array}_{2} } \right\|_{2} \le \psi_{mn} + 1} \\ \end{array} $$
(10.70)

where the variable \(\psi_{mn}\) replaces \(\left( {u_{mn}^{ + } - u_{mn}^{ - } } \right)\left( {\hat{\pi }_{m} - \hat{\pi }_{n} } \right)\) in Eq. (10.62).

The convex quadratic term \({\text{h}}_{0}^{{{\text{GT}}}}\) (\({\text{P}}_{{\text{t}}}^{{{\text{GT}}}}\))2 in Eq. (10.31) can be convexified by an auxiliary variable \(\delta_{0}\) and the following SOC inequalities, which is defined as the epigraph form [34].

$$ \begin{array}{*{20}c} {\delta_{o} + 1 \ge \left\| {\begin{array}{*{20}c} {2\sqrt {h_{0,o}^{GT} } P_{o,t}^{GT} } \\ {\delta_{o} - 1} \\ \end{array} } \right\|} \\ \end{array} $$
(10.71)

10.4.3 The Final Optimization Formulation of PIES

Based on the linearization and relaxations discussed above, the following convex MISOCP problem is obtained:

$$ \begin{array}{*{20}c} {\min F_{L} + F_{E} } \\ \end{array} $$
(10.72)

s.t.

Logistic system constraints (10.210.15), (10.5010.60).

Energy system constraints (10.1910.36), (10.3810.42), (10.6210.71).

Coupling constraints (10.4410.46).

which is the final form of proposed coordinated optimization model.

10.5 Case Studies

In this section, the proposed model is applied to a typical port integrated energy system. It includes 6 shore-side power devices (6 berthing position), 18 available QCs, modified 33 electrical buses [35] and modified 7 natural gas nodes [36]. The topology of test system is shown in Fig. 10.4. Shore-side power devices, QCs and various energy technologies are connected to certain nodes in energy supply networks.

Fig. 10.4
figure 4

Network topologies: a electrical network; b natural gas network

The electrical network and natural gas network are linked by two GT units and two P2Gs. In the electrical network, GT1 (5 MW) and GT2 (5 MW) are installed at bus 3 and bus 9, P2G1 (3 MW) and P2G2 (3 MW) are connected to bus 19 and bus 26, PV1 (5 MW), PV2 (2.4 MW) and PV3 (2 MW) are linked with bus 5, bus 19 and bus 26, respectively. There is also an ESS (3 MW) at bus 5. The electricity prices 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.13, 0.49, and 0.83¥/kWh respectively. The natural gas price is set as 5.41$/kcf. The carbon emission coefficient of ship auxiliary engines is set equally as 3.136 kg/MW2h, 537.6 kg/MWh and 23.36 kg/h [13]. The carbon emission factors of main grid and gas wells are 712.9 kg/MWh and 64.0 kg/kcf. The carbon tax is set to be 6.192$/ton according to Shanghai Emission Trading System.

The operation horizon is set to be 48 h. Three kinds of ships are included: heavy ship, medium ship and small ship. The number of containers to be handled is 1500–3000 for heavy ships, 800–1500 for medium ships and 200–800 for small ships. The number of QCs that can be allocated for each ship is 3–6 for heavy ships, 2–5 for medium ships and 1–4 for small ships. The power demand of heavy ships, medium ship and small ships are 3 MW, 2 MW and 1 MW respectively. Each QC handle 35 containers per hour and its power is 0.3 MW. The logistic operating cost coefficients in Eq. (10.48) are 0.5, 1 and 1 times of the number of handled containers.

Four cases are set to demonstrate the advantages of proposed model. Case I is designed as an uncoordinated operating mode: the first stage is to minimize logistic operating cost FL (48) under logistic operation constraints and obtain the status of ships and QCs. The second stage is to minimize energy service cost FE (49) with obtained logistic parameters. Finally evaluate total cost FL + FE. Case II is coordinated optimization of PIES using proposed mothed. Cases III and Case IV decouple electricity networks and natural gas networks in Cases I and Case II.

All simulations are implemented by Gorubi 9.10 and Yalmip in MATLAB 2021a on a laptop with an 8-core Intel Core i7 processor and 16 GB memory.

10.5.1 Case of Sufficient Berths

In this section, ten arrival ships with fewer containers are considered so berths are not congested. Table 10.1 gives the information of 10 arrival ships. Table 10.2 shows the optimization results of four cases. Table 10.3 compares the berth allocation of Case I and Case II. The advantages of proposed method are analyzed from the following two aspects.

Table 10.1 Parameters of ten arrival ships
Table 10.2 Optimization results in four cases
Table 10.3 Berth allocation of ships in two cases
  1. (1)

    Emission Reduction and Economic Benefits

In Case I, berths and QCs are pre-allocated. All ships immediately dock at preferred berths when arriving at seaport, then leaving as soon as possible. Considering that the determination of berth allocation and QC assignment is only under logistic transportation constraints without energy operating constraints, some ships cannot utilize multiple energy sources because their berthing position mismatches the multiple energy supply, e.g., the second ship docks at berth 3 at 3:00 but no PV are available at that time interval. Therefore, uncoordinated optimization cannot obtain the optimal dispatching schemes of LS and ES. The carbon emission and total costs are higher than Case II.

In Case II, the emission penalty and total costs reduce by 21.82% and 8.12% compared with Case I. This reduction is at the expense of berth deviation penalty. The second ship deviates from preferred berth 3 to berth 4 linked with GT unit, so the electricity purchased from main grid is replaced by cheaper natural gas. The fourth and the sixth ship arrive at seaport during the day when PV sources are available. Under coordination, the fourth ship deviates from berth 4 to berth 2 in order to use PV sources. The sixth ship deviates from berth 3 and docks at berth 1 because berth 1 links to the child bus of PV1 that has higher capacity, so that more PV sources can be used if the sixth ship docks at berth 1. Overall, in the case of sufficient berths, coordinated optimization changes the spatial distribution of ship load. The loads are matched with the energy supply under logistic-energy dual constraints. As a result, energy purchase and carbon emission reduce.

Figure 10.5 compares the electricity balance of Case I and Case II. In Case I, surplus PV sources and cheaper natural gas are not fully utilized by ships and QCs. More electricity is purchased from main grid to support ships and QCs, while extra PV generation is transformed to natural gas via P2G to support natural gas loads. So that the energy service costs of Case I is higher than Case II. In Case II, the logistic operating costs slightly increase from 8.94 to 9.15 k$, while total energy service costs significantly decrease from 7.81 to 6.24 k$. Although some ships deviate from their preferred berths, the increase of berth deviation penalty is negligible compared with the decline of energy service costs. The reduction of electricity purchase is mainly due to the temporal-spatial match between ships/QCs loads and energy supply, which can deliver more photovoltaic and natural gas to ships and QCS to replace the expensive electricity of the main grid.

Fig. 10.5
figure 5

Electricity balance in the coupled systems, a Case I; b Case II

As for Case III and Case IV, both logistic operating and energy service costs increase compared with Case I and Case II. Due to the lack of support from the natural gas network, seaports have to purchase expensive electricity from main grid to meet power demands, causing higher energy purchase costs. In addition, electricity price and PV generation become the main influencing factors of berth allocation and QC assignment. Some ships anchor to wait after arriving at seaports, and begin to dock when PV generation becomes larger or electricity price is relatively low, causing more berthing costs compared with Case I and Case II.

  1. (2)

    Sensitivity Analysis

The advantages of proposed coordinated optimization strategy may be affected by various parameters. A sensitivity analysis is performed on per-unit logistic operating costs and natural gas price to show the impact on total costs and operational decisions.

The per-unit logistic operating cost is set to be 10%, 50%, 100%, 150% and 200% of reference value in Case II. The results are shown in Tables 10.4 and 10.5 and Fig. 10.6. With the increasing of per-unit logistic operating cost, the economic benefits become less effective. Ships are more reluctant to change their preferred berth and try to minimize the sum of anchoring and docking time. Therefore, the results of Case I and Case II become more similar. In the cases of lower per-unit logistic operating cost (i.e., 10% and 50%), the logistic operating cost is negligible compared with energy service costs. Ships are more willing to deviate from preferred berths and adjust berthing time (see Table 10.4) in order to use multiple energy sources to reduce energy service costs. In this case, the operational decisions mainly depend on energy systems.

Table 10.4 Berthing time of different per-unit logistic operating cost coefficients
Table 10.5 Berthing position of different per-unit logistic operating cost coefficients
Fig. 10.6
figure 6

Cost analysis under different per-unit logistic operating costs. Every two slacks grouped together in each column represent the correlated costs in Case I and Case II, respectively. The percentage on the top of each stack group is the ratio of total cost reduction

The natural gas price is set as 50%, 200% and 500% of reference value in Case II. Tables 10.6 and 10.7 show the results of berth allocation. With the decrease of natural gas price, the economic benefits become more obvious as Fig. 10.7 shows. This because when the price of natural gas become lower, the purchase cost of natural gas is closer to renewable energy (free to use). Ships are more willing to dock at berths that linked with GT units. When the price of natural gas reaches a certain high level, it is no longer an economical way to replace electricity with natural gas. As a result, in the case of 200% of natural gas, only the ninth ship docks at berth 4 that connected with child bus of GT unit, while there are three ships dock at berth 4 in the case of 50% natural gas price. The second and fourth ships dock at the berth 4 in the case of 50% natural gas price. However, the two ships dock at berth 3 and berth 2 when the price increase to 200%. When the price increases to 500%, only the nineth ship docks at berth 4 and is supported by natural gas. The other ships dock at other berths and are supplied by PV or electricity from power grid. In addition, berthing time is also influenced by natural gas price. The sixth ship anchors for four hours after arriving at seaport and begins to dock at 22:00 when the electricity price is low.

Table 10.6 Berthing time of different natural gas price
Table 10.7 Berthing position of different natural gas price
Fig. 10.7
figure 7

Cost analysis under different natural gas price. Every two slacks grouped together in each column represent the correlated costs in Case I and Case II, respectively. The percentage on the top of each stack group is the ratio of total cost reduction

Figure 10.8 shows the energy supply structure in the cases of different natural gas price. When natural gas price is relatively low, the electrical loads are mainly supported by natural gas (67.53%) and PV (29.50%), while electricity from main grid only accounts for 2.96%. With the increase of natural gas price, the percentage of GT decreases significantly to 26.10% and the main grid increase to 41.94%. In the case of 500%, the natural gas is more expensive than electricity. 71.82% of the electricity supply comes from the main grid, and the proportion of gas turbines is negligible.

Fig. 10.8
figure 8

The energy supply structure of the three cases

From the above discussion, the per-unit logistic operating cost and natural gas price have an obvious impact on operational decisions.

10.5.2 Case of Berth Congestion

This section focuses on the advantages of coordinated optimization in the case of berth congestion. Fifteen arrival ships with more containers are considered and the parameters of ships are shown in Table 10.8. The optimization results are given in Table 10.9, Figs. 10.9 and 10.10.

Table 10.8 Parameters of fifteen arrival ships
Table 10.9 Optimization results under berth congestion
Fig. 10.9
figure 9

The berthing time and position of ships: a Case I; b Case II. The red box represents the difference of Case II from Case I

Fig. 10.10
figure 10

Anchoring and docking time of the fifteen ships. The left-side bar represents the result of Case I and the right-side bar corresponds to Case II. The number above the bar is the berthing position of ships

Figure 10.9 shows the results of berth allocation in Case I and Case II. In Case II, the fourteenth and the eighth ships dock at berth 1 in order to utilize cheaper natural gas. The berth deviation of the fourteenth ship makes berth 3 available, so that the six ship can begin to dock at berth 3 earlier than Case I to reduce anchoring costs. In this case, the berth deviation penalty of the fourteenth and the eighth ships is negligible compared with the reduction of energy purchase and anchoring time cost. For the fourth and the fifteenth ships, although the anchoring time of the two ships has increased by 1 h, the decrease of docking costs is more than the increase of anchoring costs. Similarly, the anchoring and docking time of the fifth ship increase because of less available QCs. But this ship deviates to berth 5 in order to reduce energy purchase cost.

It is worth mentioning that ships with higher power demands have higher priority to dock at berths that connect with more energy supply. For example, the third ship deviates from berth 1 to berth 5 and gives berth 1 to the fourteenth ship. This is because the fourteenth ship consumes more energy than the third ship and there is more energy supply at berth 1. Therefore, it is more economical to arrange the fourteenth at berth 1. As a result, higher power load from the fourteenth ship is supported by PV and natural gas, thereby reducing electricity purchase.

As for transportation efficiency, most of ships in Case II have the same or less anchoring and docking time in Case I (see Fig. 10.10). The average anchoring and docking time in Case II decrease by 0.34 and 0.07 h respectively compared with Case I. The increase of logistic operating cost is mainly caused by berth deviation penalty. Although some ships leave the seaports later than Case I, from an overall point of view, transportation efficiency is slightly affected. Therefore, even in the case of berth congestion, the proposed coordination optimization method can reduce total cost through changing berthing position/time of ships and the status of QCs, while ensuring transportation efficiency.