Skip to content

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

@bilderbuchi

Description

@bilderbuchi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions