.ModelicaReference.Classes.'model'

Information

Define specialized class model

Examples

model SlidingMass
  parameter Modelica.Units.SI.Mass m=1;
  parameter Modelica.Units.SI.Force f=1;
  Modelica.Units.SI.Position s;
  Modelica.Units.SI.Velocity v;
  Modelica.Units.SI.Acceleration a;
equation
  der(s) = v;
  der(v) = a;
  m*a = f;
end SlidingMass;

Syntax

   [ encapsulated ][ partial] model
   IDENT class_specifier

class_specifier :
   string_comment composition end IDENT
   | "=" base_prefix name [ array_subscripts ] [ class_modification ] comment
   | "=" enumeration "(" ( [enum_list] | ":" ) ")" comment

See Modelica Grammar for further details.

Description

The keyword model is identical to the keyword class, i.e., no restrictions and no enhancements.


Generated at 2024-12-03T19:25:34Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos