## 1 Introduction
[46] established a mathematical programming model to optimize economic and environmental benefits of the modern ship energy systems, by using the genetic algorithm non-dominated sorting genetic algorithm-II (NSGA-II), [PERSON] et al. [47] present an analysis of load profiles extracted from three different vessels during operation and propose an energy management system algorithms based on MILP optimization approach. The study of [PERSON] et al. [48] is focused on the synthesis, design and operation optimization of a marine energy system, considering a basic technology option. The complete optimization problem has been solved using an evolutionary algorithm. [PERSON] et al. [49] consider the economy, emissions and navigation strategy of a hybrid ship, proposing an energy optimization based on a genetic algorithm to achieve the goal of minimum fuel consumption, minimum emissions and maximum endurance of ship operation, [PERSON] et al. [50] propose an approach based on the use of energy and exergy analysis, applied to the energy system of a cruise ship, with reference to the a typical operational days, while [PERSON] et al. [51] propose a multi-objective mathematical programming model formulated to determine the selection and capacity of facilities with minimal total annual cost and size, for a real cruise ship case. As mentioned above, the aim of the present work is to consider different technological alternatives for energy recovery, taking into account both the electrical power and heat requirements, at different thermal levels and in the different phases of the cruise. The optimization through the simple formulation of a MILP problem would involve, in this case, a very high number of choice variables and an excessively high computational effort. To reduce the computational effort for the solution of the MILP problem, in this paper, a bi-level strategy has been developed, which prescribes managing the binary choice variables, expressing the existence or not of the components, by means of an evolutionary algorithm, while all the remaining choice variables, related to the operation and to the definition of continuous magnitudes, are obtained by a branch-and-bound optimization algorithm, performed with Xpress-MP. The entire procedure is contained within a single project, defined within the commercial software modeFRONTIER(r) by ESTECO SpA (Padriciano 99, c/o Area Science Park, 34149 Trieste, Italy). A similar approach has been proposed by the authors for the definition of complex, land based, cogeneration systems [52] and has been extended here for application in the naval sector. Since the main engines and the integration boilers are the only components powered directly with fossil fuel, the objective of the minimum total fuel consumption is strongly correlated with that of the reduction of polluting emissions produced during the typical operation period. Therefore, the latter are calculated downstream of the optimization, to verify the consistence with the constraints of the legislation. In the case of different fuels, used simultaneously on board the ship, it would still be possible to define an additional constraint on the emission limit which would push the optimal solution towards the use of less polluting fuels and/or less emissive energy production systems, if the simple minimization of the total consumption were not sufficient to guarantee the compliance with the regulatory constraints.