Intertemporal Static and Dynamic Optimization of Synthesis, Design, and Operation of Integrated Energy Systems of Ships

: Fuel expenses constitute the largest part of the operating cost of a merchant ship. Integrated energy systems that cover all energy loads with low fuel consumption, while being economically feasible, are increasingly studied and installed. Due to the large variety of possible conﬁgurations, design speciﬁcations, and operating conditions that change with time, the application of optimization methods is imperative. Designing the system for nominal conditions only is not sufﬁcient. Instead, intertemporal optimization needs to be performed that can be static or dynamic. In the present article, intertemporal static and dynamic optimization problems for the synthesis, design, and operation (SDO) of integrated ship energy systems are stated mathematically and the solution methods are presented, while case studies demonstrate the applicability of the methods and also reveal that the optimal solution may defer signiﬁcantly from the solutions suggested with the usual practice. While in other works, the SDO optimization problems are usually solved by two- or three-level algorithms; single-level algorithms are developed and applied here, which tackle all three aspects (S, D, and O) concurrently. The methods can also be applied on land installations, e.g., power plants, cogenerations systems, etc., with proper modiﬁcations.


Introduction
The continuously increasing need for more efficient fuel utilization and reduction of the environmental pollution leads to the construction of integrated energy systems of increasing complexity that can produce several forms of energy, while at the same time are economically feasible. In a conventional design procedure of an energy system (power plant, propulsion plant, cogeneration system, etc.), the aim is usually to design a system that "works", i.e., a system that delivers the required energy products under certain constraints. However, the scarcity of physical and economic resources and the deterioration of the environment make it necessary to build a system that not only "works", but also it is the "best"; such a system can be designed by the application of formal optimization procedures.
During its lifetime, an energy system may operate under various conditions (load, weather state, etc.). Optimization at one set of conditions only (e.g., the "design" or "nominal" point) does not lead, in general, to the best utilization of physical and economic resources. Therefore, intertemporal optimization is needed [1], which takes into consideration the various operating conditions that the system is expected to encounter during its life time. In the marine industry, the synthesis and design of energy systems is usually based on previous experience of the designer and rule-of-thumb criteria. Furthermore, the system is often designed considering full load operation only, while its off-design performance is assessed only after the system is fixed. However, the high multitude of available alternative configurations makes the study of all combinations one by one and the selection of the best a rather daunting task. Furthermore, it must be taken into account that the operating conditions are highly varying with time and that all modes of operation of the energy system should be considered. Thus, past experience alone is not sufficient for determining the optimum design and operation, and the development and application of mathematical optimization techniques for the synthesis, design, and operation optimization (SDOO) of marine energy systems has nowadays become a necessity with significant engineering importance.
Engineering optimization problems, involving time dependencies of the operation of the system studied, can be characterized as static or dynamic [1]. In static optimization, the values of variables that give the best value (minimum or maximum) to an objective function are requested. In dynamic optimization, the variables, the functions, and the parameters are, in general, time-dependent; therefore, the variables as functions of time that give the best value (minimum or maximum) to an objective function are requested.
It can be said that if the various modes of operation are independent of each other, i.e., the operation in a mode does not affect and is not affected by the operation in any other mode, then we have an intertemporal static optimization problem. If, however, a direct interdependency among operating modes exists (as is the case, e.g., of a system with energy storage or of a ship that needs to reach her destination at a specified time encountering various weather conditions along the way), then intertemporal dynamic optimization is needed.
In the present section, characteristic publications related to the SDOO of energy systems (including systems on ships) are presented, while a detailed literature review is beyond the limits of this article.
Several methodologies have been developed for the SDOO of energy systems [2]. Characteristic works are mentioned in the following. Pelster et al. [3] a thermoeconomic-environomic methodology that performs synthesis and design optimization via a single-level approach that utilizes a Struggle Genetic Algorithm (Str-GA) is presented and applied to a cogeneration combined cycle power plant. Mussati et al. [4] examine the synthesis and design optimization of a dual purpose desalination plant while a superconfiguration (the word 'superstructure', which is often used for systems on land, is not used here, because it has a different meaning on ships) is used in order to model all available synthesis options and a MINLP problem is stated. Another example where a superconfiguration is used and the synthesis and design aspects of the system are tackled at a single In the marine industry, the synthesis and design of energy systems is usually based on previous experience of the designer and rule-of-thumb criteria. Furthermore, the system is often designed considering full load operation only, while its off-design performance is assessed only after the system is fixed. However, the high multitude of available alternative configurations makes the study of all combinations one bvy one and the selection of the best a rather daunting task. Furthermore, it must be taken into account that the operating conditions are highly varying with time and that all modes of operation of the energy system should be considered. Thus, past experience alone is not sufficient for determining the optimum design and operation, and the development and application of mathematical optimization techniques for the synthesis, design, and operation optimization (SDOO) of marine energy systems has nowadays become a necessity with significant engineering importance.
Engineering optimization problems, involving time dependencies of the operation of the system studied, can be characterized as static or dynamic [1]. In static optimization, the values of variables that give the best value (minimum or maximum) to an objective function are requested. In dynamic optimization, the variables, the functions, and the parameters are, in general, time-dependent; therefore, the variables as functions of time that give the best value (minimum or maximum) to an objective function are requested.
It can be said that if the various modes of operation are independent of each other, i.e., the operation in a mode does not affect and is not affected by the operation in any other mode, then we have an intertemporal static optimization problem. If, however, a direct interdependency among operating modes exists (as is the case, e.g., of a system with energy storage or of a ship that needs to reach her destination at a specified time encountering various weather conditions along the way), then intertemporal dynamic optimization is needed.
In the present section, characteristic publications related to the SDOO of energy systems (including systems on ships) are presented, while a detailed literature review is beyond the limits of this article.
Several methodologies have been developed for the SDOO of energy systems [2]. Characteristic works are mentioned in the following. Pelster et al. [3] a thermoeconomic-environomic methodology that performs synthesis and design optimization via a single-level approach that utilizes a Struggle Genetic Algorithm (Str-GA) is presented and applied to a cogeneration combined cycle power plant. Mussati et al. [4] examine the synthesis and design optimization of a dual purpose desalination plant while a superconfiguration (the word 'superstructure', which is often used for systems on land, is not used here, because it has a different meaning on ships) is used in order to model all available synthesis options and a MINLP problem is stated. Another example where a superconfiguration is used and the synthesis and design aspects of the system are tackled at a single level can be found in Sun et al. [5], exploits synergies between heuristic and optimization based approaches, Goderbauer et al. [33] where a decentralized energy supply system is optimized for an appropriate cost function via adaptive discretization algorithm and in Zhu et al. [34], where a large scale combined heat and power (CHP) system is examined. Finally, another noteworthy study can be found in Fuentes-Cortés et al. [35], where multiobjective intertemporal dynamic SDOO that encompasses economic, environmental and safety aspects, is performed for residential CHP systems.
Considering the field of marine engineering, no studies of intertemporal dynamic SDOO of energy systems of ships have been found.
In the present article, intertemporal static and intertemporal dynamic SDOO of energy systems of ships are performed. For each case, the optimization problem is stated in a suitable mathematical framework and the modeling of the energy system components is briefly presented. Also, for each problem, the solution method applied is described in brief and a numerical example is presented, which demonstrates the applicability of the method and also reveals that the optimal solution may defer significantly from the solutions suggested in the usual practice. It is important to highlight that the problems are formulated and solved in an appropriate manner so that the SDO aspects of optimization are treated simultaneously via a single level approach.
It is noted that the general mathematical statement as well as a collection of several solution approaches for the intertemporal static and dynamic SDOO problems can be found in Frangopoulos [1].

