You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run a sensitivity analysis on a model that uses components from another, internal, package. In OMEdit, I just open the package, open the model, simulate the model and this works as expected.
If I then try to run an individual parameter based sensitivity analysis on the same model, accepting the default settings, press "Run analysis", I get a popup with a long error message (by the way, it would be really really useful if the text of that message were selectable, it is not).
The message boils down to a Python traceback not finding a file .../results/simulation/mymodel_init.xml.
It turns out that that message is actually a red herring -- yes the file does not exist, but inspecting the omc_run_log.txt in that folder tells me that the problem is actually Error: Class Mypackage.SomeModel not found in scope MyModel.
So,
the dependency on that package is not recognized and the package not loaded, and
there seems to be no way in the GUI to point out dependencies of my model.
Probably, OMSens should
fail earlier with a more descriptive errror message, but more importantly
the GUI should allow pointing out dependencies of the model (beside Modelica) and
LoadModel or LoadFile in the generated builder.mos should include the necessary package.mo or flat .mo file.
Probably mos_script_skeleton needs to be adapted to account for additional dependencies in the way OMPython does. Maybe even use OMPython directly, to not duplicate effort, but that may be a larger effort.
This is on Windows 10 with OpenModelica v1.19.0-dev-624-g164b90d287
The text was updated successfully, but these errors were encountered:
I am trying to run a sensitivity analysis on a model that uses components from another, internal, package. In OMEdit, I just open the package, open the model, simulate the model and this works as expected.
If I then try to run an individual parameter based sensitivity analysis on the same model, accepting the default settings, press "Run analysis", I get a popup with a long error message (by the way, it would be really really useful if the text of that message were selectable, it is not).
The message boils down to a Python traceback not finding a file
.../results/simulation/mymodel_init.xml
.It turns out that that message is actually a red herring -- yes the file does not exist, but inspecting the omc_run_log.txt in that folder tells me that the problem is actually
Error: Class Mypackage.SomeModel not found in scope MyModel.
So,
Probably, OMSens should
Modelica
) andLoadModel
orLoadFile
in the generatedbuilder.mos
should include the necessarypackage.mo
or flat .mo file.Probably mos_script_skeleton needs to be adapted to account for additional dependencies in the way OMPython does. Maybe even use OMPython directly, to not duplicate effort, but that may be a larger effort.
This is on Windows 10 with OpenModelica v1.19.0-dev-624-g164b90d287
The text was updated successfully, but these errors were encountered: