itesla / ipsl

The iTesla Power System Library is a Modelica library developed as part of the iTesla project. The library contains a set of power system component models for phasor time domain simulations.
Mozilla Public License 2.0
23 stars 71 forks source link

Version Management and Backward Compatibility #32

Open MaximeBaudette opened 8 years ago

MaximeBaudette commented 8 years ago

I found the following in Modelica Doc:

In a top-level class, the version number and the dependency to earlier versions of this class are defined using one or more of the following annotations:

  • version = CURRENT-VERSION-NUMBER Defines the version number of the model or package. All classes within this top-level class have this version number.
  • conversion ( noneFromVersion = VERSION-NUMBER) Defines that user models using the VERSION-NUMBER can be upgraded to the CURRENT-VERSION-NUMBER of the current class without any changes.
  • conversion ( from (version = VERSION-NUMBER, script = "…") ) Defines that user models using the VERSION-NUMBER can be upgraded to the CURRENT-VERSION-NUMBER of the current class by applying the given script. The semantics of the conversion script is not defined.
  • uses(IDENT (version = VERSION-NUMBER) ) Defines that classes within this top-level class uses version VERSION-NUMBER of classes within the toplevel class IDENT.

Maybe we should try to implement this, but we need to find out more with the syntax of the script for Dymola. I can already add when there is no conversion needed in the next version.

dietmarw commented 8 years ago

You can find details on the Dymola syntax with the MSL: https://trac.modelica.org/Modelica/browser/Modelica/trunk/Modelica/Resources/Scripts/Dymola/Description.txt

Mind that there is an ongoing process to finally standardise the Modelica Script language https://trac.modelica.org/Modelica/ticket/1443 which lead to https://trac.modelica.org/Modelica/ticket/1622 So there is hope that there will be one standard solution that is also supported by tools other than Dymola.

dietmarw commented 8 years ago

In case that was not clear, for version numbers you should stick to the http://semver.org/ principle.

MaximeBaudette commented 8 years ago

@dietmarw Don't worry, I got it for the version numbering :-) Good news if the scripting is standardized... That was a jungle to find information about it otherwise.