Show
Ignore:
Timestamp:
03/04/08 08:33:20 (6 months ago)
Author:
dietmarw
Message:

added versionBuild and versionDate to ModelicaReference and set the svn:keywords (Id, Author, Date, Revision)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ModelicaReference/package.mo

    • Property svn:keywords set to Author Date Id Revision
    r953 r1099  
    11within ; 
    22package ModelicaReference "Modelica Reference" 
    3 annotation (DocumentationClass=true, Documentation(info="<html> 
    4 <p> 
    5 This package is a reference to Modelica keywords and Modelica builtin  
    6 operators and is based on the  
     3annotation (DocumentationClass=true, 
     4    versionBuild="$Rev$", 
     5    versionDate="$Date::                            $", 
     6    Documentation(info="<html> 
     7<p> 
     8This package is a reference to Modelica keywords and Modelica builtin 
     9operators and is based on the 
    710<a href=\"http://www.modelica.org/documents/ModelicaSpec30.pdf\">Modelica Language Specification version 3.0</a> from Sept. 2007. 
    811 
     
    2326</p> 
    2427<p> 
    25 <i>The <b>ModelicaReference</b> package is <b>free</b> software;  
     28<i>The <b>ModelicaReference</b> package is <b>free</b> software; 
    2629it can be redistributed and/or modified 
    2730under the terms of the <b>Modelica license</b>, see the license conditions 
    28 and the accompanying <b>disclaimer</b>  
     31and the accompanying <b>disclaimer</b> 
    2932<a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i> 
    3033</p><br> 
     
    5861<h4><font color=\"#008000\">Examples</font></h4> 
    5962 
    60 <pre><b>replaceable model</b> MyResistor=Resistor  
     63<pre><b>replaceable model</b> MyResistor=Resistor 
    6164  <b>annotation</b>(choices( 
    6265              choice(redeclare MyResistor=lib2.Resistor(a={2}) \"...\"), 
    6366              choice(redeclare MyResistor=lib2.Resistor2 \"...\"))); 
    6467 
    65 <b>replaceable</b> Resistor Load(R=2) constrainedby TwoPin  
     68<b>replaceable</b> Resistor Load(R=2) constrainedby TwoPin 
    6669  <b>annotation</b>(choices( 
    6770              choice(redeclare lib2.Resistor Load(a={2}) \"...\"), 
     
    9194 
    9295<p> 
    93 A declaration can have an annotation \"choices\" containing modifiers on choice, where each of them indicates a suitable redeclaration or modifications of the element.  
     96A declaration can have an annotation \"choices\" containing modifiers on choice, where each of them indicates a suitable redeclaration or modifications of the element. 
    9497This is a hint for users of the model, and can also be used by the user interface to suggest reasonable redeclaration, where the string comments on the choice declaration can be used as textual explanations of the choices.  The annotation is not restricted to replaceable elements but can also be applied to non-replaceable elements, enumeration types, and simple variables. 
    9598</p> 
     
    198201</p> 
    199202 
    200 <pre> function foo0  
     203<pre> function foo0 
    201204   ... 
    202205   input Real x; 
     
    208211 end foo0; 
    209212 
    210  function foo1  
     213 function foo1 
    211214   ... 
    212215   input Real x; 
     
    219222   annotation(derivative(order=2)=foo2); 
    220223 end foo1; 
    221     
    222  function foo2  
     224 
     225 function foo2 
    223226   ... 
    224227   input Real x; 
     
    256259    The derivative function is only valid if input_var1 is independent 
    257260    of the variables the function call is  differentiated with respect to 
    258     (i.e. that the derivative of input_var1 is \"zero\").  
     261    (i.e. that the derivative of input_var1 is \"zero\"). 
    259262    The derivative of input_var1 is excluded from the argument list of the derivative-function. 
    260263    Assume that function f takes a matrix and a scalar. Since the matrix argument is 
     
    266269  input Real y[:, 2]; 
    267270  output Real z; 
    268   annotation(derivative(zeroDerivative=y) = f_der,  
     271  annotation(derivative(zeroDerivative=y) = f_der, 
    269272             derivative=f_general_der); 
    270273algorithm 
     
    289292algorithm 
    290293  ... 
    291 end f_general_der;  
     294end f_general_der; 
    292295 
    293296</pre></li> 
     
    297300    is computed as f(input_var1, ...). The derivative of input_var2 
    298301    is excluded from the argument list of the derivative-function. 
    299     Assume that function fg is defined as a composition f(x, g(x)).  
     302    Assume that function fg is defined as a composition f(x, g(x)). 
    300303    When differentiating f it is useful to give the derivative under the 
    301304    assumption that the second argument is defined in this way: 
     
    303306  input Real x; 
    304307  output Real z; 
    305 algorithm  
     308algorithm 
    306309   z := f(x, g(x)); 
    307310end fg; 
     
    313316  annotation(derivative(noDerivative(y = g(x))) = f_der); 
    314317algorithm 
    315   ...  
     318  ... 
    316319end f; 
    317320 
     
    322325  output Real z_der; 
    323326algorithm 
    324   ...  
     327  ... 
    325328end f_der; 
    326329</pre> 
     
    344347  <b>parameter</b> Boolean animation = true; 
    345348  <b>parameter</b> Modelica.SIunits.Length length \"Length of shape\" 
    346      <b>annotation</b>(Dialog(enable = animation, tab = \"Animation\",  
     349     <b>annotation</b>(Dialog(enable = animation, tab = \"Animation\", 
    347350                        group = \"Shape definition\")); 
    348351  ... 
     
    386389 
    387390<pre>documentation_annotation: 
    388    <b>annotation</b>\"(\" Documentation \"(\" \"info\" \"=\" STRING  
     391   <b>annotation</b>\"(\" Documentation \"(\" \"info\" \"=\" STRING 
    389392                            [\",\" \"revisions\" \"=\" STRING ] \")\" \")\" 
    390393</pre> 
     
    419422    annotation (Documentation(info="<html> 
    420423<p> 
    421 Define schematic animation of diagram layer  
     424Define schematic animation of diagram layer 
    422425</p> 
    423426 
     
    431434<pre><b>annotation</b>( 
    432435  Icon(graphics={Rectangle( 
    433     extent=<b>DynamicSelect</b>({{0,0},{20,20}},{{0,0},{20,level}}),  
    434     fillColor=<b>DynamicSelect</b>({0,0,255},  
     436    extent=<b>DynamicSelect</b>({{0,0},{20,20}},{{0,0},{20,level}}), 
     437    fillColor=<b>DynamicSelect</b>({0,0,255}, 
    435438                            <b>if</b> overflow <b>then</b> {255,0,0} <b>else</b> {0,0,255}))} 
    436439); 
     
    460463<h4><font color=\"#008000\">Syntax</font></h4> 
    461464 
    462 <pre>   <b>annotation</b>\"(\" Evaluate \"=\" ( <b>false</b> | <b>true</b> ) \")   
    463 </pre> 
    464  
    465  
    466 <h4><font color=\"#008000\">Description</font></h4> 
    467  
    468 <p> 
    469 Has only an effect for a declaration with the prefix parameter.  
    470 </p> 
    471  
    472 <p> 
    473 If Evaluate = true, the model developer proposes to utilize the value for the symbolic processing. In that case, it is not possible to change the parameter value after symbolic pre-processing.  
     465<pre>   <b>annotation</b>\"(\" Evaluate \"=\" ( <b>false</b> | <b>true</b> ) \") 
     466</pre> 
     467 
     468 
     469<h4><font color=\"#008000\">Description</font></h4> 
     470 
     471<p> 
     472Has only an effect for a declaration with the prefix parameter. 
     473</p> 
     474 
     475<p> 
     476If Evaluate = true, the model developer proposes to utilize the value for the symbolic processing. In that case, it is not possible to change the parameter value after symbolic pre-processing. 
    474477</p> 
    475478 
     
    489492    annotation (Documentation(info="<html> 
    490493<p> 
    491 Define default experiment parameters  
     494Define default experiment parameters 
    492495</p> 
    493496 
     
    504507 
    505508experimentOption: 
    506    StartTime  \"=\" [\"+\" | \"-\"] UNSIGNED_NUMBER |  
     509   StartTime  \"=\" [\"+\" | \"-\"] UNSIGNED_NUMBER | 
    507510   StopTime   \"=\" [\"+\" | \"-\"] UNSIGNED_NUMBER | 
    508511   Tolerance  \"=\" UNSIGNED_NUMBER 
     
    513516 
    514517<p> 
    515 The experiment annotation defines the default start time (StartTime) in [s], the default stop time (StopTime) in [s], and the default relative integration tolerance (Tolerance) for simulation experiments to be carried out with the model or block at hand.  
     518The experiment annotation defines the default start time (StartTime) in [s], the default stop time (StopTime) in [s], and the default relative integration tolerance (Tolerance) for simulation experiments to be carried out with the model or block at hand. 
    516519</p> 
    517520 
     
    528531<h4><font color=\"#008000\">Syntax</font></h4> 
    529532 
    530 <pre>   <b>annotation</b>\"(\" HideResult \"=\" ( <b>false</b> | <b>true</b> ) \")   
     533<pre>   <b>annotation</b>\"(\" HideResult \"=\" ( <b>false</b> | <b>true</b> ) \") 
    531534</pre> 
    532535 
     
    558561<h4><font color=\"#008000\">Syntax</font></h4> 
    559562 
    560 <pre>   <b>annotation</b>\"(\" Inline \"=\" ( <b>false</b> | <b>true</b> ) \")   
    561 </pre> 
    562  
    563  
    564 <h4><font color=\"#008000\">Description</font></h4> 
    565  
    566 <p> 
    567 Has only an effect within a function declaration.  
     563<pre>   <b>annotation</b>\"(\" Inline \"=\" ( <b>false</b> | <b>true</b> ) \") 
     564</pre> 
     565 
     566 
     567<h4><font color=\"#008000\">Description</font></h4> 
     568 
     569<p> 
     570Has only an effect within a function declaration. 
    568571</p> 
    569572 
     
    574577 
    575578<p> 
    576 If \"Inline = false\", the model developer proposes to not inline the function.  
     579If \"Inline = false\", the model developer proposes to not inline the function. 
    577580</p> 
    578581 
     
    593596<h4><font color=\"#008000\">Syntax</font></h4> 
    594597 
    595 <pre>   <b>annotation</b>\"(\" LateInline \"=\" ( <b>false</b> | <b>true</b> ) \")   
     598<pre>   <b>annotation</b>\"(\" LateInline \"=\" ( <b>false</b> | <b>true</b> ) \") 
    596599</pre> 
    597600 
     
    603606</p> 
    604607 
    605 <p>  
    606 If \"LateInline = true\", the model developer proposes to inline the function after all symbolic transformations have been performed, but before common subexpression elimination takes place.  
     608<p> 
     609If \"LateInline = true\", the model developer proposes to inline the function after all symbolic transformations have been performed, but before common subexpression elimination takes place. 
    607610</p> 
    608611 
     
    660663 
    661664<pre>preferred view_annotation: 
    662    <b>annotation</b>\"(\" preferredView \"=\" (\"info\" | \"diagram\" | \"text\") \")\"   
     665   <b>annotation</b>\"(\" preferredView \"=\" (\"info\" | \"diagram\" | \"text\") \")\" 
    663666</pre> 
    664667 
     
    682685<h4><font color=\"#008000\">Syntax</font></h4> 
    683686 
    684 <pre>   <b>annotation</b>\"(\" smoothOrder \"=\" UNSIGNED_INTEGER \")\"  
     687<pre>   <b>annotation</b>\"(\" smoothOrder \"=\" UNSIGNED_INTEGER \")\" 
    685688</pre> 
    686689 
     
    721724 
    722725<b>model</b> A 
    723   <b>annotation</b>(version=\"1.0\",  
     726  <b>annotation</b>(version=\"1.0\", 
    724727     uses(Modelica(version=\"1.5\"))); 
    725728  ... 
     
    759762 
    760763<p> 
    761 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.  
     764The 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. 
    762765</p> 
    763766 
     
    776779 
    777780<li> <code>conversion ( from (version = VERSION-NUMBER, script = \"?\") )       </code><br> 
    778      Defines that user models using the VERSION-NUMBER can be upgraded to  
     781     Defines that user models using the VERSION-NUMBER can be upgraded to 
    779782     the CURRENT-VERSION-NUMBER of the current class by applying the given 
    780783     script. The semantics of the conversion script is not defined.<br>&nbsp;</li> 
     
    818821<h4><font color=\"#008000\">Examples</font></h4> 
    819822 
    820 <pre><b>connector</b> Frame \"Frame of a mechanical system\"  
     823<pre><b>connector</b> Frame \"Frame of a mechanical system\" 
    821824    ... 
    822   <b>flow</b> Modelica.SIunits.Force f[3] <b>annotation</b>(unassignedMessage =  
     825  <b>flow</b> Modelica.SIunits.Force f[3] <b>annotation</b>(unassignedMessage = 
    823826\"All Forces cannot be uniquely calculated. The reason could be that the 
    824 mechanism contains a planar loop or that joints constrain the same motion.  
    825 For planar loops, use in one revolute joint per loop the option  
     827mechanism contains a planar loop or that joints constrain the same motion. 
     828For planar loops, use in one revolute joint per loop the option 
    826829PlanarCutJoint=true in the Advanced menu. 
    827830\"); 
     
    882885A block class is the same as a model class 
    883886with the restriction that each connector component of a block must 
    884 have prefixes input and/or output for all connector variables.  
     887have prefixes input and/or output for all connector variables. 
    885888The purpose is to model input/output blocks of block diagrams. 
    886889Due to the restrictions on input and output prefixes, 
     
    961964in connect statements. In connectors, no equations are allowed in the 
    962965definition or in any of its components. 
    963 With respect to \"class\", it is enhanced to allow connect(..) to components  
     966With respect to \"class\", it is enhanced to allow connect(..) to components 
    964967of connector classes. 
    965968</P> 
     
    10061009 
    10071010<p> 
    1008 The syntax and semantics of a function have many similarities to those of the block  
    1009 specialized class. A function has many of the properties of a general class,  
     1011The syntax and semantics of a function have many similarities to those of the block 
     1012specialized class. A function has many of the properties of a general class, 
    10101013e.g. being able to inherit other functions, or to redeclare or modify 
    10111014elements of a function declaration. 
    10121015</p> 
    10131016 
    1014 <p>  
    1015 Modelica functions have the following restrictions compared to a  
     1017<p> 
     1018Modelica functions have the following restrictions compared to a 
    10161019general Modelica class: 
    10171020</p> 
     
    10221025     by the keyword output. All public variables are formal parameters.</li> 
    10231026 
    1024 <li> Input formal parameters are read-only after being bound to the  
     1027<li> Input formal parameters are read-only after being bound to the 
    10251028     actual arguments or default values, i.e., they may not be assigned 
    10261029     values in the body of the function.</li> 
     
    10371040     its body, and it may not be partial.</li> 
    10381041 
    1039 <li> A function cannot contain calls to the Modelica built-in operators  
     1042<li> A function cannot contain calls to the Modelica built-in operators 
    10401043     der, initial, terminal, sample, pre, edge, change, reinit, delay, 
    10411044     cardinality, to the operators of the built-in package Connections, 
     
    10591062 
    10601063<p> 
    1061 Modelica functions have the following enhancements compared to a general Modelica class:  
     1064Modelica functions have the following enhancements compared to a general Modelica class: 
    10621065</p> 
    10631066 
     
    11231126<P> 
    11241127The keyword model is identical to the keyword class, i.e., 
    1125 no restrictions and no enhancements.  
     1128no restrictions and no enhancements. 
    11261129</P> 
    11271130</html>")); 
     
    12141217order to group variables. Only public sections are allowed in the definition 
    12151218or in any of its components (i.e., equation, algorithm, initial equation, 
    1216 initial algorithm and protected sections are not allowed). May not be used in  
    1217 connections. The elements of a record may not have prefixes input, output, inner, outer,  
    1218 or flow.  Enhanced with implicitly available record constructor function.  
     1219initial algorithm and protected sections are not allowed). May not be used in 
     1220connections. The elements of a record may not have prefixes input, output, inner, outer, 
     1221or flow.  Enhanced with implicitly available record constructor function. 
    12191222Additionally, record components can be used as component references in 
    12201223expressions and in the left hand side of assignments, subject to 
     
    13071310  <tr><td>.*, ./, .^</td> 
    13081311      <td>a .* b</td> 
    1309       <td>element-wise multiplication, division and exponentation of  
     1312      <td>element-wise multiplication, division and exponentation of 
    13101313          scalars and arrays</td></tr> 
    13111314 
     
    14711474 valign=\"top\"> 
    14721475      <p><span 
    1473  class=\"CODE\"><span  
     1476 class=\"CODE\"><span 
    14741477 >{2,3}&nbsp; [5,6]</span></span></p> 
    14751478      <p><span 
    1476  class=\"CODE\"><span  
     1479 class=\"CODE\"><span 
    14771480 >[2,3; 7,8]</span></span></p> 
    14781481      </td> 
     
    15211524      <p><span class=\"CODE\"><span>a+b</span></span><span>,</span><span class=\"CODE\"><span>&nbsp; 
    15221525a-b, +a, -a</span></span></p> 
    1523       <p><span class=\"CODE\"><span  
     1526      <p><span class=\"CODE\"><span 
    15241527 >[1,2;3,4].+[2,3;5,6]</span></span></p> 
    15251528      </td> 
     
    15301533      </td> 
    15311534      <td valign=\"top\"> 
    1532       <p><span class=\"CODE\"><span  
     1535      <p><span class=\"CODE\"><span 
    15331536 >&lt;</span></span><span 
    1534  class=\"CODE\"><span  
     1537 class=\"CODE\"><span 
    15351538 >&nbsp;&nbsp;&lt;=</span></span><span 
    1536  class=\"CODE\"><span  
     1539 class=\"CODE\"><span 
    15371540 >&nbsp;&nbsp;&gt;</span></span><span 
    1538  class=\"CODE\"><span  
     1541 class=\"CODE\"><span 
    15391542 >&nbsp;&nbsp;&gt;=</span></span><span 
    1540  class=\"CODE\"><span  
     1543 class=\"CODE\"><span 
    15411544 >&nbsp;&nbsp;==</span></span><span 
    1542  class=\"CODE\"><span  
     1545 class=\"CODE\"><span 
    15431546 >&nbsp;&nbsp;&lt;&gt;</span></span></p> 
    15441547      </td> 
    15451548      <td valign=\"top\"> 
    1546       <p><span class=\"CODE\"><span  
     1549      <p><span class=\"CODE\"><span 
    15471550 >a&lt;b</span></span><span 
    15481551 >,</span><span class=\"CODE\"><span 
     
    15541557      <td valign=\"top\"> 
    15551558      <p><span 
    1556  class=\"CODE\"><span  
     1559 class=\"CODE\"><span 
    15571560 >...</span></span></p> 
    15581561      </td> 
     
    15711574      </td> 
    15721575      <td valign=\"top\"> 
    1573       <p><span class=\"CODE\"><span  
     1576      <p><span class=\"CODE\"><span 
    15741577 >not</span></span><span 
    1575  class=\"CODE\"><span  
     1578 class=\"CODE\"><span 
    15761579 >&nbsp;</span></span><i><span 
    15771580 >expr</span></i></p> 
    15781581      </td> 
    15791582      <td valign=\"top\"> 
    1580       <p><span class=\"CODE\"><span  
     1583      <p><span class=\"CODE\"><span 
    15811584 >not b1</span></span></p> 
    15821585      </td> 
     
    15871590      </td> 
    15881591      <td valign=\"top\"> 
    1589       <p><span class=\"CODE\"><span  
     1592      <p><span class=\"CODE\"><span 
    15901593 >and</span></span></p> 
    15911594      </td> 
    15921595      <td valign=\"top\"> 
    1593       <p><span class=\"CODE\"><span  
     1596      <p><span class=\"CODE\"><span 
    15941597 >b1 and b2</span></span></p> 
    15951598      </td> 
     
    16001603      </td> 
    16011604      <td valign=\"top\"> 
    1602       <p><span class=\"CODE\"><span  
     1605      <p><span class=\"CODE\"><span 
    16031606 >or</span></span></p> 
    16041607      </td> 
    16051608      <td valign=\"top\"> 
    1606       <p><span class=\"CODE\"><span  
     1609      <p><span class=\"CODE\"><span 
    16071610 >b1 or&nbsp; b2</span></span></p> 
    16081611      </td> 
     
    16171620  >:</span></span><span 
    16181621 >&nbsp; <i>expr</i>&nbsp; </span><span 
    1619  class=\"CODE\"><span  
     1622 class=\"CODE\"><span 
    16201623 >:</span></span><span >&nbsp; 
    16211624      <i>expr</i></span></p> 
    16221625      </td> 
    16231626      <td valign=\"top\"> 
    1624       <p><span class=\"CODE\"><span  
     1627      <p><span class=\"CODE\"><span 
    16251628 >1:5</span></span><span 
    16261629 >,</span><span class=\"CODE\"><span 
     
    16341637      </td> 
    16351638      <td valign=\"top\"> 
    1636       <p><span class=\"CODE\"><span  
     1639      <p><span class=\"CODE\"><span 
    16371640 >if</span></span><span 
    16381641 >&nbsp;&nbsp;<i>expr</i>&nbsp; 
     
    16451648      </td> 
    16461649      <td valign=\"top\"> 
    1647       <p><span class=\"CODE\"><span  
     1650      <p><span class=\"CODE\"><span 
    16481651 >if b then 3 else x</span></span></p> 
    16491652      </td> 
     
    16581661      </td> 
    16591662      <td valign=\"top\"> 
    1660       <p><span class=\"CODE\"><span  
     1663      <p><span class=\"CODE\"><span 
    16611664 >x = 2.26</span></span></p> 
    16621665      </td> 
     
    16691672  >=</span></span><span 
    16701673 > and assignment </span><span 
    1671  class=\"CODE\"><span  
     1674 class=\"CODE\"><span 
    16721675 >:=</span></span><span 
    16731676 > are not expression operators since they are 
     
    16981701Elementary operators, such as \"+\" or \"-\" are overloaded and 
    16991702operate on scalar and array variables. Other operators 
    1700 have the same syntax as a  
     1703have the same syntax as a 
    17011704<a href=\"Modelica:ModelicaReference.Classes.Function\">Modelica function</a> 
    1702 call. However, they do not behave as a Modelica function,  
    1703 either because the result depends not only on the input arguments but  
     1705call. However, they do not behave as a Modelica function, 
     1706either because the result depends not only on the input arguments but 
    17041707also on the status of the simulation (such as \"pre(..)\"), or 
    17051708the function operates on input arguments of different types 
    17061709(such as \"String(..)\"). Neither of these \"functions\" 
    1707 can be defined with a \"standard\" Modelica function and are  
     1710can be defined with a \"standard\" Modelica function and are 
    17081711therefore builtin operators of the Modelica language 
    17091712(with exception of the basic mathematical functions, 
     
    18091812<ul> 
    18101813<li> level = AssertionLevel.error:<br> 
    1811      The current evaluation is aborted. The simulation may  
     1814     The current evaluation is aborted. The simulation may 
    18121815     continue with another evaluation [e.g., with a shorter step-size, 
    18131816     or by changing the values of iteration variables]. 
     
    18191822     terminal()=true triggers an assert, the analysis failed. </li> 
    18201823<li> level = AssertionLevel.warning:<br> 
    1821      The current evaluation is not aborted. message indicates  
    1822      the cause of the warning [It is recommended to report the  
     1824     The current evaluation is not aborted. message indicates 
     1825     the cause of the warning [It is recommended to report the 
    18231826     warning only once when the condition becomes false, and it is 
    18241827     reported that the condition is no longer violated when the 
     
    20672070</p> 
    20682071<blockquote><pre> 
    2069 <b>cross</b>(x,y) = <b>vector</b>( [ x[2]*y[3]-x[3]*y[2];   
    2070                        x[3]*y[1]-x[1]*y[3];   
     2072<b>cross</b>(x,y) = <b>vector</b>( [ x[2]*y[3]-x[3]*y[2]; 
     2073      &