Studies on Gas Turbines as Ship Propulsion Engines
Due to the relatively low thermal efficiency of gas turbines in comparison with Diesel engines, which are most usually installed on ships, heat recovery may be of utmost importance, in order for a system to be an economically viable alternative to Diesel engines. Furthermore, the high flow rate and temperature of the exhaust gases make gas turbines ideal for combined cycle systems.
In the present work, a novel approach of the SDO optimization problem, initially appearing in [24] for the case of integrated ship energy systems with Diesel main engines is extended to the case of gas turbine systems, as it is considered that the utilization of gas turbines on ships is an important subject attracting a continuous research interest.
A thorough review of the possibility of using gas turbine-based combined cycles on merchant ships has been reported in the series of works [36][37][38]. The possibility of using such systems in place of Diesel engines is investigated as a means of reducing pollutants emissions and their environmental and health impacts, while at the same time complying with more and more strict emission regulations. It is indicated that gas turbine combined cycles can very well satisfy these regulations. Furthermore, the benefits of lower volume and weight of these systems on commercial vessels is assessed as an extra motive for their utilization.
Altosole et al. [39] a case study is conducted for the possibility of the application of a gas turbine-based combined cycle power plant instead of two-stroke Diesel engines on a large containership, after optimization for three different bottoming steam cycle designs. In addition to the benefits related to the overall weight and volume decrease of the machinery, a significant decrease in fuel consumption in comparison with the fuel consumption decrease achieved by bottoming cycles based on Diesel engines is reported.
A comparison between the thermodynamic performance of systems using gas turbines or low-speed Diesel engines with steam bottoming cycles is presented in Dzida [40]. Performance data of commercially available engines of both types are used and it is concluded that both types of the overall systems can achieve comparable efficiencies with the employment of the steam bottoming cycle.
The majority of modern combined cycle applications employ variable geometry gas turbines for better partial load performance. The effects of variable geometry inlet guide vanes and the fuel feeding regulation on the thermal efficiency and the overall performance of the prime movers during Energies 2019, 12, 893 6 of 50 partial load operation are studied in Hanglid [41] for the cases of single-shaft and two-shaft marine gas turbines, while the efficiency of the overall system is studied in Hanglid [42]. The results suggest that, even though the efficiency of the gas turbine itself tends to generally deteriorate, especially at low loads, the use of variable geometry gas turbines is evidently beneficial for the thermal efficiency of an appropriately designed combined cycle. Another possibility of variable geometry gas turbines studied specifically for use in marine applications appears in Wang et al. [43], where the off-design performance of a marine gas turbine with compressor variable stator vanes is studied, and appropriate control strategies are proposed.
Other possibilities of integrating gas turbines with other technologies for marine applications have also been reported. Besides the utilization of water/steam in bottoming cycles, alternative waste heat cycles and configurations, possibly more suitable for ship applications, have been proposed, as for example in Sharma et l. [44] and Hou et al. [45], where supercritical CO 2 waste heat recovery cycles are proposed. Both studies suggest significant power enhancement and a very important increase of the thermal efficiency of the overall power plant. The improved partial load performance of such cycles is also highlighted [45].
Wang et al. [46], a system based on the waste heat recovery using both a standard steam bottoming cycle and an organic Rankine cycle operating in a cascaded way for the construction of a cogeneration system is studied in various operating conditions, and the improvements in comparison with a sole water/steam cycle are quantified.
Other works suggest the integration of gas turbines with fuel cells in energy systems of ships [47]. In such systems, the waste heat of the exhaust gas is used to preheat the fuel used in the fuel cell to the required temperature of operation. Tse et al. [48], a system combining fuel cell and gas turbine modules is extended with the use of absorption heat pumps for the production of cooling power, constructing a trigeneration or CCHP system studied for marine applications.
Apart from the cases where gas turbines are used in conjunction with steam bottoming cycles or other waste heat recovery configurations, studies have also appeared in which gas turbine configurations are used solely for the production of mechanical power in ship energy systems. Armellini et al. [49,50], a comparison is made between the alternatives of using (a) gas turbines as main engines, (b) Diesel engines with no pollution abatement, and (c) Diesel engines complemented with pollutant emission control devices (SCR, scrubber). These three different systems are simulated and optimized for the case of a cruise ship with the aim of maximizing the overall energy efficiency in several operating conditions, while the pollutants emissions are afterwards quantified. The results show that the employment of gas turbines leads to important environmental benefits, comparable with the alternative of using emission control devices in a Diesel engine-based system, while at the same time the complexity of the engine room is avoided.
Doulgeris et al. [51], gas turbine-based systems are assessed as an alternative for installation on a RoPax fast ferry ship. Simple cycle and intercooled-recuperated configurations are studied. In the method presented, several technical, economic, and environmental parameters concerning the operation of the system during the whole life cycle of the ship are taken into account. The study reports the benefits of using intercooled-recuperated gas turbines in comparison with simple cycle configurations. De Leon et al. [52], the development of a computer simulation framework is described which is used for assessing the differences of the thermodynamic efficiency and other performance characteristics of intercooled−recuperated, intercooled−reheated, and intercooled-reheated-recuperated configurations.
The need for enhanced performance characteristics throughout the whole operating power range of gas turbines used in marine applications, has led to the study of several advanced gas turbine thermodynamic cycles. The off-design operation and performance of an intercooled two-stage compression configuration is studied and optimized for certain operating states in Ji et al. [53].
An important factor considering the possibility of employing gas turbines in the energy system of ships is the potential of using natural gas as a fuel. In the study presented in El-Gohary and Seddiek [54] and further extended in El-Gohary and Ammar [55], a comparison is made regarding the utilization of this type of fuel instead of diesel oil, demonstrating that the thermodynamic performance of the gas turbine operating on natural gas is very close to the case in which diesel oil is used, and that the natural gas can be thought of as a very appealing replacement for diesel oil, taking also into account the other advantages related to the economic and environmental benefits.
Natural gas is ideal for gas turbines and, as a consequence, gas turbines are very good candidates for LNG carriers, where they operate on the boil off gas. A technoeconomic study is presented in El-Gohary [56], where the potential economic benefits of using a gas turbine-based power plant burning LNG instead of reciprocating engines operating on HFO are demonstrated. The possibilities of using combined cycles for power plants of LNG carriers are also examined in Fernández et al. [57], where alternative configurations are proposed as potential solutions for the overall energy system.
In this section, the SDOO of an integrated energy system of ship comprising gas turbines and the possibility of combined cycle is performed. In contrast with the works presented in Dimopoulos et al. [21,22], where the solution is obtained with a two-level approach (level A for synthesis and design and level B for operation), as described in the preceding, a unified approach for the solution of the complete SDOO problem is applied. The general method and the pertaining mathematical formulation are presented in detail in Sakalis and Frangopoulos [24], where a generic type of main engines is considered.
The SDOO problem is initially formulated and solved considering three different types of gas turbine configurations and two types of fuels. Afterwards, the effects that the fuel price and the capital cost have on the optimal solutions for the best performing gas turbine configuration are studied.
It has to be noted that for the present application, the system is considered to be operating in static conditions. This means that the energy profile of the ship is assumed to be adequately approximated by considering a predetermined number of operating modes, which also are characterized by predetermined magnitudes of the loads to be covered and their respective duration during a typical year of ship operation.

