Opened 6 years ago
Closed 6 years ago
#4958 closed defect (fixed)
__OpenModelica_simulationFlags ignored by API simulate() function
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 1.13.0 |
Component: | Command Prompt Environment | Version: | |
Keywords: | Cc: | Martin Sjölund |
Description
I have a model with the annotation
__OpenModelica_simulationFlags(nls="kinsol", lv="LOG_STATS,LOG_SOLVER ")
which runs as expected in OMEdit. However, when I run the same model from a .mos script using the simulate()
API function without any simflags, those flags are also ignored, which leads to poor performance.
Please make sure the __OpenModelica_simulationFlags
works properly also from the API simulate()
function.
Change History (2)
comment:1 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in afc94ce. The
__OpenModelica_simulationFlags
annotation is now used if no simflags argument is given tosimulate
(or any other function that internally usesbuildModel
) and--ignoreSimulationFlagsAnnotation
isn't used.Note that the annotation in the description won't work due to the space after
LOG_SOLVER
, which the simulation runtime doesn't like. I'm not sure if OMEdit works around that somehow, but I'd say that's an issue with the parsing in the runtime rather than something that should be handled by the scripting API.