Skip to content

Commit

Permalink
Migrate conversion to next major version
Browse files Browse the repository at this point in the history
Conversion for MSL v4.0.0 no longer is suitable, hence migrate to next major version.
  • Loading branch information
beutlich committed Jan 18, 2021
1 parent 312f116 commit 3032ac4
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 23 deletions.
Expand Up @@ -13,8 +13,6 @@ convertClass("Modelica.Fluid.Icons.BaseClassLibrary",
"Modelica.Icons.BasesPackage")
convertClass("Modelica.Icons.TypeComplex",
"Complex")
convertClass("Modelica.Utilities.System.getTime",
"Modelica.Utilities.Internal.Time.getTime")
convertClass("Modelica.Mechanics.MultiBody.Sensors.Internal.ZeroForceAndTorque",
"Modelica.Mechanics.MultiBody.Forces.Internal.ZeroForceAndTorque")
convertClass("Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport",
Expand Down
@@ -0,0 +1,5 @@
// Convert from Modelica 4.0.0 to Modelica 5.0.0

// Change references to classes that are removed from Modelica Standard Library
convertClass("Modelica.Utilities.System.getTime",
"Modelica.Utilities.Internal.Time.getTime")
21 changes: 0 additions & 21 deletions ModelicaTestConversion4.mo
Expand Up @@ -3029,27 +3029,6 @@ Conversion test for <a href=\"https://github.com/modelica/ModelicaStandardLibrar
end FluidHeatFlow;
end Thermal;

package Utilities
extends Modelica.Icons.ExamplesPackage;
model Issue3247 "Conversion test for #3247"
extends Modelica.Icons.Example;
Integer ms;
Integer sec;
Integer min;
Integer hour;
Integer day;
Integer mon;
Integer year;
equation
(ms, sec, min, hour, day, mon, year) = Modelica.Utilities.System.getTime();
annotation(experiment(StopTime=1), Documentation(info="<html>
<p>
Conversion test for <a href=\"https://github.com/modelica/ModelicaStandardLibrary/issues/3247\">#3247</a>.
</p>
</html>"));
end Issue3247;
end Utilities;

package Icons
extends Modelica.Icons.ExamplesPackage;
model Issue340 "Conversion test for #340"
Expand Down
37 changes: 37 additions & 0 deletions ModelicaTestConversion5.mo
@@ -0,0 +1,37 @@
package ModelicaTestConversion5
extends Modelica.Icons.ExamplesPackage;
package Utilities
extends Modelica.Icons.ExamplesPackage;
model Issue3247 "Conversion test for #3247"
extends Modelica.Icons.Example;
Integer ms;
Integer sec;
Integer min;
Integer hour;
Integer day;
Integer mon;
Integer year;
equation
(ms, sec, min, hour, day, mon, year) = Modelica.Utilities.System.getTime();
annotation(experiment(StopTime=1), Documentation(info="<html>
<p>
Conversion test for <a href=\"https://github.com/modelica/ModelicaStandardLibrary/issues/3247\">#3247</a>.
</p>
</html>"));
end Issue3247;
end Utilities;
annotation(uses(Modelica(version="4.0.0"), Complex(version="4.0.0")), Documentation(info="<html>
<p>
This library provides models and functions to test the MSL v5.0.0 conversion script \"ConvertModelica_from_4.0.0_to_5.0.0.mos\"
for conversion of Modelica libraries using MSL v4.0.0 to MSL v5.0.0. These models are not meant to be meaningful otherwise.
</p>
<p>
Copyright &copy; 2021, Modelica Association and contributors
</p>
<p>
<em>This Modelica package is <u>free</u> software and the use is completely at <u>your own risk</u>; it can be redistributed and/or modified under the terms of the 3-Clause BSD license. For license conditions (including the disclaimer of warranty) visit <a href=\"https://modelica.org/licenses/modelica-3-clause-bsd\">https://modelica.org/licenses/modelica-3-clause-bsd</a>.</em>
</p>
</html>"));
end ModelicaTestConversion5;

0 comments on commit 3032ac4

Please sign in to comment.