Conversation
…o into separate *.mo components
… separate components
…the original version
…iles. Each subpackage corresponds to a standalone example
This reverts commit 898a667.
* Issue07 separate component (#11) * MSL version 3.2.3 * separate Interfaces/Substances/package.mo into separate components * separate the components within the package Interfaces.Compartments * Decompose the package BioChem.Interfaces.Nodes into separate components * Separate all components within Biochem/Interfaces/Reactions/package.mo into separate *.mo components * Decompose package BioChem/Interfaces/Reactions/Basics/package.mo into separate components * Separate BioChem/Interfaces/Reactions/Modifiers/package.mo into separate components * remove extra spaces from several modified package.mo * keep model declaration using partial or without partial identical to the original version * package.order files to be included in the repository * decompose BioChem/Compartments/package.mo into separate components * decompose BioChem/Substances/package.mo into separate components * Separate the Icons package within BioChem/package.mo into separate directory * Separate Biochem.Math package into a separate directory * Separate top models within the Biochem.Examples package * Separate all subpackages within Biochem.Examples into separate *.mo files. Each subpackage corresponds to a standalone example * Separate Biochem.Reactions.MichaelisMenten into separate components * separate Biochem.Reactions.MassAction.Reversible into separate components * decompose package Reactions.MassAction.Irreversible into separate components * Decompose Reactions.Inhibition into separate components * decompoase Reactions.FastEquilibrium into separate components * Decompose package Reactions into separate components * Develop 1.0.2 (#12) * MSL version 3.2.3 * separate Interfaces/Substances/package.mo into separate components * separate the components within the package Interfaces.Compartments * Decompose the package BioChem.Interfaces.Nodes into separate components * Separate all components within Biochem/Interfaces/Reactions/package.mo into separate *.mo components * Decompose package BioChem/Interfaces/Reactions/Basics/package.mo into separate components * Separate BioChem/Interfaces/Reactions/Modifiers/package.mo into separate components * remove extra spaces from several modified package.mo * keep model declaration using partial or without partial identical to the original version * package.order files to be included in the repository * decompose BioChem/Compartments/package.mo into separate components * decompose BioChem/Substances/package.mo into separate components * Separate the Icons package within BioChem/package.mo into separate directory * Separate Biochem.Math package into a separate directory * Separate top models within the Biochem.Examples package * Separate all subpackages within Biochem.Examples into separate *.mo files. Each subpackage corresponds to a standalone example * Separate Biochem.Reactions.MichaelisMenten into separate components * separate Biochem.Reactions.MassAction.Reversible into separate components * decompose package Reactions.MassAction.Irreversible into separate components * Decompose Reactions.Inhibition into separate components * decompoase Reactions.FastEquilibrium into separate components * Decompose package Reactions into separate components * ignore backup files * annotations for version 1.0.2 * Revert "ignore backup files" This reverts commit 898a667. * remove backup files * announcing version 1.0.2
v 1.0.2 / master
MSL 3.2.3 for version 1.0.2
Update ReadMe (MSL library version)
resolve merge conflicts
… the documentation
…m Icons when available
sjoelund
left a comment
There was a problem hiding this comment.
Remove that change to Modelica 4.0.0 and this can be merged as a squash and merge in the Github user interface. It's a whole lot of commits, but very few actual changes right now.
| </ul> | ||
| </body></html>"), | ||
| uses(Modelica(version = "3.2.3")), | ||
| uses(Modelica(version = "4.0.0")), |
There was a problem hiding this comment.
This cannot be changed without also running the conversion script. Running the conversion script will also move annotations around (because they are not at the end of the class in most BioChem libraries). I could apply this conversion in a few separate PRs if you want.
There was a problem hiding this comment.
Not really sure what is meant by conversion script? What is it? and how to run it?
There was a problem hiding this comment.
See Section 18.8.2 of the Modelica Specification
There was a problem hiding this comment.
To my understanding now, the conversion script should convert:
annotation(uses(Modelica(version="3.2.3")));
to
annotation(uses(Modelica(version="4.0.0")));
Is this the case, or should the script convert something else?
Also I think this annotation exist only in one place, so why having a conversion script?
Say we need to apply a conversion script, should I write one, or do we have a generic conversion script somewhere?
Should Biochem.mo includes the following command:
conversion(from(version = "3.2.3", to= "4.0.0"", script = "ConvertMSL3.2.3To4.0.0.mos"))
what should ConvertMSL3.2.3To4.0.0.mos include?
There was a problem hiding this comment.
The conversion script makes changes to the library. For example, Modelica.SIunits changed name to Modelica.Units.SI. No conversion script is needed in most cases (if you extend from something that changed interface, a new conversion script might be needed).
There was a problem hiding this comment.
Yes, modelica://Modelica/Resources/Scripts/Conversion/ConvertModelica_from_3.2.3_to_4.0.0.mos. I can apply that in a separate pair of pull requests. The changes applied are quite extensive (~140 kB diff file). It's a lot of things like:
- type Pressure= Modelica.SIunits.Pressure annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10})));
+ type Pressure= Modelica.Units.SI.Pressure annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10})));There was a problem hiding this comment.
Have changed to MSL 3.2.3
There was a problem hiding this comment.
I have attempted to execute the conversion script. Not sure how to do it correctly, since the associated description file does not state how to run it.
I have tried it with OMShell. Simply copying the script to the top folder (and again where package.mo is located):
>>> runScript("ConvertModelica_from_3.2.3_to_4.0.0.mos")
It does not work.
My other attempt is to extend the annotation (in the same way as MSL) as follows:
uses(Modelica(version = "3.2.3")),
version = "1.0.2",
conversion(
from(version = "3.2.3", script="modelica://Modelica/Resources/Scripts/Conversion/ConvertModelica_from_3.2.3_to_4.0.0.mos")),
Icon( ...
I also played with the above values, once 4.0.0, once 1.0.2 (with additional attribute to = "1.0.3". In all cases, I get a statement in OMEdit that OpenModelica currently does not support conversion scripts
How to execute the script?
There was a problem hiding this comment.
If you use the OpenModelica master, OMC can convert libraries in memory (but not save to file). I have some scripts locally for this.
There was a problem hiding this comment.
Recent commits have been integrated
Usage of MSL 4.0.0 after applying the conversion script
The Modelica grammar does not allow annotations except at the end of a class.
* Convert to MSL 4.0.0 * Update version number to 1.0.3
MSL 4.0.0
# Conflicts: # BioChem/Interfaces/Reactions/Basics/FourSubstrates.mo # BioChem/Units/package.mo
Main changes