# Developments, Trends, and Challenges in Optimization of Ship Energy Systems
## 3 Mathematical Statement and Solution Methods of the Optimization Problem
### The Static Optimization Problem  
#### 3.1.1 Mathematical Statement and Solution Methods of the Static Optimization Problem  
In general terms, the optimization problem is stated as follows:  
\[\min_{\mathbf{x}}f\left(\mathbf{x}\right) \tag{1}\]  
subject to equality and inequality constraints  
\[h_{i}(\mathbf{x})=0,\qquad i=1,\ 2,\ \ldots,\ I \tag{2}\]\[g_{j}(\mathbf{x})\leq 0,\qquad j=1,\;2,\;\ldots,\;J \tag{3}\]  
where \(\mathbf{x}\) is the set of independent variables.  
For the complete SDO optimization, it is convenient to write the objective function in the form [2; 5; 6]  
\[\underset{\mathbf{v},\mathbf{w},\mathbf{z}}{\text{minimize}}\;f\;(\mathbf{v}, \;\mathbf{w},\;\mathbf{z}) \tag{4}\]  
where  
* set of independent variables for operation optimization (load factors of components, mass flow rates, pressures and temperatures of streams, etc.),
* set of independent variables for design optimization (nominal capacities of components, mass flow rates, pressures and temperatures of streams, etc.),
* set of independent variables for synthesis optimization; there is only one variable of this type for each component, indicating whether the component exists in the optimal configuration or not; it may be a binary (0,1), an integer, or a continuous variable such as the rated power of a component, with zero value indicating the nonexistence of a component in the final configuration.  
If optimization is performed not on all three levels (SDO) but on one or two of those, Equation (4) is simplified accordingly.  
It is usual in optimization theory to express the objective as minimization of a function. If maximization is the goal, the whole formulation can remain the same, since  
\[\underset{\mathbf{x}}{\text{min}}\;f\;(\mathbf{x})=\underset{\mathbf{x}}{ \text{max}}\{-f\;(\mathbf{x})\} \tag{5}\]  
A practical procedure for solution of the SDO optimization problem is the following: a set of values is selected for the design and synthesis independent variables (**w,z**), the operation optimization problem is solved starting with an initial set of values of \(\mathbf{v}\), and the objective function is evaluated. The set (**w,z**) is updated and the iterative procedure is repeated until convergence. With the increase of computing capacity, it has been possible to work on all three levels simultaneously, i.e., to handle all the independent variables at a single step. Further details will be given in following sections.  
For updating the values of the independent variables, various methods have been developed, which are classified in three broad categories: (i) search methods, (ii) calculus methods, and (iii) stochastic or evolutionary methods. Search methods do not use derivatives of the objective function with respect to the variables, they are implemented relatively easily, but they may be slow in locating the optimum, compared to the calculus methods. Calculus methods are much faster, but they require continuity of the objective function and the derivatives, a requirement that often is not satisfied in optimization problems of energy systems. In such cases, stochastic or evolutionary methods can be applied, that have also the additional advantage of locating the global optimum in problems with many local optima. Complete formulation of methods appears in publications such as Refs. [9; 10; 11; 12; 13; 14; 15; 16; 17].