YANE - Short Software Guide 1.0.1

example_10_28

Implementation details of the main() function

The computing loop

The main program runs two for loops for the variable/s

The corresponding values are stored in the arrays

        double * odetolerance = new double [ 9 ];
        double * sqptolerance = new double [ 9 ];
        for ( int i = 0; i < 9; i++ )
        {
                odetolerance[i] = pow(0.1, i+1);
                sqptolerance[i] = pow(0.1, i+1);
        }

whereas the commands

        sqpSpecify->setAccuracy ( sqptolerance[k] );
        model->odeConfig()->setTolerance ( odetolerance[l], odetolerance[l] );

cause the used classes to accept the new accuracy values.

Computing the closed loop cost

To compute the closed loop cost the double arrays trajectory and valuefunction are required. Upon call of odemanager->getObjFunValues these arrays contain the open loop trajectory and the corresponding values of the cost functional for all open loop sampling instances.

Author:
Jürgen Pannek <juergen.pannek@googlemail.com>