Implement the [SolverGeneratorImplementation.java](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/blob/master/src/main/java/de/monticore/lang/monticar/generator/cpp/optimizationSolver/solver/SolverGeneratorImplementation.java) interface for the corresponding problem classes in your new created class.
**Step 2.)**
Add your solver to the solver generator factory [SolverGeneratorFactory.java](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/blob/master/src/main/java/de/monticore/lang/monticar/generator/cpp/optimizationSolver/solver/factory/SolverGeneratorFactory.java).
**Remarks**
Do not forget to create unit tests ;)
### Combining Armadillo and Your Solver Code
The tricky part was to combine the data types from Armadillo with for example IPOpt.
Unfortunatly it is not possible to extend Armadillos data type _mat_ for matrices easily.
For IPopt and CPLEX Armadillo's generic data type _field_ was used. The generic type was solver specific. In the case of IPOpt it was _admat_ as type for the optimization variable.
The problem with _field_ is that not all matrix operations are implemented. Thus they have to be implemented manually. In the case some functions are missing they can be implemented here: [ADMat.h](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/blob/master/src/main/resources/template/optimizationSolver/ipopt/ADMat.h)