YANE - Short Software Guide 1.0.1

example_7_14

Implementation details of the main() function

The computing loops

The main program runs three loops for the variables

The control horizon

Different than in the other examples, here we allow for larger control horizons, i.e. that the control loop is not closed at every sampling instant but only less often. To this end, the variable

#define HORIZONSHIFT 10

is used. Here, HORIZONSHIFT denotes the maximal length of the control horizon whereas the actually used control horizon is stored in the variable ControlHorizon.

Terminal weight

To set the terminal weight, we introduced the variable TerminalWeight.

Implementation details of the model

Terminal weight

In order to implement the terminal weight option, the model is extended by the set/get methods

                double getTerminalWeight ( void );
                void setTerminalWeight ( double terminal_weight, double * terminal_time );

and the variables

                double _terminalWeight;
                double * _terminalTime;
Author:
Jürgen Pannek <juergen.pannek@googlemail.com>