FMICore.jl
FMICore.jl copied to clipboard
Evaluation of FMU not possible when no component exists (assert not helpful for non-experts)
When you call the fmu without having it simulated first, you get an assert that no FMU2Component is allocated.
fmi = fmiLoad("SpringPendulumExtForce1D", "Dymola", "2022x"; type=:ME)
fmu()
The description in eval.jl says that if no component is allocated, a component will by allocated. Hence I wonder if this used to work in the past but not anymore, further if there is a good reason why you are not allocating it, and finally: if there is a good reason for not allocating, I would wish for a more meaningful explanation for non-FMU-component-structure-experts (e.g. "Please call fmiInstantiate to allocate a component." <-I don't know what is actually the shortest/most reasonable way to get one). If there is no good reason to not create one in the eval-function, this should be added. Happy to discuss (and to learn).