\subsection{Contents of a \dir{optimize} data structure}

The \dir{optimize} specification is used to store the optimization variables and functions values and definitions, limits and
options.

\vskip 0.08cm

In any case, the signature variable for this data structure must be $\mathsf{SIGNA}$=\verb*|L_OPTIMIZE  |. The dimensioning
parameters for this data structure, which are stored in the state vector $\mathcal{S}^{o}_{i}$, represents:

\begin{itemize}
\item The number of decision variables $N_{var} = \mathcal{S}^{o}_{1}$.
\item The number of constraints $N_{cst} = \mathcal{S}^{o}_{2}$.
\item The type of optimization  $\mathcal{S}^{o}_{3}$, where

\begin{displaymath}
\mathcal{S}^{o}_{3} = \left\{
\begin{array}{rl}
 1 & \textrm{minimization} \\
 -1 & \textrm{maximization} \\
\end{array} \right.
\end{displaymath}

\item The result of a test for external convergence of the optimization problem $\mathcal{S}^{o}_{4}$, where

\begin{displaymath}
\mathcal{S}^{o}_{4} = \left\{
\begin{array}{rl}
 0 & \textrm{not converged} \\
 1 & \textrm{converged} \\
\end{array} \right.
\end{displaymath}

\item The index of external iteration (${S}^{o}_{5}$). If module {\tt PLQ:} is used, this is the iteration index relative to
the solution of a new linear optimization problem with a quadratic constraint. If module {\tt LNSR:} is used, this is the number
of times the line search algorithm is called.

\item The type of reduction for the radius if the quadratic constraint ($\mathcal{S}^{o}_{6}$) used in module {\tt PLQ:}, where

\begin{displaymath}
\mathcal{S}^{o}_{6} = \left\{
\begin{array}{rl}
 1 & \textrm{half} \\
 2 & \textrm{parabolic} \\
\end{array} \right.
\end{displaymath}

\item The type of gradient search $\mathcal{S}^{o}_{7}$, where

\begin{displaymath}
\mathcal{S}^{o}_{7} = \left\{
\begin{array}{rl}
 0 & \textrm{steepest descent} \\
 1 & \textrm{conjugate gradient} \\
 2 & \textrm{Broyden-Fletcher-Goldfarb-Shanno (BFGS)} \\
 3 & \textrm{memory limited Broyden-Fletcher-Goldfarb-Shanno (LBFGS)} \\
 4 & \textrm{Newton method for unconstrained optimization} \\
\end{array} \right.
\end{displaymath}

\item The type of optimization method $\mathcal{S}^{o}_{8}$, where

\begin{displaymath}
\mathcal{S}^{o}_{8} = \left\{
\begin{array}{rl}
 0 & \textrm{not set} \\
 1 & \textrm{OPTEX method with module {\tt PLQ:}} \\
 2 & \textrm{line search algorithm with module {\tt LNSR:}} \\
 3 & \textrm{fixed point SPH algorithm with module {\tt FPSPH:}} \\
 4 & \textrm{Newtonian SPH algorithm with module {\tt FPSPH:}} \\
\end{array} \right.
\end{displaymath}

\item The resolution's method for the linear problem with quadratic constraint used in module {\tt PLQ:} ($\mathcal{S}^{o}_{9})$, where

\begin{displaymath}
\mathcal{S}^{o}_{9} = \left\{
\begin{array}{rl}
 1 & \textrm{SIMPLEX/LEMKE} \\
 2 & \textrm{LEMKE/LEMKE} \\
 3 & \textrm{MAP} \\
 4 & \textrm{Augmented Lagragian} \\
 5 & \textrm{Penalty Method} \\
\end{array} \right.
\end{displaymath}

\item The index of line search iteration in module {\tt LNSR:} (${S}^{o}_{10}$). The maximum number of line search iterations is fixed to 50 in module {\tt LNSR:}.

\item The result of a test for the convergence of the line search iterations $\mathcal{S}^{o}_{11}$ in module {\tt LNSR:}, where

\begin{displaymath}
\mathcal{S}^{o}_{11} = \left\{
\begin{array}{rl}
 0 & \textrm{not converged} \\
 1 & \textrm{converged} \\
 2 & \textrm{maximum line search iteration reached} \\
\end{array} \right.
\end{displaymath}

\item The maximum number of external iterations in module {\tt LNSR:} (${S}^{o}_{12}$).

\item The external iteration restart cycle in module {\tt LNSR:} (${S}^{o}_{13}$).

\item A flag for unsuccessful resolution in module {\tt PLQ:} ${S}^{o}_{14}$, where

\begin{displaymath}
\mathcal{S}^{o}_{14} = \left\{
\begin{array}{rl}
 0 & \textrm{successful at last iteration} \\
 \ge 1 & \textrm{number of iteration with unsuccessful resolution.} \\
\end{array} \right.
\end{displaymath}

\end{itemize}

\begin{DescriptionEnregistrement}{Main records and sub-directories in \dir{optimize}}{7.0cm}

\CharEnr
{SIGNATURE\blank{3}}{$*12$}
{Signature of the data structure ($\mathsf{SIGNA}$)}

\IntEnr
{STATE-VECTOR}{$40$}
{Vector describing the various parameters associated with data structure $\mathcal{S}^{o}_{i}$.}

\OptIntEnr
{DEL-STATE\blank{3}}{$40$}{*}
{Vector describing the various parameters associated with data structure $\mathcal{S}^{g}_{i}$. This array is
 available if the {\sc optimize} object has been created using module {\tt DLEAK:} or {\tt DSPH:}.}

\DbleEnr
{VAR-VALUE\blank{3}}{$N_{var}$}{}
{The values of the decision variables}

\DbleEnr
{VAR-VAL-MAX\blank{1}}{$N_{var}$}{}
{The maximum values of the decision variables can be.}

\DbleEnr
{VAR-VAL-MIN\blank{1}}{$N_{var}$}{}
{The minimum values of the decision variables can be.}

\DbleEnr
{VAR-WEIGHT\blank{2}}{$N_{var}$}{}
{The weight of the decision variables $w_{i}$ in the quadratic constraint.}

\DbleEnr
{CST-OBJ\blank{5}}{$N_{cst}$}{}
{The limit value of the contraints. The units depends with the type of the constraint type.}

\IntEnr
{CST-TYPE\blank{4}}{$N_{cst}$}
{The type of the contraints: =-1 for $\geq$; =0 for $=$; =1 for $\leq$.}

\DbleEnr
{CST-WEIGHT\blank{2}}{$N_{cst}$}{}
{The weight of the constraint $\eta_{j}$ and $\gamma_{j}$ for the duals and meta-heuristic methods.}

\DbleEnr
{FOBJ-CST-VAL}{$N_{cst}+1$}{}
{The actual values of the objective function (first value) and the contraints (the following values). The
number of the constraints are assigned in the order they have been defined.}

\DbleEnr
{OPT-PARAM-R\blank{1}}{$40$}{}
{The different limits and values for the iterative calculations of the optimization problem.}

\DbleEnr
{GRADIENT\blank{4}}{$N_{var}, N_{cst}+1$}{}
{The gradients of the objective function and the constraints. The gradients of the objective for all the
decision variables are in first position, then follow the gradients of the constraints.}

\OptDbleEnr
{GRADIENT-DIR}{$N_{var}, N_{cst}+1$}{*}{}
{The direct component (without the flux effect) for the gradients of the objective function and the constraints.}

\OptDbleEnr
{DIRECTION\blank{3}}{$N_{var}$}{$\mathcal{S}^{o}_{8}=2$}{}
{Direction of the line search.}

\OptDbleEnr
{HESSIAN\blank{5}}{$N_{var}, N_{var}$}{$\mathcal{S}^{o}_{7}=2$}{}
{The hessian matrix containing second derivatives of the objective function with respect to the decision variables.}

\OptDbleEnr
{LNSR-INFO\blank{3}}{$9$}{$\mathcal{S}^{o}_{8}=2$}{}
{Double precision values used by module {\tt LNSR:}.}

\DirEnr
{OLD-VALUE\blank{3}}
{Directory containing differents informations of the previous iterations. the values of the decision
variables, the objective function, the constraints and the gradients of these functions for the previous
external iteration. This repertory will be created by the module \moc{PLQ:} (unless it is specified to not do) or by module \moc{LNSR:}.}

\end{DescriptionEnregistrement}

The array {\tt OPT-PARAM-R} contains double precision values related with the different limits and values for the iterative calculations of the optimization problem: \\
\begin{tabular}{p{0.06\textwidth}p{0.1\textwidth}p{0.75\textwidth}}
1st & $S$ & initial radius of the quadratic constraint in module {\tt PLQ:} or maximum stepsize for the line
search in module {\moc LNSR:} (default: 1.0).\\
2nd & $\delta$ & initial size of the hypercube for MAP method. (default: 0.1).\\
3rd & $\varepsilon_{\rm ext}$ & limit for external convergence (default: $10^{-4}$).\\
4th & $\varepsilon_{\rm int}$ & limit for internal convergence (default: $10^{-4}$).\\
5th & $\varepsilon_{\rm quad}$ & limit for convergence of the quadratic constraint in module {\moc PLQ:} (default: $10^{-4}$). \\
\end{tabular} \\
The other value of the record are not used and set to 0.0.

\vskip 0.2cm

The optional array {\tt DEL-STATE} contains integer values related to the definition of mixture and group indices in module {\tt DLEAK:}.
\begin{itemize}
\item The number of energy groups in macrolib $\mathcal{S}^{g}_{1}$.
\item The number of mixtures in macrolib $\mathcal{S}^{g}_{2}$.
\item The type of leakage parameters $\mathcal{S}^{g}_{3}$,
where
\begin{displaymath}
\mathcal{S}^{g}_{3} = \left\{
\begin{array}{rl}
1 & \textrm{use diffusion coefficients} \\
2 & \textrm{use $P_1$-weighted macroscopic total cross sections.} \\
\end{array} \right.
\end{displaymath}

\item The type of control variables $\mathcal{S}^{g}_{4}$,
where
\begin{displaymath}
\mathcal{S}^{g}_{4} = \left\{
\begin{array}{rl}
1 & \textrm{use leakage parameters} \\
2 & \textrm{use correction factors on leakage parameters} \\
3 & \textrm{use SPH factors compatible with diffusion theory, $P_n$ and $SP_n$ equations} \\
4 & \textrm{use SPH factors compatible with other types of transport-theory macro-} \\
& \textrm{calculations} \\
5 & \textrm{use one SPH factor assigned to the albedo function in each macro-group.} \\
\end{array} \right.
\end{displaymath}

\item The minimum group index $\mathcal{S}^{g}_{5}$, with $1 \le \mathcal{S}^{g}_{5}\le \mathcal{S}^{g}_{1}$.
\item The maximum group index $\mathcal{S}^{g}_{6}$, with $\mathcal{S}^{g}_{5} \le \mathcal{S}^{g}_{6}\le \mathcal{S}^{g}_{2}$.
\item The minimum mixture index $\mathcal{S}^{g}_{7}$, with $1 \le \mathcal{S}^{g}_{7}\le \mathcal{S}^{g}_{2}$.
\item The maximum mixture index $\mathcal{S}^{g}_{8}$, with $\mathcal{S}^{g}_{7} \le \mathcal{S}^{g}_{8}\le \mathcal{S}^{g}_{2}$.
\item The number of physical albedos $\mathcal{S}^{g}_{9}$.

\end{itemize}
\goodbreak

\subsubsection{The sub-directory /OLD-VALUE/ in /optimize/}

\begin{DescriptionEnregistrement}{Main records and sub-directories in \dir{/OLD-VALUE/}}{7.0cm}
\DbleEnr
{VAR-VALUE\blank{3}}{$N_{var}$}{}
{The values of the decision variables of the last valid iteration.}

\DbleEnr
{FOBJ-CST-VAL}{$N_{cst}+1$}{}
{The values of the objective function and the contraints of the last valid iteration.}

\DbleEnr
{GRADIENT\blank{4}}{$N_{var}, N_{cst}+1$}{}
{The gradients of the objective function and the constraints of the last valid iteration.}

\OptDbleEnr
{VAR-VALUE2\blank{2}}{$N_{var}$}{$\mathcal{S}^{o}_{8}=1$}{}
{The values of the decision variables of the second-last valid iteration.}

\OptDbleEnr
{BEST-VAR\blank{4}}{$N_{var}$}{$\mathcal{S}^{o}_{8}=1$}{}
{The values of the decision variables corresponding to the best valid solution ever found.}

\OptDbleEnr
{BEST-FCT\blank{4}}{1}{$\mathcal{S}^{o}_{8}=1$}{}
{The value of the objective function corresponding to the best valid solution ever found.}

\end{DescriptionEnregistrement}
\clearpage