Description of the System and Formulation of The Optimization Problem
The system is used for covering the demands for propulsion ( . W p ), electrical ( . W e ) and thermal power ( . Q hl ), during different operating modes of a ship. The number of the operating modes is considered predetermined and equal to N T . The superconfiguration of the system considered is presented in Figure 2.
The gas turbines (GT) are coupled to the propellers by means of a speed reducing gearbox. The exhaust gases of the gas turbines are fed into heat recovery steam generators which produce superheated steam at two pressure levels and saturated steam for potentially covering thermal loads. The superheated steam drives steam turbines; their power outputs can be fed to the propeller and/or to electric generators. The proper allocation of the steam turbine power between the propulsion and the electrical loads is among the results of optimization.
Provision is taken for the possibility that the employment of a steam bottoming cycle may not be an optimal solution. For this reason, the potential inclusion of Diesel generator sets (DG) and fuel fed auxiliary boilers for covering the electrical and thermal loads is considered, which will cover electric and thermal loads also in port, where the main engines and, consequently, the bottoming cycle, do not operate. In any case, the proper allocation of the energy loads among the bottoming cycle components and the independently operating components (that is, the Diesel generator sets and the auxiliary boilers) is to be determined by the optimization procedure. An exhaust gas boiler (EGB) may also be included in the system for covering thermal loads when the exhaust gas flows are not exploited in heat recovery steam generators (HRSGs).
The steam is produced in the existing HRSGs at common pressure levels and it is delivered to collectors, one for each pressure level (only one collector is depicted in Figure 2 for simplicity). Overall, the number of each type of components present in the system and the physical and functional interconnections between them, as also their design characteristics and operating point at each instant of time will collectively be determined by the solution of the optimization problem. The minimization of the present worth cost (PWC) of building and operating the energy system for a predetermined number of years is selected as the optimization objective: (1) In Equation (1), the 1st line includes the capital costs of the components, the 2nd line consists of the fuel costs, and the 3rd line consists of the operating and maintenance costs.
The simulation procedure of the system as a whole is carried out with the purpose of calculating the value of the objective function, which expresses the complete SDOO problem, in a single computational step. In this simulation procedure, proper variables (that are to be used as independent variables of the optimization problem) determine the number of operating components during each operating mode and their proper functional interconnections among them in order for the loads to be covered. This modeling procedure is presented in Sakalis and Frangopoulos [24] and is briefly repeated in the present section for convenience, while the details of the modeling procedure of certain individual components are presented in Section 2.3 and in the aforementioned publication.
For the problem formulation, the operating profile of the energy system is represented (with an acceptable degree of approximation) by a number NT of modes, during which steady state operation is assumed. Each mode y (y = 1, 2, …, NT) has a predetermined duration ty. During each operating In Figure 2, the dots among components imply that the final number of each type of component present will be decided by the optimization procedure.
Overall, the number of each type of components present in the system and the physical and functional interconnections between them, as also their design characteristics and operating point at each instant of time will collectively be determined by the solution of the optimization problem.
The minimization of the present worth cost (PWC) of building and operating the energy system for a predetermined number of years is selected as the optimization objective: In Equation (1), the 1st line includes the capital costs of the components, the 2nd line consists of the fuel costs, and the 3rd line consists of the operating and maintenance costs.
The simulation procedure of the system as a whole is carried out with the purpose of calculating the value of the objective function, which expresses the complete SDOO problem, in a single computational step. In this simulation procedure, proper variables (that are to be used as independent variables of the optimization problem) determine the number of operating components during each operating mode and their proper functional interconnections among them in order for the loads to be covered. This modeling procedure is presented in Sakalis and Frangopoulos [24] and is briefly repeated in the present section for convenience, while the details of the modeling procedure of certain individual components are presented in Section 2.3 and in the aforementioned publication.
For the problem formulation, the operating profile of the energy system is represented (with an acceptable degree of approximation) by a number N T of modes, during which steady state operation is assumed. Each mode y (y = 1, 2, . . . , N T ) has a predetermined duration t y . During each operating mode,  Q hl,z,y is the thermal power covered by the HRSG z to thermal loads (z = 1, . . . , n HRSG,y ), and . Q AB,u,y is the output of auxiliary boiler u (u = 1, . . . , n AB,y ). Due to the fact that the propulsion power may be partially covered by steam turbines, the total power delivered by the gas turbines can be lower than the total power required, and thus it holds that The power output of each of the operating n GT,y engines during mode y is calculated as follows . W GT,1,y = W GT,1,y λ GT,y . W p,y , W GT,1,y ≤ 1 . W GT,x,y = W GT,x,y λ GT,y W GT,i,y , W GT,x,y ≤ 1, 1 < x < n GT,y . W GT,n GT,y ,y = λ GT,y The maximum of the values of n GT,y among all operating modes y will also determine the final number of main engines that will be present in the system: n GT = max n GT,1 , n GT,2 , . . . , n GT,y . . . , n GT,N T The nominal power of each main engine is temporarily set as The nominal power of the main engines on ships is usually slightly oversized (sea margin), in order for the upcoming hull and propeller fouling effects to be counteracted appropriately, as also for the conditions that the ship may operate in adverse weather conditions. In a gas turbine combined cycle, the steam turbine power production is expected to be, in general, much higher than in the case of combined cycle based on Diesel engines, due to the favorable exhaust gas characteristics. By an appropriate design of the bottoming cycle, it is thus possible that the steam turbine may have quite a significant contribution to the propulsion load, affecting, in this way, the appropriate (optimal) operational and nominal characteristics of the gas turbines. The need for sea margin is considered in the determination of the nominal power output of the system in the following way.
Among the operational modes, one will present the highest propulsion load, which is symbolized with . W p,max . The sea margin excess power requirement is herein expressed with Equation (11), which relates the sum of the nominal power rating of the operating gas turbines and the sum of steam turbine propulsion powers symbolized with . W ST,p,ml .
where the index ml implies the aforementioned operating mode in which . W p,max appears and µ s is the sea margin factor, usually taken equal to 0.85.
For the sum of the steam turbine propulsion powers in mode ml, the following equation must hold. .
where λ GT,ml is the fraction of propulsion power . W p,max delivered by the gas turbines and is an independent variable of the optimization problem. If the characteristics of the steam produced cannot result in an . W ST,p,ml sufficient for covering . W p,max , then the candidate solution is discarded by the optimization procedure as nonfeasible.
Equations (11) and (12) lead to inequality (13), which expresses the requirement for the sum of nominal power ratings of the gas turbines: If inequality (13) does not hold, the values of . W GTi,N,temp are proportionally increased until (13) holds as an equality, and the temporary values . W GTi,N,temp,sm are obtained. The nominal power rating for each gas turbine x is finally determined by the equation The fuel consumption . m f GTx,y and exhaust gas properties (mass flow rate . m gGTx,y and temperature T gGTx,y ) of each of the main engines can afterwards be calculated (as the nominal power rating and partial load brake powers are already determined) for each mode by applying the computational simulation procedures of gas turbines described in Section 2.3.
In each operating mode y, the exhaust gas inlet in the HRSG z is determined according to where each g x,y variable refers to gas turbine x and denotes the number of the HRSG towards which its exhaust gas is driven.  (17) where m g,mult and T g,mult are intended to be used as independent optimization variables.
The bottoming cycle operates at two pressure levels-P HP and P LP -common among the HRSGs. In nominal conditions of operation for HRSG z, during which the exhaust gas characteristics are determined by Equations (16) and (17), the steam produced in the two pressure levels for feeding the turbines will have mass flow rates m LPz , T HPz , and T LPz for HRSG z are to be used as inputs for simulating the integrated energy system. With values for these variables set, the design procedure described in Section 2.3.2 can be initiated for each HRSG. The design procedure is used for the determination of the heat exchange areas throughout the HRSG and with these areas determined, the off-design operation properties of steam (that is, mass flow rates . m HPz,y and . m LPz,y and temperatures T HPz,y and T LPz,y ) can also be calculated. The total mass flow rates . m HP,COL,y and . m LP,COL,y , in each steam collector, before feeding the turbines, are readily calculated with mass balances, and the respective temperatures T HP,COL,y and T LP,COL,y after stream mixing is determined by energy balances.
For the determination of the steam mass flow rate delivered to each turbine, the following equations hold (for the high-pressure level).
. m HP,n ST,y ,y = . m HP,COL,y − where n ST,y represents the number of steam turbines that operate during mode y.
Similar equations are used for the low pressure level. During design point operation, the pressure levels at the steam turbine inlets are the same with the ones of HRSGs.
With the values of intensive and extensive thermodynamic properties of the steam feeding the steam turbines at the regarded as design point operation, the steam turbine design procedure described in detail in Sakalis and Frangopoulos [24], is applied, the design power production is calculated, and off-design power assessment can also be carried out. The power . W STv,y produced by steam turbine v is allocated between propulsion and electrical loads during each mode y. The following equation must hold for the propulsion parts.
If during mode y the number of operating steam turbines n ST,y is higher than one, their total propulsion power is allocated among them in proportion to the total power output of each one: .
The total electrical power produced by the steam turbine generators, is calculated as the power that remains (if any) after the covering of the propulsion load: The total power delivered by the Diesel generator sets . W DG,TOT,y is readily calculated with the following equation, in case that total electrical power delivered by the steam turbines is not sufficient to cover the loads: In Equation (26), . W e,y is the total electric load during mode y. During mode y, n DG,y Diesel generator sets will be operating. If n DG,y > 1, the power delivered by each Diesel generator set x, . W DG,x,y , will be calculated with the following equations.
Variables . W DGN,x,mult are used for the determination of the nominal power rating of the Diesel generator x, similarly to the case of main engines.
The thermal load during mode y is allocated between the HRSGs and the auxiliary boiler as follows .
The .
Q hl,HRSG,TOT,y is allocated among the HRSGs accordingly: . Q hl,1,y = Q hl,1,y . Q hl,HRSG,TOT,y , Q hl,1,y ≤ 1, v . Q hl,z,y = Q hl,z,y Q hl,i,y , Q hl,z,y ≤ 1, 1 < z < n HRSG,y The EGB, which may be included, is employed only in cases in which exhaust gas is available from any engine because it is not exploited for the production of superheated steam (due to technical reasons or because this could be dictated by an optimal solution), so that its heat content can be used for covering thermal loads only.
Equations (2)-(34) are a closed form set of equations which is used for the determination of the number of operating components as well as heir functional interconnections that should exist in order for the energy system to fulfill its purpose. This number and the functional interconnections may be different among different operating modes. The final synthesis of the system is thus dependent on the "temporary" syntheses during each mode. Furthermore, the component design characteristics are determined in a procedure that takes into account the different values of the loads to be covered during all of the operating modes.
Generally, the inputs to the model of the overall system are intended to be used as independent variables of the optimization problem, which are collectively reported in Table 1. The optimization problem formulated is of the mixed integer nonlinear programing type and is solved with the use of genetic algorithms (the number of variables for voyage operating modes is N T −1, while number N T is reserved for harbor operating mode). Table 1. Independent variables of the optimization problem.

