Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not seem to work with dependency on another package #19

Open
bilderbuchi opened this issue Feb 25, 2022 · 0 comments
Open

Does not seem to work with dependency on another package #19

bilderbuchi opened this issue Feb 25, 2022 · 0 comments

Comments

@bilderbuchi
Copy link

bilderbuchi commented Feb 25, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant