Question about usage of model.generate() #4046
-
Hi all, I am just getting familiar with PyBaMM. What I am trying to do is get a C or C++ version of a cell model, for use on an embedded system. I see that PyBaMM models have methods for calling the CasADi code generation functionality. and it seems as though the intent of this CasADi functionality is indeed to support embedded systems, but it isn't immediately clear to me if I am understand this feature correctly. Is the purpose of If so, is there any example showing this workflow? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Once you have generated the code, you have to compile it yourself and then you can call functions from the generated file. See PyBaMM/tests/unit/test_models/test_base_model.py Lines 813 to 834 in 44d946f You are then responsible for writing your own solver and post-processing. There are no workflows for doing this in PyBaMM. |
Beta Was this translation helpful? Give feedback.
Once you have generated the code, you have to compile it yourself and then you can call functions from the generated file. See
PyBaMM/tests/unit/test_models/test_base_model.py
Lines 813 to 834 in 44d946f