Skip to content

Conversation

@syntron
Copy link
Contributor

@syntron syntron commented Jan 11, 2026

Content (lots of changes / these will be splitted into several PRs if the general approach is approved):

  • OMCSession.py: rename real OMCPath* classes as privat (start with '_')
  • OMCSession: define OMCPathDummy and OMCSessionDummy => no OMC server
  • ModelExecution.py: include all code related to model execution (from OMCsession*; ModelicaSystemCmd)
  • ModelicaSystemDoE.py: seperate file for this class
  • ModelicaSystemDoE.py: use ModelicaSystem / reduce number of arguments to init
  • ModelicaSystem(Base).py: split getOutputs() and getContinuous() to Initial and Final data
  • ModelicaSystem(Base).py: getOutputs*() / getContinuous*() - always return np.float64
  • ModelicaSystemBase.py: define a basic version of ModelicaSystem
  • ModelicaSystemRunner.py: definition of a 'runner' class using ModelicaSystemBasic / OMCSessionDummy (see PR Enable the usage of a pre-built model executables by ModelicaSystemRunner #401)
  • test_ModelicaSystemRunner.py: test case for ModelicaSystemRunner
  • test_*: update of test cases based on above listed changes

Compared to PR #401 this solution:

  • still uses the existing OMPython requirements (dependencies of the Runner class; i.e. numpy, etc.)
  • shares nearly all code with the current definitions (by using OMCPathDummy and OMCSessionDummy)
  • uses | instead of Union

Further changes could do additional modifications such that the 3rd party packages (ZMQ) are not needed at all in the runner code path.

All tests are running without error / tested in https://github.com/syntron/OMPython/actions/runs/20865402893

Please comment!

… PRs

* OMCSession.py: rename real OMCPath* classes as privat (start with '_')
* OMCSession: define OMCPathDummy and OMCSessionDummy => no OMC server
* OMCSession: remove OMCSessionCmd
* ModelExecution.py: include all code related to model execution (from OMCsession*; ModelicaSystemCmd)
* ModelicaSystemDoE.py: seperate file for this class
* ModelicaSystemDoE.py: use ModelicaSystem / reduce number of arguments to __init__
* ModelicaSystem(Base).py: split getOutputs() and getContinuous() to Initial and Final data
* ModelicaSystem(Base).py: getOutputs*() / getContinuous*() - always return np.float64
* ModelicaSystemBase.py: define a basic version of ModelicaSystem
* ModelicaSystemRunner.py: definition of a 'runner' class using ModelicaSystemBasic / OMCSessionDummy (see PR OpenModelica#401)
* test_ModelicaSystemRunner.py: test case for ModelicaSystemRunner
* test_*: update of test cases based on above listed changes
This reverts commit eb312b41854b6310587e6be3cd1bed273e9197e0.
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

Successfully merging this pull request may close these issues.

1 participant