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

component MatrixSumMinimizationTest1{

    ports out Q^{2,2} xOut,
          out Q yOut;

    implementation Math{
        minimize
            Q^{2,2} x;
        in
            Q y = sum(x);
        subject to
            x(1,1) >= 0;
            x(1,2) >= 0;
            x(2,1) >= 0;
            x(2,2) >= -5;
        end
        xOut = x;
        yOut = y;
    }
}