Modeling of Individual Components
In the present section, the simulation models used for the gas turbine configurations and the HRSGs operating in conjunction with this type of main engines are presented. Modeling of other components, as well as the individual heat exchangers appearing in the HRSGs, is presented in detail in Sakalis and Frangopoulos [24].

Modeling of Gas Turbines
Three different gas turbine types depicted in Figure 3 are considered as main engines. All three have a separate power turbine coupled to the propeller. Types with a separate power turbine are favorable for mechanical ship propulsion, as the rotational speed of the propeller is low and highly variant, and particularly so in case of a fixed pitch propeller.  All three have a separate power turbine coupled to the propeller. Types with a separate power turbine are favorable for mechanical ship propulsion, as the rotational speed of the propeller is low and highly variant, and particularly so in case of a fixed pitch propeller.
Modeling and optimization is performed with two alternative fuels for each configuration: Marine Diesel Oil (MDO), with a lower heating value LHVMDO = 42,500 kJ/kg, and natural gas (NG), with LHVNG = 47,100 kJ/kg and composition as presented in Table 2. For the simulation of the three gas turbine types, a dedicated software has been developed by the NTUA Laboratory of Thermal Turbomachines [58], which calculates all the intensive and extensive thermodynamic properties of the working medium throughout the system, according to design point specifications and the operation point (off-design operation). Real gas properties are used throughout the configurations; isentropic efficiencies are calculated according to the gas properties and pressure ratios with the incorporation of loss models, the combustion process is based on specialized simulation procedures according to chemical kinetics and, regarding the off-design operation, appropriate maps are generated for the compressors and turbines.
For the integration of gas turbines in the simulation of the overall superconfiguration of the energy system, this simulation program is used for the calculation of the specific fuel consumption Modeling and optimization is performed with two alternative fuels for each configuration: Marine Diesel Oil (MDO), with a lower heating value LHV MDO = 42,500 kJ/kg, and natural gas (NG), with LHV NG = 47,100 kJ/kg and composition as presented in Table 2. For the simulation of the three gas turbine types, a dedicated software has been developed by the NTUA Laboratory of Thermal Turbomachines [58], which calculates all the intensive and extensive thermodynamic properties of the working medium throughout the system, according to design point specifications and the operation point (off-design operation). Real gas properties are used throughout the configurations; isentropic efficiencies are calculated according to the gas properties and pressure ratios with the incorporation of loss models, the combustion process is based on specialized simulation procedures according to chemical kinetics and, regarding the off-design operation, appropriate maps are generated for the compressors and turbines.
For the integration of gas turbines in the simulation of the overall superconfiguration of the energy system, this simulation program is used for the calculation of the specific fuel consumption SFC, the mass flow rate . m g and the temperature T g of the exhaust gases as functions of the nominal power output and the load factor. The following general mathematical form is thus obtained: The capital cost of the gas turbines is estimated as described in Appendix A, based on the cost model presented in Frangopoulos [59].

Modeling of Heat Recovery Steam Generators
Each HRSG consists of a water preheater, low pressure economizer, evaporator and superheater, and high-pressure economizer, evaporator, and superheater (Figure 4), which are multipass heat exchangers. The HRSG feeds the steam turbine (points 14 and 25 in Figure 4 with mass flow rates . m LP and . m HP , respectively), while a fraction of the saturated low pressure steam is used for thermal loads (point 17 with mass flow rate . m hl ). A deaerator is also integrated with the HRSG, and a heating stream (point 31, . m da ) originating from the low pressure drum is used, if necessary, for heating the feed water to the appropriate conditions for deaeration.
In the design algorithm, mass and energy balances are initially performed throughout the HRSG, which give the thermodynamic state of the fluids at the various points. Several checks are performed for ensuring feasibility of the design with the inputs given, which can be thought of as constraints of the SDOO of the system. Examples of constraints are the minimum temperature difference between fluids in each heat exchanger, the minimum exhaust gas temperature at the exit of the HRSG (specified at 130 °C for MDO and 100 °C for natural gas), the minimum temperature of water at the inlet of the HRSG (specified at 105 °C for MDO and 75 °C for natural gas), and the requirement that no steaming will be induced in the economizers and the preheater by an excessive heat transfer.
After the initial mass and energy balance calculations, each heat exchanger is designed with the P−NTU or the ε NTU  method according to its type, with the procedure described in Sakalis and Frangopoulos [24]. Among the results are the structural characteristics and the heat exchange surface area of each heat exchanger, which are also required for the simulation of off-design operation.  Each HRSG is designed according to the procedure described in Sakalis and Frangopoulos [24]. The required inputs include the nominal exhaust gas properties (mass flow rate . m gz and temperature T gz , which correspond to the point g1 in Figure 4), steam pressure levels (P HP and P LP ), and steam mass flow rates and temperatures ( . m HPz and . m LPz and T HPz , and T LPz ). These quantities are calculated before the HRSG design algorithm is applied, during the modeling of the system as a whole, or they are used as independent variables of the SDOO problem [24].
In the design algorithm, mass and energy balances are initially performed throughout the HRSG, which give the thermodynamic state of the fluids at the various points. Several checks are performed for ensuring feasibility of the design with the inputs given, which can be thought of as constraints of the SDOO of the system. Examples of constraints are the minimum temperature difference between fluids in each heat exchanger, the minimum exhaust gas temperature at the exit of the HRSG (specified at 130 • C for MDO and 100 • C for natural gas), the minimum temperature of water at the inlet of the HRSG (specified at 105 • C for MDO and 75 • C for natural gas), and the requirement that no steaming will be induced in the economizers and the preheater by an excessive heat transfer.
After the initial mass and energy balance calculations, each heat exchanger is designed with the P−NTU or the ε − NTU method according to its type, with the procedure described in Sakalis and Frangopoulos [24]. Among the results are the structural characteristics and the heat exchange surface area of each heat exchanger, which are also required for the simulation of off-design operation.
In operating mode y, HRSG z will be fed with exhaust gas of mass flow rate . m gz,y and temperature T gz,y that will be, in general, different from the nominal ones ( . m gz and T gz referred Energies 2019, 12, 893 16 of 50 above). The off-design operation is simulated with a computational algorithm developed for this purpose. Heat balances and heat transfer calculations with the P−NTU or the ε − NTU method for each heat exchanger are again performed, resulting in a system of nonlinear equations, in which the values of heat transfer areas are now fixed. By solving this system of equations, the feasibility of off-design operation with the particular values of . m gz,y and T gz,y is investigated for each operating mode y. If the operation is feasible, the final outcomes of the off-design simulation algorithm include the mass flow rates . m HPz,y , . m LPz,y , and temperatures T HPz,y and T LPz,y of the steam (points 25 and 14, respectively), during each operating mode y of the system.

