Skip to content

ModelicaSystem update __init__() - #350

Merged
adeas31 merged 15 commits into
OpenModelica:masterfrom
syntron:ModelicaSystem_init
Nov 13, 2025
Merged

ModelicaSystem update __init__()#350
adeas31 merged 15 commits into
OpenModelica:masterfrom
syntron:ModelicaSystem_init

Conversation

@syntron

@syntronsyntron commented Aug 23, 2025

Copy link
Copy Markdown
Contributor

see issue #305

This PR splits __init__() into two parts:

  • __init__() - main initialisation
  • model() - all model related definitions (was old: definition())

This allows to use convertFmu2Mo() after a instanciation of ModelicaSystem() for the definition of the model to be used (this should be done in a separate PR)

Defined as a draft to allow a discussion; this will be a breaking change of the API! => milestone 4.1.0?

based on top of PR #349

@adeas31adeas31 added this to the 4.1.0 milestone Aug 25, 2025
@syntron
syntronforce-pushed the ModelicaSystem_init branch from 5bfd5b7 to 297c77cCompareAugust 25, 2025 20:23
@syntron
syntron marked this pull request as ready for review August 25, 2025 20:36
@syntron
syntronforce-pushed the ModelicaSystem_init branch from 297c77c to df4805aCompareAugust 26, 2025 18:58
@syntronsyntron mentioned this pull request Sep 18, 2025
@adeas31

Copy link
Copy Markdown
Member

Please rebase.

@syntron

Copy link
Copy Markdown
ContributorAuthor

Please rebase.

Done; see also #361 for an overview

@syntron
syntronforce-pushed the ModelicaSystem_init branch 4 times, most recently from ae66564 to 18dd4f2CompareNovember 5, 2025 22:03
@adeas31

Copy link
Copy Markdown
Member

Need to rebase again.

Comment threadOMPython/ModelicaSystem.py Outdated

@adeas31adeas31 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This is a breaking change as the interface to ModelicaSystem is changed so please update the UsersGuide accordingly https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/ompython.html#ompython
At sometime we should also include all the new features of OMPython in UsersGuide.

@adeas31
adeas31 merged commit ea1cdcc into OpenModelica:masterNov 13, 2025
14 checks passed
@casella

Copy link
Copy Markdown

@syntron, please see #374

@syntron
syntron deleted the ModelicaSystem_init branch November 13, 2025 20:27
@syntronsyntron mentioned this pull request Dec 2, 2025
@adeas31adeas31 modified the milestones: 4.1.0, 5.0.0Dec 16, 2025
Sign up for freeto 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.

3 participants

@syntron@adeas31@casella