Upgrade

class Upgrade "Upgrade from Former Versions"
    extends Modelica.Icons.Information;

    annotation (Documentation(info = "<html>\n<p>\nIf different versions of the MultiBody library are not\ncompatible to each other, corresponding conversion scripts are\nprovided. As a result, models build with an older version\nof the MultiBody library are automatically converted to the\nnew version when the model is loaded. The user is prompted\nwhether automatic conversion shall take place or not.\nProblems are not to be expected. Still one should first make\na copy of such a model as backup before the conversion\nis performed.\n</p>\n<p>\n<strong>Upgrade from ModelicaAdditions.MultiBody</strong>\n</p>\n<p>\nThere is now also a conversion script from the \"old\"\n<strong>ModelicaAdditions.MultiBody</strong> library to the\n\"new\" Modelica.Mechanics.MultiBody library. This script is also\nautomatically invoked. Since the differences between the \"old\" and the\n\"new\" MultiBody library are so large, not everything is\nconverted and it might be that some pieces have to\nbe adapted manually. Still, this script is useful, since\nmany class names, parameters and modifiers are\nautomatically converted.\n</p>\n<p>\nComponents from the following sublibraries\nare automatically converted\nto the Modelica.Mechanics.MultiBody library:\n</p>\n<ul>\n<li> ModelicaAdditions.MultiBody.Parts</li>\n<li> ModelicaAdditions.MultiBody.Joints</li>\n<li> ModelicaAdditions.MultiBody.Forces</li>\n<li> Part of ModelicaAdditions.MultiBody.Interfaces</li>\n</ul>\n<p>\nModels using the ModelicaAdditions.MultiBody library\nthat are programmed with <strong>equations</strong> are only partly converted:\nThe Frame connectors will be converted to the \"new\"\nFrame connectors of the MultiBody library, but the equations\nthat reference variables of the Frame connectors will\n<strong>not</strong> be converted. For a manual conversion, the following\ntable might be helpful showing how the <strong>variables</strong> of the\n\"old\" and the \"new\" <strong>Frame connectors</strong> are\nrelated to each other (resolve2 and angularVelocity2 are\nfunctions from library Modelica.Mechanics.MultiBody.Frames):\n</p>\n<table border=1 cellspacing=0 cellpadding=2>\n<tr><th><strong>ModelicaAdditions.MultiBody.<br>\n           Interfaces.Frame_a</strong></th>\n    <th><strong>MultiBody.Interfaces.Frame_a</strong></th></tr>\n<tr>\n  <td>frame_a.<strong>r0</strong></td>\n  <td>= frame_a.r_0 (is converted)</td>\n</tr>\n<tr>\n  <td>frame_a.<strong>S</strong></td>\n  <td>= transpose(frame_a.R)</td>\n</tr>\n<tr>\n  <td>frame_a.<strong>v</strong></td>\n  <td>= resolve2(frame_a.R, <strong>der</strong>(frame_a.r_0))</td>\n</tr>\n<tr>\n  <td>frame_a.<strong>w</strong></td>\n  <td>= angularVelocity2(frame_a.R)</td>\n</tr>\n<tr>\n  <td>frame_a.<strong>a</strong></td>\n  <td>= resolve2(frame_a.R, <strong>der</strong>(v_0)); v_0 = der(r_0)</td>\n</tr>\n<tr>\n  <td>frame_a.<strong>z</strong></td>\n  <td>= <strong>der</strong>(w);  w = angulaVelocity2(frame_a.R)</td>\n</tr>\n<tr>\n  <td>frame_a.<strong>f</strong></td>\n  <td>= frame_a.f (no conversion needed)</td>\n</tr>\n<tr>\n  <td>frame_a.<strong>t</strong></td>\n  <td>= frame_a.t (no conversion needed)</td>\n</tr>\n</table>\n<p>\n<strong>Upgrade from MultiBody 0.99 (and earlier) to 1.0 (and later)</strong>\n</p>\n<p>\nThe conversion from MultiBody 0.99 to 1.0 does not work in some rare\ncases, where own components are implemented using functions of the\nMultiBody.Frames package. In this case, the conversion has to be\nperformed manually. The changes in 1.0 with regards to 0.99 are:\n</p>\n<p>\nThe definition of the Modelica.Mechanics.MultiBody.Frames.Orientation object has changed.\nIn 0.99 this was just an alias type for a transformation matrix\n(now Modelica.Mechanics.MultiBody.Frames.TransformationMatrices.Orientation).\nIn 1.0 the orientation object is a record holding the\ntransformation matrix from frame 1 to frame 2 and the angular\nvelocity of the transformation matrix resolved in frame 2.\nThe reason is that this allows to compute the angular velocity\nin many cases by standard recursive formulas and not by\ndifferentiation of the transformation matrix. This is usually\nmuch more efficient. As a consequence, the following\ncalls in 0.99 should be changed:\n</p>\n<pre>\n   Frames.angularVelocity1(T,der(T)) -> Frames.angularVelocity1(T)\n   Frames.angularVelocity2(T,der(T)) -> Frames.angularVelocity2(T)\n   Frames.from_T(T)                  -> Frames.from_T2(T,der(T))\n</pre>\n</html>"));
end Upgrade;