.ModelicaReference.Annotations.version

Information

Define version information of package

Examples

package Modelica
  annotation(version="2.1",
             conversion(noneFromVersion="2.1 Beta 1",
                        from(version="1.5",
                             script="convertFromModelica1_5.mos")));
  ...
end Modelica;

model A
  annotation(version="1.0",
     uses(Modelica(version="1.5")));
  ...
end A;

model B
  annotation(uses(Modelica(version="2.1 Beta 1")));
  ...
end B;

In this example the model A uses an older version of the Modelica library and can be upgraded using the given script, and model B uses an older version of the Modelica library but no changes are required when upgrading.

Description

Version numbers are of the forms:

The main release versions are ordered using the hierarchical numerical names, and follow the corresponding pre-release versions. The pre-release versions of the same main release version are internally ordered alphabetically.

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:

A top-level class, IDENT, with version VERSION-NUMBER can be stored in one of the following ways in a directory given in the MODELICAPATH:

This allows a tool to access multiple versions of the same package.

Related annotations:

Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39