ScalarMaximizationTest.emam 389 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;

component ScalarMaximizationTest{

    ports out Q xOut,
          out Q yOut;

    implementation Math{
        maximize
            Q x;
        in
            Q z = - x * x + 42;
        subject to
            x >= -10;
            x <= 10;
        end
        yOut = z;
        xOut = x;
    }
}