Commit 50d2b601 authored by Christoph Richter's avatar Christoph Richter
Browse files


parent 740f5419
Pipeline #81307 passed with stage
in 20 minutes and 4 seconds
......@@ -2,4 +2,52 @@
# EMAMOpt2Cpp
C++ Code Generator for EmbeddedMontiArcMathOpt
## Summary
EMAMOpt2Cpp is a code generator which converts EMAMOpt models to C++ code. It extends EMAM2Cpp which generates C++ code from EMAM models.
It features:
- support of multiple optimization solvers
- support for different optimization problem classes
- CMake file generation for needed libraries
## Class Hierachy
![Overview Classes](
## Development Hints
### Add a new solver
Adding a new solver generator involves 2 steps:
**Step 1.)**
Implement the []( interface for the corresponding problem classes in your new created class.
**Step 2.)**
Add your solver to the solver generator factory [](
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](
## See Also
Supports Markdown
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