Other Components
The steam turbines included in the system are designed according to the procedure described in Sakalis and Frangopoulos [24]. The main required inputs for the design, from the point of view of the integrated system, are the mass flow rates and the thermodynamic properties of the steam streams feeding the turbines. After the design has taken place, the off-design performance and power production can be calculated with dedicated simulation algorithms also presented in the aforementioned publication.
The Diesel generator sets are simulated with regression models developed from data available from manufactures. Essentially, for the purposes of the present work, the quantity that has to be calculated is the fuel consumption; the related regression models are functions of the design power and the load factor (in the same sense as in Equation (35)).
The EGB consists of an economizer, an evaporator and a steam drum only, and the procedures for its design and operation are similar to those of the HRSGs. For the auxiliary boilers, it is considered that they operate with constant thermal efficiency and their design power output is equal to the maximum operating that is presented to each of them.

Application Examples
The SDOO problem for the system of Figure 2 with minimization of the present worth cost as objective is first solved for each one of the six combinations of gas turbine type ( Figure 3) and fuel (MDO, NG). Then a parametric study with respect to fuel price and capital cost is presented.

Data and Assumptions
The annual energy profile of the ship is assumed to be satisfactorily represented with three voyage modes and one harbor mode, with energy needs and duration as given in Table 3. The values of pertinent economic parameters, including nominal prices of fuels and operation and maintenance unit costs (excluding fuel), are given in Table 4 (O&M costs are estimated with adaptation of data presented initially in Dimopoulos and Frangopoulos [22]). In Table 4, N Y is the number of years of operation of the system, f is the inflation rate, and i is the market interest rate.  The solution of the SDOO problem results in the same optimal synthesis of the system for all six combinations of gas turbine type and fuels: it consists of one unit of each type, as given in Table 5. It is noted that, as an optimization constraint, the maximum number for each type of units was set equal to two. It is noted that one Diesel generator set is included in the optimal configuration, as also one auxiliary boiler, because they are needed for port operation (mode 4), while during the three voyage modes, the electrical and thermal loads are covered by the steam bottoming cycle. Table 5. Optimal synthesis of the system.
The optimal design characteristics of the components and their capital cost for the six cases are presented in Table 6.  Figure 5 depicts the simulation results for the specific fuel consumption and exhaust gas mass flow rate and temperature as functions of the load factor, for the three gas turbine types operating on MDO presented in Table 6. The curves for operation with natural gas have similar forms. Type (a) Energies 2019, 12, 893 18 of 50 (simple gas turbine) has the largest specific fuel consumption, which also exhibits a larger increase as the load factor decreases.
(simple gas turbine) has the largest specific fuel consumption, which also exhibits a larger increase as the load factor decreases.
The results in Table 6 show that, in the optimal design, the power capacity of the steam bottoming cycle (thermal power of HRSG and mechanical power of the steam turbine) decreases as the complexity of the gas turbine type increases from (a) to (c) (Figure 3). This tendency can be attributed to the fact that the thermal efficiency of the gas turbine unit increases as its thermodynamic cycle becomes more advanced ( Figure 5), with consequence the production of exhaust gases with decreasing energy content, i.e., decreasing capacity for additional power production.   (36) As seen from the design and operational characteristics of the systems, gas turbine type (a) gives the largest potential of power production with a bottoming cycle for both fuels. Its higher specific fuel consumption is counterbalanced by the exploitation of the thermal energy content of the exhaust gases, which results in a higher contribution of the steam turbine power to the propulsion load and to the lowest annual fuel cost among the three types. Furthermore, the combined cycle specific fuel consumption is the lowest when type (a) is used. The results in Table 6 show that, in the optimal design, the power capacity of the steam bottoming cycle (thermal power of HRSG and mechanical power of the steam turbine) decreases as the complexity of the gas turbine type increases from (a) to (c) (Figure 3). This tendency can be attributed to the fact that the thermal efficiency of the gas turbine unit increases as its thermodynamic cycle becomes more advanced ( Figure 5), with consequence the production of exhaust gases with decreasing energy content, i.e., decreasing capacity for additional power production.
The operational technical and economic characteristics of the six combinations are presented in Tables 7-12, where SFC GT and SFC CC refer to the specific fuel consumption of the gas turbine unit and the combined cycle, respectively. In the general case where more than one main engines or steam turbines operate in any mode y, the SFC CC can be defined as follows As seen from the design and operational characteristics of the systems, gas turbine type (a) gives the largest potential of power production with a bottoming cycle for both fuels. Its higher specific fuel consumption is counterbalanced by the exploitation of the thermal energy content of the exhaust gases, which results in a higher contribution of the steam turbine power to the propulsion load and to the lowest annual fuel cost among the three types. Furthermore, the combined cycle specific fuel consumption is the lowest when type (a) is used.      The PWC (objective function) for each one of the six combinations is presented in Table 13, and is lower when type (a) is used for both fuels. As seen, the simplest of the gas turbine types is the best choice in terms of PWC, even if the specific fuel consumption of the gas turbine itself is higher. Furthermore, the simplicity of construction of this type of gas turbine in comparison to the two other types studied probably makes it more appealing for application in integrated ship energy systems. For these reasons, the effects that important parameters have on the optimal solution are investigated for energy systems in which gas turbines of type (a) are used. For the system with gas turbine type (a), which has the best economic performance, the variations of the optimal solution with varying fuel price have been investigated. For this purpose, the SDOO problem has been solved for price of MDO in the range of 300 to 700 $/ton and natural gas price in the range of 100 to 300 $/ton, while the rest of parameters remain at their nominal values. The synthesis of the system remains unaltered and is the same as reported in Table 5, i.e., the inclusion of steam bottoming cycle is economically feasible in all cases. The design characteristics of the system components are given in Tables 14 and 15 for the various prices of MDO and natural gas, respectively.  W GT is diagrammatically presented in Figure 6a,b for three voyage modes as functions of the fuel price. It is generally noticed that as the fuel price increases, the steam bottoming cycle recovers more thermal energy from the exhaust gas and produces more mechanical power during all operating modes, with this trend being more evident in the case of natural gas.
With both fuels, and in the whole range of fuel prices examined, the fraction . W ST / . W GT has a significantly large value, indicating the importance of the steam bottoming cycle in energy systems where gas turbines are used as main engines. One more important attribute observed in Figure 6a,b is that the value of the fraction . W ST / . W GT increases significantly in operating mode 3; mode 2 is higher than in mode 1, as in mode 1 the gas turbine operates closer to the nominal power rating and has higher thermal efficiency. This means that the design of the bottoming cycle is carried out in a way that the need for increasing the thermal efficiency of the overall energy system in modes where the main engine does not operate quite efficiently is taken into account in the optimization procedure.

Effect of Capital Cost on Optimal Solutions
For the system with gas turbine type (a), the effect of the capital cost on the optimal solution has also been investigated. For this purpose, the components capital costs were multiplied with a capital cost factor, which was given the values 0.5 and 2, and the optimization problems were solved for both fuels. The optimal synthesis of the system again remains unaltered. The variation of the design characteristics of the components is reported in Table 17.  The optimal PWC of the investment for varying fuel price is presented in Table 16. The variation of the PWC with the fuel price is nearly linear for both fuels, indicating the major contribution that the cost of fuel has on the objective function.

