# Optimization module (80_optimization)¶

**Table of contents**- Optimization module (80_optimization)

## Description¶

This module provides the optimization execution routines for the model, allowing for switching between optimization procedures.

## Interfaces¶

### Input¶

Name Description Unit A B $vm\_cost\_glo$ total costs of production mio. US$ x x

_{The last columns of the table indicate the usage in the different realizations (numbered with capital letters)}

### Output¶

Name Description Unit $sm\_obj\_diff$ difference in objective between lp and nlp solution mio. US$

### Interface plot¶

Figure 0: Information exchange among modules

## Realizations¶

### (A) nlp_only *(default)*¶

This is the old default version which was used so far. In this realization the model is solved just using nonlinear optimization. If the optimization returns an infeasible solution the solve is repeated, either until a feasible solution is found or the maximum number of iterations as defined in $sm\_maxiter$ is reached. The loop itself is run in the core, but controlled by $sm\_obj\_diff$, which is set to infinite in the case of an infeasible solution (otherwise it is set for this realization to 0 as there is no linear solve performed).

Limitations

There are no known limitations

### (B) lp_nlp¶

In this realization an approach is used which was initially suggested by Todd Munson. Instead of a direct start with the nonlinear solve, a linear version of the model is solved beforehand. In order to linearize the model nonlinear terms are fixed to best guesses for the respective values. After the linear optimization the nonlinear optimization is executed. In order to make sure that the difference in the objective between linear and nonlinear solve is not too big, the difference is calculated and returned to the core using the scalar $sm\_obj\_diff$. In the core a loop about all optimizations is run as long as this difference is bigger than a given threshold ($s\_maxdiff$) or a predefined iteration limit is reached ($sm\_maxiter$).

Limitations

This realization requires that all used module realizations with nonlinear terms

provide a nl_fix.gms and nl_release.gms which fix and release the nonlinear terms.

If this is missing and there are still active nonlinear terms in the linear solve

attempt the model will be stopped with an error.

## Definitions¶

Name Description Unit A B $s80\_obj\_linear$ linear objective value mio. US$ x

_{The last columns of the table indicate the usage in the different realizations (numbered with capital letters)}

## Developer(s)¶

Jan Philipp Dietrich, Todd Munson

## See Also¶