## 3 Bi-Level Multi-Object Optimization
In this way, the definition of coupling variable [60] is not necessary, because the two levels (internal and external) can interact effectively within the modeFRONTIER(r) environment, without the need to explicitly define further constraints for the internal optimization, as is usual in the local-global optimization of models mainly described by continuous variables [61]. In the MILP procedure used in the internal level of the bi-level optimization, all the constraints regarding the existence, or the choice of the size, of the components are not active, as they are managed by the external level, making faster the definition of the optimal solution for a single individual. Figure 9 schematically represents the flow chart of the MILP procedure with the files that allow interaction with the external level. The modeFRONTIER(r) workflow shown in Figure 10 allows to define in a semigraphic way the multi-objective genetic optimizer. At the same time, the workflow window also constitutes the interface that allows the designer to change the ranges of the choice variables managed by the external level. Table 2 summarizes the functions of the graphical workflow nodes in Figure 10.  
Figure 9: Scheme of the mixed-integer linear programming model of the system (MILP) procedure at the internal level. \begin{table}
\begin{tabular}{c c} \hline \hline n\_Str; n\_ORC & Defining of the variation range for the optimization variables actual number of Stirling groups and actual number of ORC groups. \\ \hline Lev\_HTW\_size; & Defining of the variation range for the other optimization variables, size of HTW thermal storage, size of the steam storage, size of the absorption chiller, size of the compression chiller, area of the solar panels, area of the solar thermal collectors. \\ \hline SchedulingStart & Defining of the optimization algorithm for the external level (NSGA-II) and setting of the parameters for the formulation of the different generations, in particular the number of individuals, the number of generations and the population of the first generation. \\ \hline Calculator 14 & Converting of the number of Stirling groups and of the number of ORC groups into the vectors \(X\_str\) (_stirling_) and \(X\_orc\) (_ORC_). \\ \hline SupportFile2 & Calling the COMPONENTS.dat (Figure 9) file which contains the characteristics chosen for the components (in particular the efficiencies of the Stirling and ORC groups) and makes it available for the subsequent EasyDriver1 node. \\ \hline STIR; ORC & Containing the vectors \(X\_str\) (_stirling_) and \(X\_orc\) (_ORC_) produced by the node Calculator 14. \\ \hline EasyDriver1 & It is the main node of the workflow; it defines the modeF.dat file (Figure 9) that can be read by the MILP procedure, launches the genetic procedure and writes the output containing the values of all the variables, calculated internally by the MILP procedure, and of the two objectives for all the individuals, until the end of the procedure. \\ \hline OutputScalar31; OutputScalar17 & Identifying, in the output of the EasyDriver1 node, the two scalar values corresponding to the fuel consumption and to the penalty associated with the choice of variables managed by the external level. \\ \hline Objective32; Objective18 & Identifying the two variables highlighted by nodes OutputScalar31 and OutputScalar17 as objectives to be minimized. \\ \hline Exit4 & Defining the end of the procedure of design evolution, when all the generations set in the SchedulingStart node have been examined. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Functions of the nodes in the graphical workflow in Figure 10.  
Figure 10: Work flow of the optimization algorithm in the modeFRONTIER® environment.