Effect of Capital Cost on Optimal Solutions
For the system with gas turbine type (a), the effect of the capital cost on the optimal solution has also been investigated. For this purpose, the components capital costs were multiplied with a capital cost factor, which was given the values 0.5 and 2, and the optimization problems were solved for both fuels. The optimal synthesis of the system again remains unaltered. The variation of the design characteristics of the components is reported in Table 17.     The capital cost of the bottoming cycle components is given in Table 18, along with the O&M PWC of the bottoming cycle. The increased power production in the case of natural gas for capital cost factor 0.5 is reflected in the increased related O&M cost.

General Comments on the Results of Section 2
The method for the synthesis, design, and operation optimization of integrated energy systems of ships, presented in a preceding paper, has been applied here properly supplemented with additional steps for the SDOO of a system with gas turbines in three different types as main engines operating either on MDO or natural gas. It is found that, with minimization of the present worth cost of the system as objective and for the values of parameters considered in this study, a steam bottoming cycle is always feasible, while the simple gas turbine configuration results in the lowest value of the present worth cost. The effect of varying fuel prices and capital costs on the optimal synthesis, design and operation of the system is further investigated.
The increase of fuel price results in a steam bottoming cycle of, generally, increased power capacity. Also, the fact that the MDO price is, in general, higher than the price of natural gas (per unit of fuel energy) results in a bottoming cycle of higher capacity. The capital costs also affect the optimization results with the effect being stronger in case of natural gas.
The modeling of the system and the procedure for solution of the synthesis, design and operation optimization problem allow for taking into consideration the effects of all the operating modes simultaneously.

Description of the System
In this problem, the optimal SDO of an integrated energy system of a ship that will serve all energy demands is requested, taking into consideration weather conditions changing with space and time.
The problem is specified in an appropriate way that simultaneously the time horizon of a whole year of operation is considered. Specifically, the ship performs a characteristic round trip (between ports A and B) which includes the necessary amount of time (and service of energy needs) that is required while staying at both ports. The duration of each trip (in all round trips) for each season is variable and under optimization. In that way, the number of round trips per season and consequently the total number of round trips per year is not fixed, but it is also optimized. It is noted that the number of round trips for each season can be a decimal number so as to model the (possible) passage from one season to the next in the same round trip. However, the problem is set in an appropriate manner so as the total number of annual round trips is an integer.
The propulsion power demand is not prespecified, because it is a function of speed and weather conditions. The ship speed at any instant of time is an optimization variable. Also, the wind speed and direction encountered by the ship during each trip, for each season, are given as inputs. The wave height and direction are then calculated, since they are correlated with the wind speed with the help of the Beaufort scale. Once these parameters are determined, the resistance and propulsion power calculations are performed.
The electrical and thermal loads are also parameters of the problem and are given as inputs. They are defined to vary with time but in a different manner for each of the four seasons.
In Figure 8, a superconfiguration of the ship energy system is presented. Three types of gas turbines, 4-stroke Diesel engines and 2-stroke Diesel engines are available as technology alternatives for the synthesis of the propulsion plant. The number and type of propulsion engines that will be installed is determined by the optimization and they will drive a single propeller. Furthermore, single-pressure HRSGs and steam turbine(s) may be installed. Saturated steam extraction from the drum of the HRSGs will be used to, completely or partly, serve the ship thermal demands, while the superheated steam produced by the HRSGs will be led to the steam turbine(s). The number of HRSGs and STs that will be installed is again determined by the optimization. The produced steam turbine(s) power will be distributed between the propeller and a generator, which will supply electric power for the electric loads. Finally, a number of (decided by the optimization) Diesel generator sets and an auxiliary boiler will be included in the system, in order to supply electric and thermal power during voyages, if the STGs and HRSGs cannot completely satisfy the demands. Also, the thermal and electric demands in ports will be completely served by the auxiliary boiler and Diesel generator set(s). the thermal and electric demands in ports will be completely served by the auxiliary boiler and Diesel generator set(s). For each trip, a suitable freight rate is defined and, thus, the corresponding revenue can be calculated. The economic criterion that serves as the objective function of the optimization problem is the Net Present Value (NPV) after 20 years of operation and the goal is its maximization. The problem is solved for the nominal parameter values; then, a parametric study for the fuel price and the freight rate is performed.

