the usage of the C++ interface is mostly identical to the C interface. Instead of implementing all functions in a probfct_TEMPLATE.c-file, one derives from grampc::ProblemDescription, i.e.
Of advantage is that you only have to override and implement the methods that are relevant to your problem. For example, if you don't use RODAS as integrator, you don't have to define and implement the functions related to the mass matrix.
If you need a complete example, I can convert one of the existing examples to the C++ notation. For a more complex usage, you could have a look at github.com/grampc-d/grampc-d, which is a framework for distributed MPC that is based on GRAMPC and uses the C++ interface.
Regards,
Andreas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would be happy to see one of the existing examples in the C++ notation just to see how you intend it to be used. Hopefully it could be beneficial to anyone else visiting this discussion forum aswell.
Once again thanks for the help,
Gustav
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
Thank you for providing Grampc!
Are there any resources for understanding how to use the c++ interface a bit better?
I couldn't find anything mentioned in the manual.
Best regards,
Gustav
Hello Gustav,
the usage of the C++ interface is mostly identical to the C interface. Instead of implementing all functions in a probfct_TEMPLATE.c-file, one derives from grampc::ProblemDescription, i.e.
Of advantage is that you only have to override and implement the methods that are relevant to your problem. For example, if you don't use RODAS as integrator, you don't have to define and implement the functions related to the mass matrix.
Solving the problem looks similar to
If you need a complete example, I can convert one of the existing examples to the C++ notation. For a more complex usage, you could have a look at github.com/grampc-d/grampc-d, which is a framework for distributed MPC that is based on GRAMPC and uses the C++ interface.
Regards,
Andreas
Hello again!
Thank you for the response , it was helpful!
I would be happy to see one of the existing examples in the C++ notation just to see how you intend it to be used. Hopefully it could be beneficial to anyone else visiting this discussion forum aswell.
Once again thanks for the help,
Gustav
Hello all!
Thanks for the small example. Is there an existing C++ example by now?
Best regards
Malte