## 3 Bi-Level Multi-Object Optimization  
The bi-level optimization here introduced considers an external level, optimized with an evolutionary algorithm for the design choices, and an internal level optimized with a MILP solver for the choices on the optimal management of the components. A similar approach has been proposed by the authors for the optimization of ground-based cogeneration systems [52]. The bi-level procedure is based on an external genetic optimization algorithm, which creates a population of individuals, defined by genes that correspond to the optimization variables that determine the presence or absence of the different components in the super-structure (Figure 5). These values are assumed by the internal optimization level, based on the MILP procedure. As well known, the latter is faster in solving management and resource allocation problems, if the number of choice variables that appear in multiple time intervals is lower. In fact, if the optimal solution in a certain time interval depends on that of many other intervals, the problem decomposition is less effective and the computational effort necessary to resolve the instance as a whole is considerably greater. The advantage of entrusting the choice of the optimization variables that determine the presence or absence of the different components to the external (genetic) level consists in subtractingthese variables, which appear in all the time intervals of the cruise, from the optimization of the internal level. The choice variables managed by the external level are:  
* _X_str (stirling)_, vector containing the binary variables expressing the presence/absence of each Stirling group;
* _X_orc (ORC)_, vector containing the binary variables expressing the presence/absence of each ORC group;
* _Apv_, area occupied by photovoltaic solar panels [m\({}^{2}\)];
* _Ast_, area occupied by solar thermal collectors [m\({}^{2}\)];
* _Cool_abs_size_, absorption chiller size [kW];
* _Cool_com_size_, compression chiller size [kW];
* _Lev_St_size_, steam thermal storage size [kWh];
* _Lev_HTW_size_, hot water thermal storage size [kWh]. These variables are generated at the external level (genetic algorithm: outer level in Figure 8) in a range previously defined by the designer and then acquired as constants by the MILP procedure that operates at the internal level (minimize OBJfunc module in the exact solver: inner level in Figure 8). At the internal level, the optimal management of the components that are present in the considered individual is generated as the solution of the MILP problem. Therefore, the corresponding values of fuel consumption during the cruise and the overall penalty are obtained. In this way, the internal level performs a single-objective optimization, defined as a combination of the two objectives of reducing fuel consumption and limiting the total volume, which is then used by the external genetic algorithm, in the selection phase of the multi-objective optimization. The external level selects the individuals to be used in the creation phase of the next generation, according to the criteria provided by the genetic algorithm. The new generation is therefore characterized by a different set of variables managed externally; the latter are then passed to the internal level and the iteration continues until the expected number of generations is completed. The NSGA-II (non-dominated sorting genetic algorithm-II) genetic algorithm, widely used in literature [59], has been identified as a proper algorithm for the considered application. This approach  
Figure 8: Scheme of the bi-level optimization procedure. allows multi-core processors to be used, running internally multiple sessions in parallel and significantly speeding up the optimization process.