YANE - Short Software Guide 1.0.1


Implementation details of the main() function

Configuring the adaptive NMPC algorithm

In order to configure the adaptive NMPC algorithm the following lines are used in the code:

        double alphabound = 0.1;
        int N0 = 2;
        int sigma = 5;
        double eps = 1E-3;
        mpcSpecify->setConfigAdaptiveMPC ( alphabound, APOSTERIORIPRACTICAL,
                SIMPLE, N0, eps, sigma, true, true );
        int N = 7;

These lines correspond to setting $ \overline{\alpha} = 0.1 $, the minimal acceptable horizon $ N = 2 $, the maximal change in the horizon length $ \sigma = 5 $ and the practical region of the practical suboptimality estimate $ \varepsilon = 10^{-3} $. Note that the latter setting is not required if a non practical suboptimality estimate is used. Within the call mpcSpecify->setConfigAdaptiveMPC the last two entries are set to true. This corresponds to checking first if the horizon can be reduced before actually reducing it for the first parameter (reducing the occurance of the case where the horizon is shortend at instant $ n $ and again incrased at $ n + 1 $), while the second parameter causes an optimization of $ \gamma $ to be executed.

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