Mathematical Statement of the Optimization Problem
The dynamic optimization problem can be mathematically stated using a Differential Algebraic Equation ( PWC present worth cost: For each trip, a suitable freight rate is defined and, thus, the corresponding revenue can be calculated. The economic criterion that serves as the objective function of the optimization problem is the Net Present Value (NPV) after 20 years of operation and the goal is its maximization. The problem is solved for the nominal parameter values; then, a parametric study for the fuel price and the freight rate is performed.

Mathematical Statement of the Optimization Problem
The dynamic optimization problem can be mathematically stated using a Differential Algebraic Equation (DAE) formulation. The objective function, maximization of the NPV, is stated mathematically as max → x , where PWC present worth cost: where . W STG,l lth steam turbine generator power for serving electric loads, . W ST,l lth steam turbine power output, . W DG,m mth Diesel generator set power output. Indexes j, k, l, and m run through all the values from 0 up to an upper value. At the beginning of the optimization, the upper values of indexes j, k, l, and m are not fixed, since they are in fact defined by the values of their respective integer synthesis variables. However, they are bound from above with the same upper bounds of these respective integer synthesis variables, which must be well determined and fixed at the start of the optimization. Specifically, as can be seen from Equation (47), the upper value of index j depends on the index i which determines the type of propulsion equipment and from the respective value of the, under optimization, integer variable that determines how many components of type i will be installed. Thus, the integer values of the synthesis control variables dictate the number of the design and operation variables for the components. Variable y AB that determines the existence of the auxiliary boiler is binary. In both cases of integer and binary variables, value 0 denotes that the unit is not installed. The main differential variables for the specific problem are as follows. The distance travelled by the ship: The fuel consumption of the propulsion engines and Diesel generator sets, given by the product of the Specific Fuel Consumption (SFC) with the produced brake power as (54) and the fuel consumption of the auxiliary boiler where the efficiency of the boiler, η AB , is considered a constant parameter. Another family of differential variables is derived from the energy output of each component, which is generally given as The operational costs of the system, such as the fuel and operation and maintenance costs for each component, are calculated based on the energy output and the fuel consumption of each component. The capital costs for each component are calculated using the values of the design variables. For the gas turbines, the cost function given in Appendix A has been used. For the remaining components, the capital costs are calculated as described in Tzortzis and Frangopoulos [60].
Since the propulsion plant characteristics, i.e., type, number, and nominal power of the engines, are not known in advance but they are derived by optimization, the Specific Fuel Consumption (SFC) should not be given only as a function of the load factor. Thus, based on appropriate models and manufacturer data, SFC surfaces are constructed, where the SFC for each engine of type i as well as the exhaust gas properties (mass flow rate and temperature) are given as functions of the nominal power and the load factor. The same procedure is also applied in the modeling of Diesel generator sets SFC and exhaust gas properties. The models used for the propulsion engines and the Diesel generator sets are presented in Section 3.3.
The sum of the brake power of the main engines and the steam turbine(s) must be equal to the brake power demand, as stated by the equality constraint of Equation (57). Also, the electric and thermal power produced by the integrated system must be equal to the electric and thermal demands of the ship, as stated in Equations (58) and (59), respectively. Q: thermal load. It is noted that the brake power demand is calculated as a function of the ship resistance, R tot , propulsive efficiency, η prop , and ship speed, V, as where, WS: weather state and; p: constant parameters describing the vessel. Also, there are a significant number of equalities and inequalities related to the simulation of each component, but their full presentation is beyond the limits of this text. Noteworthy inequality constraints include the bounds imposed on the speed of the ship and the load factor, f L , of all components (main engines, steam turbines, Diesel generator sets, etc.) that ensure the compliance with the operational limits specified by the manufacturer: Of course, all control variables are accompanied by upper and lower bounds. However, the upper and lower bounds may not be necessary for all state variables.
Finally, additional constraints can easily be imposed by emission regulations if, for example, the ship travels within emission controlled areas (ECAs). However, such a scenario is not studied in this work.

Modeling of Main Components
For the simulation of the individual components (at both design and off-design operating points) that constitute the integrated marine energy system presented in Figure 8, specific models are used that can be divided in two categories. Those that have been developed using a first principles approach combined with literature data, such as the models for the single pressure HRSG, the ST and the resistance-propulsion model, and those that are based on regression analysis of data, such as the models for the Diesel engines (two and four stroke), the auxiliary boiler and the DG sets. All details considering the mathematical formulation of these models, the specific values of all model parameters and the relative references can be found in Tzortzis and Frangopoulos [60].
For each of these components, apart from performance models, cost models for the capital cost of equipment and for the operation and maintenance costs are also developed. Again, the corresponding equations, values of parameters and references can be found in Tzortzis and Frangopoulos [60].
Considering the GTs, the same modeling procedure, in terms of performance and in terms of (capital and operation and maintenance) costs that was described in Section 2, is applied.

Treatment of Synthesis Variables, Solution Procedure and Related Software
According to the mathematical statement presented in Section 3.2, the problem is stated (and consequently treated by the optimization procedure) in a single level as a Mixed Integer Dynamic Optimization Problem (MIDO). The distinction between the three levels of synthesis, design, and operation is only conceptual; however, it is reflected in the general mathematical formulation in terms of the type of variables used to describe each level.
For the level of operation continuous real variables are used that change at each instant of time, for the level of design "static" or invariant real variables are used, and for the level of synthesis integer and binary static variables are used.
The values of the integer synthesis variables have a tremendous effect on the whole problem, since the specific value of each variable affects the underlying design and operation levels in terms of the number of (design and operation) variables that should be present in the problem as well as in terms of the underlying system of equations. Essentially, this means that each time one integer variable changes value, the optimization problem must be reformulated either by adding the necessary extra variables and their related equations or by subtracting them, depending on the increase or the decrease of the value of the integer variable.
Of course, this adversity could be treated by using a conventional "if . . . then . . . else" custom algorithmic formulation for each integer variable, where for each value of the variable the underlying system (variables and equations) would be reformulated. However, this would not be a true single-level treatment of the problem, and it would be impossible to apply any gradient based dynamic optimization method for the solution of the problem. Furthermore, the complexity of the required code would be highly increased.
In order to tackle with this specific difficulty, a transcription technique of integer variables to binary variables based on the idea of the superconfiguration (Figure 8) has been applied. The idea is to simultaneously consider all possible technology alternatives of the system and for each alternative to consider the maximum number of units, given by the upper bound of the respective integer variable. Then, each unit can be represented by a binary variable that determines the existence or not of the said unit. In this way, each integer variable that is present in the formulation of Section 3.2 is translated into a series of binary variables and thus all integer variables are eliminated from the system. In other words, each value of each integer variable now corresponds to a binary variable.
Furthermore, since now only binary variables are used, it can be arranged so that the value 1 corresponds to the existence of the specific component while the value 0 will correspond to the exclusion of the specific component from the system. This feature can be used to our advantage, since now, instead of using an "if . . . then . . . else" strategy, a more compact formulation can be applied. The problem can be stated with the maximum possible number of design and operation variables with all their accompanying equations (model equations, constraints, costs, etc.) multiplied by the respected binary variable. The idea is that, if the optimizer dictates the installation of a component (thus it will set the relative binary variable equal to 1) the accompanying system of equations will not be affected. The cost calculations, pertinent to the component, will participate in the objective function calculations and the relative gradients will not be zero. However, if the relative binary variable is set to zero, although all relative to the component variables and equations will still be present in the system, they will not affect the optimization.
In order to solve the MIDO problem posed in this study, a direct sequential method (Figure 9) is selected and implemented. The basic procedure is presented in Figure 9 and is summarized as follows.

1.
Insertion of the initial value of the duration of each control interval and the initial values of the control variables over each interval.

2.
Integration of the dynamic system model over the entire time horizon and determination of the variation (with time) of all state variables in the system.

3.
Calculation of the values of the objective function and constraints as well as the values of their partial derivatives (sensitivities) with respect to all quantities specified. 4.
Revision of the choices made on step 1 by a suitable NLP optimizer and repetition of the procedure until convergence criteria are met.
Energies 2019, 12, x FOR PEER REVIEW 35 of 53 exclusion of the specific component from the system. This feature can be used to our advantage, since now, instead of using an "if…then…else" strategy, a more compact formulation can be applied. The problem can be stated with the maximum possible number of design and operation variables with all their accompanying equations (model equations, constraints, costs, etc.) multiplied by the respected binary variable. The idea is that, if the optimizer dictates the installation of a component (thus it will set the relative binary variable equal to 1) the accompanying system of equations will not be affected. The cost calculations, pertinent to the component, will participate in the objective function calculations and the relative gradients will not be zero. However, if the relative binary variable is set to zero, although all relative to the component variables and equations will still be present in the system, they will not affect the optimization. In order to solve the MIDO problem posed in this study, a direct sequential method (Figure 9) is selected and implemented. The basic procedure is presented in Figure 9 and is summarized as follows.  The application of the sequential method and the dynamic simulation of the models used to calculate ship resistance, propulsion, performance of main engines, HRSGs, steam turbines, and Diesel generator set units and their interconnections, as well as the effects of the dynamically varying weather and loads, was implemented in the commercial gPROMS ® software. For the control variables a piecewise constant parameterization scheme, over equally spaced time intervals, is selected. In the gPROMS ® environment, the overall direct sequential method is implemented via the solver CVP_SS. The user imports the control variable parameterization and CVP_SS links everything to the NLPSQP solver which handles the NLP optimization problem. The DAE problem is tackled by the DASOLV solver, which also performs the computation of sensitivities. The BDNLSOL solver performs the initialization and re-initialization activities when DASOLV is used for simulation. Finally, the OAERAP solver handles the mixed integer part of the problem (i.e., the binary variables). Details on all solvers are available in the gPROMS®user guides [61], which can be downloaded from the PSE website.
Often in the literature, as well as in the gPROMS ® documentation, the sequential method presented above is referred to as a "single shooting" method. The term is derived from step 2 of the algorithm presented above, which involves a single integration of the dynamic model (DAE system of equations) over the entire time horizon. Further details about the single shooting methods can be found in the literature [62].

Data and Assumptions
A containership with carrying capacity of 9572 TEU and DWT of 111,529 MT is considered that for each season performs a characteristic round trip between ports A and B−d AB = 3000 nm. All vessel characteristics, such as ship dimensions and coefficients, which are used in order to provide an accurate calculation of ship resistance and required propulsion power, are given in Table 19. The operational profile of the ship is approximated with four modes of operation (loading and off-loading at ports, loaded trip from port A to port B and loaded trip for port B to port A). In this study, maneuvering periods are not considered since their duration is much shorter compared to the duration of the whole round trip. Thus, their effect on the objective function can be neglected. The time schedule of the ship for each round trip and all seasons is given in Table 20. The electric and thermal loads used as inputs are given in Tables 21 and 22. They are defined as functions of time for an 8-day time horizon, differing for each season; also, they are considered constant at ports. The wind speed is a function of time and space for each season and can be found in Tables A2-A5 (Appendix B). The wind direction is given in Table A6, also as a function of time and space, but is assumed to remain constant over all seasons. All data have been gathered from internet sites that are accessible to anyone, which are specialized in accurate real-time, as well as historical weather data, for any region (sea or land) [63].
Values of certain cost parameters that are used for the PWC and NPV calculations are given in Table 23. For the gas turbines, MDO is considered as fuel with a Lower Heating Value (LHV) of 42,700 kJ/kg, while for the 2-X Diesel engines, the 4-X Diesel engines, the Diesel generator sets, and the auxiliary boiler, HFO is considered as a fuel with a lower heating value (LHV) of 39,550 kJ/kg. In Table 24, a list of lower and upper bounds of certain SDO variables is presented. Details regarding several numerical solution parameters are given in Table 25. It is noted that each control variable is essentially decomposed to a number of static variables; in fact, as many as the number of intervals used for the time horizon discretization, which leads to a significant increase in the scale of the problem and, consequently, the computing time. The optimal synthesis and design of the system are presented in Tables 26 and 27. Optimal round trip durations and number of round trips for each season are given in Table 28. Optimal cost values for each component of the system and revenues are given in Table 29. Optimal values of certain control variables per time interval and season are presented in Tables 30-33.    The optimal NPV after 20 years of operation is 149,176,017€. The optimal number of total round trips per year is 17. The optimization was completed in 11,060 s, performing 41 major NLP iterations.
For the nominal values of fuel price and freight rate, one 2-stroke Diesel engine with a single HRSG, a single ST, and one Diesel generator set are installed.
Thermal loads are always fully covered by the bottoming cycle and the ST power output is given to serve the electric loads with the exception of the return trip in winter, when brake power demand is the highest and 35%-on average-of the ST power output is directed to the propeller.

Parametric Study for Fuel Cost and Freight Rate
For the sensitivity analysis, variation of the fuel price and the freight rate is considered. For the fuel price, four more values were considered: 200, 400, 500, and 600 €/ton, in addition to the nominal value of 300 €/ton. For the freight rate, apart from the nominal, the double price is also considered. Sensitivity analysis results for the optimal synthesis and design characteristics of the system are presented in Tables 34-37. The variation of the optimal NPV is given in Tables 38 and 39. Tables 40-43 summarize the effect of fuel price and freight rate on the optimal trip durations and number of round trips per season for the whole year.  For all fuel price and freight rate values a single two-stroke Diesel engine was installed. For both freight rates and fuel prices 300 €/ton and above, a bottoming cycle was installed with a single HRSG and ST, while for fuel price 200 €/ton and all freight rates no bottoming cycle was installed. For double freight rate and a fuel price equal to or higher than 300 €/ton, two Diesel generator sets were installed, while in all other cases a single Diesel generator set was selected. Thermal loads are always fully covered by the bottoming cycle, when installed; alternatively an auxiliary boiler of higher nominal power output is installed.
Trip durations generally seem to increase as fuel price rises (need for cost effective system) and for nominal freight rate and fuel price 400 €/ton and above they reach their upper limit. Also, it is For nominal freight rate and fuel price values 300 €/ton and above, the Diesel engine nominal power was low (21-24 MW) since speeds decreased, thus reducing the available thermal energy of the exhaust gases. As a result a ST of~750-850 kW was designed in all cases. Due to the small power output of the ST, the installation of one Diesel generator set is optimal since no more than 50% of the electric loads can be covered during trips by the STG even if all the ST power output was directed to the electric loads.
For double freight rate, ship speeds are higher and thus the nominal power output is higher . This means that the bottoming cycle system is of higher nominal power output too and can serve a larger percentage of electric loads during trips (when compared to the nominal freight rate cases) leaving only a small remainder that is covered by a DG set of low power output. Thus, two Diesel generator sets are installed: one of relatively low power output (350-700 kW), that covers the remainder electric loads that the STG cannot cover during trips and one of higher power output (800-1200 kW) that operates at ports, in parallel with the first one. Also, the second DG set operates during winter (trip from port A to port B) since then the ST power is mainly diverted to the propeller in order to accommodate the high brake power demands. If a single DG set was to be installed, it would have to be of adequate power output in order to serve the electric demand at ports (1500 kW) and thus it would operate in very low load factors in order to cover the low remaining electric demands during trips. This would be very inefficient in terms of SFC and thus not optimal.
Considering the number of total round trips per year, it is noted that the maximum number of round trips per year is observed in the smallest fuel price for both freight rates. For nominal freight rate, the number of round trips per year remains the same (at its lower limit) for fuel price 400 €/ton and above, while for double freight rate, the number of round trips per year decreases as the fuel price increases. It is evident that, as freight rates increase, the need for more trips (and more revenue) becomes more important than cost effectiveness.
The required computational time for all optimizations varied between 11,500 and 12,700 s.

General Comments on the Results of Section 3
In this study, a general mathematical framework appropriate for the statement and solution of synthesis, design and operation intertemporal dynamic optimization problems on marine energy systems is introduced. The mathematical formulation of the complete three-level optimization problem is presented and a solution procedure that treats all three levels in a single-step is proposed. The method is properly applied for an energy system of a containership with gas turbines, four-stroke and two-stroke Diesel engines allowed as propulsion alternatives. Also, the impact of fuel price and freight rate on the optimal solution is investigated.
In each case, the optimal solution for the SDO of the energy system is achieved in reasonable computational times. It is noted that, the optimal system, for all fuel prices and freight rates, consists of a single two-stroke Diesel engine. In all cases, with the exception of those with the lowest considered fuel price, a steam bottoming cycle is always installed, while, the number, design characteristics, and operational strategy of the DG set(s) vary with the variation of the fuel price and freight rate.
Also, the increase of freight rate or decrease of fuel price leads to the increase of total annual round trips of the ship and vice versa. Moreover, in all cases, the optimization results reveal the optimum ship speed profile that minimizes the fuel consumption, which would be impossible to be identified by experience alone.
In the present work, the goal was to focus on the presentation of the methodology. Thus, certain simplifying assumptions were made in order to avoid needless complexities. For example, the weather conditions throughout the ship route(s) have been considered known (deterministic), while in reality they are stochastic; component degradation of machinery during the operation of the ship and hull and propeller fouling have also been ignored. In case more accurate results are needed, these simplifications should be relaxed.

A General Remark
We consider it important to copy here a remark written in Reference [24]: "The energy system of a ship has to comply with rules and regulations of classification societies and national agencies. For example, the number and nominal power of the generator sets have to be determined so that sufficient redundancy exists and, under emergency conditions, at least the critical loads are covered. In some of the solutions presented here, the energy system contains only one Diesel generator set. It goes without saying that any result of the optimization procedure will form the basis, which will lead to the final selection by taking into consideration pertinent rules and regulations".

Closure
General comments coming out of the particular examples have been written at the end of Sections 2 and 3. It is worth noting that the installation of a bottoming cycle for better exploitation of fuel energy is economically feasible in all cases, except if the price of fuel is below a certain threshold revealed by the optimization which, however, is unrealistically low.
As demonstrated in Sections 2 and 3, optimization can reveal solutions (design and operation) for energy systems that cannot be identified by experience alone and they are often different from those appearing in common practice. Thus, the extra effort required by an engineer in order to obtain the knowledge and apply optimization is rewarding in many respects.
Mathematical optimization of energy systems has been the subject of systematic research over the last thirty years and the journal articles have an impressive increase in quantity and improvement in quality with time.
The problem of triple optimization-synthesis, design, and operation-is still challenging, and is more so if dynamic conditions are considered. A contribution to the field has been attempted with the present article and, even though the examples are related to marine energy systems, the methods described can also be applied for optimization of energy systems on land.
As indicated in reference [1], there are many subjects still open for further investigation.
Author Contributions: G.N.S. and G.J.T. performed the simulations and optimizations and had the primary role in writing Sections 2 and 3, respectively, while C.A.F. supervised the works. All three authors cooperated in writing the current text.
Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflicts of interest.

Appendix A
The capital cost of the gas turbines is estimated with the related cost model presented in Frangopoulos [59], with the unit cost parameters modified for taking into account the current level of technology and to approximate capital cost data available from various sources. A common regression formula has been developed for the gas turbine configurations examined in the present work and has the general mathematical expression of Equation (A1). The values of the coefficients for each gas turbine types are presented in Table A1.  The capital costs of other components of the system are estimated as explained in Sakalis and Frangopoulos [24].

Appendix B
Wind speed and direction data for the numerical example of Section 3.