Commit a74e15f4 authored by danielkisov's avatar danielkisov
Browse files

Merge branch 'master' into 'ba_kisov'

# Conflicts:
#   pom.xml
parents f5b5f55b edf2a818
Pipeline #464943 failed with stage
in 34 seconds
......@@ -11,6 +11,9 @@ import de.monticore.lang.embeddedmontiarc.cocos.*;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarcmath.cocos.AtomicComponentCoCo;
import de.monticore.lang.math._cocos.MatrixAssignmentDeclarationCheck;
import de.monticore.lang.mathopt._cocos.MathOptCocos;
import de.monticore.lang.mathopt._cocos.OptimizationConditionCheck;
import de.monticore.lang.mathopt._cocos.OptimizationStatementCheck;
import de.monticore.lang.monticar.cnnarch._cocos.CNNArchCocos;
import de.monticore.lang.monticar.cnnarch._symboltable.ArchitectureSymbol;
......@@ -48,7 +51,10 @@ public class EMADLCocos {
.addCoCo((EMADLASTBehaviorNameCoCo) behaviorCoco)
.addCoCo(new AtomicComponentCoCo())
//Math cocos
.addCoCo(new MatrixAssignmentDeclarationCheck());
.addCoCo(new MatrixAssignmentDeclarationCheck())
//.addCoCo(new MatrixAssignmentCheck())
//MathOpt Cocos
.addCoCo(new OptimizationStatementCheck())
.addCoCo(new OptimizationConditionCheck());
}
}
......@@ -5,10 +5,12 @@ component MinimizePortsTest{
out Q y;
implementation Math{
Q y1 = minimize(u)
(u*u) - 2 * u + 1;
minimize
Q x;
in
Q y1 = (x*x) - 2 * x + 1;
subject to
u >= 0;
x >= 0;
end
}
}
......@@ -13,8 +13,10 @@ component HS71{
out Q yOut;
implementation Math{
Q y = minimize(Q^{4} x)
x(1) * x(4) * (x(1) + x(2) + x(3)) + x(3);
minimize
Q^{4} x;
in
Q y = x(1) * x(4) * (x(1) + x(2) + x(3)) + x(3);
subject to
x(1) * x(2) * x(3) * x(4) >= 25;
x(1) * x(1) + x(2) * x(2) + x(3) * x(3) + x(4) * x(4) == 40;
......
......@@ -7,8 +7,10 @@ component ScalarMinimizationTest{
out Q yOut;
implementation Math{
Q y = minimize(Q x)
(x*x) - 2 * x + 1;
minimize
Q x;
in
Q y = (x*x) - 2 * x + 1;
subject to
x >= 0;
end
......
......@@ -23,8 +23,10 @@ component TransportationProblem{
Q ^{m, n} c = [2.5, 1.7, 1.8; 2.5, 1.8, 1.4];
// minimization problem
Q y = minimize(Q^{2, 3} x)
sum(c .* x);
minimize
Q^{2, 3} x;
in
Q y = sum(c .* x);
subject to
sum(x, 2) == A;
sum(x, 1) == b;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment