- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Terminate() from external function
Terminate() from external function
Re: Terminate() from external function
As far as I know, you can only abort a simulation with an error-message from external C (ModelicaError), which works similar to a failed assertion.
- sjoelund.se
- 1700 Posts
Re: Terminate() from external function
Thanks for reply so I will probably try to combine it with some return value And one little question is there a way how to make der(variable) work if you get variable from external function?{or cant because it is somehow linked to symbolic representation in compiler?} I tried many things but at the end I think I must stick to not ideal deraivation block which works . Which seems logical. But maybe I am missing something.
Re: Terminate() from external function
Yes, either making an approximation using a derivative block. Or by using a symbolic derivative annotation on the external function and providing the external derivative function to the model...
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Terminate() from external function