Commit 16be86cd authored by Bernhard Rumpe's avatar Bernhard Rumpe

BR-sy

parent 649eee7c
Pipeline #175157 failed with stage
in 3 minutes and 40 seconds
# (c) https://github.com/MontiCore/monticore
stages:
#- windows
- linux
......
<!-- (c) https://github.com/MontiCore/monticore -->
![pipeline](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/badges/master/build.svg)
![coverage](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/badges/master/coverage.svg)
......
<!-- (c) https://github.com/MontiCore/monticore -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- (c) https://github.com/MontiCore/monticore -->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -80,4 +81,4 @@
<activeProfiles>
<activeProfile>se-nexus</activeProfile>
</activeProfiles>
</settings>
\ No newline at end of file
</settings>
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp;
import de.monticore.ModelingLanguageFamily;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp;
import de.monticore.lang.math._symboltable.expression.MathArithmeticExpressionSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.converter;
import de.monticore.lang.math._symboltable.expression.MathValueSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.converter;
import de.monticore.lang.math._symboltable.expression.MathExpressionSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
public class MIPProblem extends Problem {
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
import java.util.Vector;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
import de.monticore.lang.math._symboltable.expression.MathConditionalExpressionSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
import de.monticore.lang.mathopt._symboltable.MathOptimizationType;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
import de.monticore.lang.math._symboltable.expression.*;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
import de.monticore.lang.mathopt._symboltable.MathOptimizationStatementSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
public interface MIQPSolverGeneratorImplementation extends SolverGeneratorImplementation {
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
public interface QPSolverGeneratorImplementation extends SolverGeneratorImplementation {
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
public enum Solver {
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
import de.monticore.lang.monticar.generator.FileContent;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
import de.monticore.lang.monticar.generator.FileContent;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver;
import java.util.HashMap;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver.cplex;
import de.monticore.lang.monticar.generator.FileContent;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver.cplex;
import de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem.Problem;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver.factory;
import de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem.*;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver.ipopt;
import de.monticore.lang.monticar.generator.FileContent;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver.ipopt;
import de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem.Problem;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.solver.template;
import de.monticore.lang.mathopt._symboltable.MathOptimizationType;
......
<!-- (c) https://github.com/MontiCore/monticore -->
<configuration>
<timestamp key="bySecond" datePattern="yyyy-MM-dd-HHmmss"/>
......
<#-- (c) https://github.com/MontiCore/monticore -->
#ifndef __${viewModel.callSolverName?upper_case}_H__
#define __${viewModel.callSolverName?upper_case}_H__
......@@ -146,4 +147,4 @@ class ${viewModel.callSolverName}
}
};
#endif
\ No newline at end of file
#endif
/* (c) https://github.com/MontiCore/monticore */
#ifndef MACMAKETEST_CplexMat_H
#define MACMAKETEST_CplexMat_H
......
/* (c) https://github.com/MontiCore/monticore */
#ifndef MACMAKETEST_ADMAT_H
#define MACMAKETEST_ADMAT_H
......
<#-- (c) https://github.com/MontiCore/monticore -->
#ifndef __${viewModel.callSolverName?upper_case}_H__
#define __${viewModel.callSolverName?upper_case}_H__
#include<armadillo>
......@@ -385,4 +386,4 @@ class ${viewModel.callSolverName}
}
};
#endif
\ No newline at end of file
#endif
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator;
import de.monticore.lang.embeddedmontiarc.LogConfig;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......@@ -56,4 +57,4 @@ public class GeneratorCplexSolverTest {
List<File> files = doGenerateModel("de.rwth.monticar.optimization.constraintTest");
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......@@ -106,4 +107,4 @@ public class GeneratorEMAMOpt2CMakeTest extends BasicGenerationTest {
List<File> files = doGenerateModel("de.rwth.monticar.optimization.constraintTest");
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......@@ -150,4 +151,4 @@ public class GeneratorEMAMOpt2CPPTest extends BasicGenerationTest {
List<File> files = doGenerateOptimizationModel("matrixTransposeMinimizationTest");
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator;
import de.monticore.lang.embeddedmontiarc.LogConfig;
......@@ -37,4 +38,4 @@ public class GeneratorEMAMOpt2CppCliTest extends BasicGenerationTest {
assertTrue(Files.exists(Paths.get(targetDir + positiveFileName)));
}
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.optimizationSolver.problem;
public class OptimizationProblemClassificationTest {
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.carmodel;
component CarModelInstanceTest {
......
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.carmodel;
component KinematicBicycleCarModel<Q dt = 0.1 s, Q l_f = 1 m, Q l_r = 1 m>
......@@ -34,4 +35,4 @@ component KinematicBicycleCarModel<Q dt = 0.1 s, Q l_f = 1 m, Q l_r = 1 m>
predictedYawAngle = currentYawAngle + dpsi;
predictedVelocity = currentVelocity + dv;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.carmodel;
component MatlabCarModel<Q dt = 0.1 s, Q m = 2000 kg, Q a = 1.5 m, Q b = 1.5 m, Q cx = 150000, Q cy = 40000, Q ca = 0.5>
......@@ -38,4 +39,4 @@ component MatlabCarModel<Q dt = 0.1 s, Q m = 2000 kg, Q a = 1.5 m, Q b = 1.5 m,
predictedVelocityY = currentVelocityY + dvy * dt;
predictedYawRate = currentYawRate + dYawRate * dt;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
// acceleration and steering angle to actuators steering, engine, break
// @author Christoph Richter
......@@ -30,4 +31,4 @@ component ActuatorController
// warning because engine can not be set to a negative value the car can not drive
// backwards
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.mpc;
import de.rwth.monticar.mpc.bicycle.*;
......
/* (c) https://github.com/MontiCore/monticore */
// Kinematic Bicycle model
// @author Christoph Richter
......@@ -80,4 +81,4 @@ component BicycleMPC<Q dt = 0.1, Q l_f = 1, Q l_r = 1, Z hp = 1>
a = u(1,1);
steering = u(2,1);
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
// Kinematic Bicycle model
// @author Christoph Richter
......@@ -14,4 +15,4 @@ component MatlabMPC
{
// vehicle model describes update functions
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
// PathPlaner:
// - First trims path to current progress
// - Then creates low level reference state vector for mpc controller
......@@ -49,4 +50,4 @@ component PathPlaner<Q dt = 0.1>
// connect output
connect referencePathCreator.z_ref -> z_ref;
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
// ReferencePath: Created a reference path for the prediction horizon of the mpc controller
// @author Christoph Richter
......@@ -86,4 +87,4 @@ component ReferencePathCreator<Q dt = 0.1>
end
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.mpc.trajectory;
// trims the planned path
......
/* (c) https://github.com/MontiCore/monticore */
// Provides a desired velocity
// @author Christoph Richter
......@@ -12,4 +13,4 @@ component VelocityController
{
desiredVelocity = 10 m/s;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
component BoundedConditionsTest{
......@@ -15,4 +16,4 @@ component BoundedConditionsTest{
xOut = x;
yOut = y;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
stream BoundedConditionsTest for BoundedConditionsTest{
xOut: 0.5 +/- 0.0001;
yOut: 0.25 +/- 0.0001;
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
component ColRowMinTest{
......@@ -17,4 +18,4 @@ component ColRowMinTest{
xOut = x;
yOut = y;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
stream ColRowMinTest for ColRowMinTest{
xOut: [1 +/- 0.0001, 2 +/- 0.0001; 1 +/- 0.0001, 1 +/- 0.0001];
yOut: 3 +/- 0.0001;
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
component ConstMatrixSumMinimizationTest{
......@@ -14,4 +15,4 @@ component ConstMatrixSumMinimizationTest{
xOut = x;
yOut = y;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
stream ConstMatrixSumMinimizationTest for ConstMatrixSumMinimizationTest{
xOut: -1 +/- 0.0001;
yOut: -1 +/- 0.0001;
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
component ConstraintTest{
......@@ -22,4 +23,4 @@ component ConstraintTest{
xOut = x;
yOut = y;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
stream ConstraintTest for ConstraintTest{
xOut: [0 +/- 0.0001, 2 +/- 0.0001, 2 +/- 0.0001; 1 +/- 0.0001, 1 +/- 0.0001, 2 +/- 0.0001];
yOut: -1.6901 +/- 0.0001;
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
component ExistingOptimizationVariableTest{
......@@ -39,4 +40,4 @@ component ExistingOptimizationVariableTest{
aOut3 = a;
cOut3 = c;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
stream ExistingOptimizationVariableTest for ExistingOptimizationVariableTest{
......@@ -6,4 +7,4 @@ stream ExistingOptimizationVariableTest for ExistingOptimizationVariableTest{
bOut2: -1000 +/- 0.0001;
aOut3: [-20 +/- 0.0001, -, -; -, -20 +/- 0.0001, -; -, -, -20 +/- 0.0001];
cOut2: -57 +/- 0.0001;
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
component ForLoopConditionsTest{
......@@ -17,4 +18,4 @@ component ForLoopConditionsTest{
xOut = x;
yOut = y;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
stream ForLoopConditionsTest for ForLoopConditionsTest{
xOut: [0 +/- 0.0001; 0 +/- 0.0001; 0 +/- 0.0001];
yOut: 0 +/- 0.0001;
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
// example problem, number 71 from the Hock-Schittkowsky test suite
// W. Hock and K. Schittkowski.
// Test examples for nonlinear programming codes.
......@@ -23,4 +24,4 @@ component HS71{
xOut = x;
yOut = y;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.monticar.optimization;
stream HS71 for HS71{
xOut: [-4.5676 +/- 0.01; -1.6614 +/- 0.01; -1.7612 +/- 0.01; -3.6434 +/- 0.01];