Overall model structure

From Mechanomy Composer Wiki
Revision as of 17:52, 3 January 2020 by Unknown user (talk)
Jump to navigation Jump to search

Models are formatted according to Modelica language specification 3.4

Basic Format

model ModelName
  //declarations

equation
  //equations

annotation(
  experiment(StartTime=0, StopTime=1, Tolerance=0.01, Interval=0.1),
  __Mechanomy_analyze(plot2D={x:time, y: varName, linestyle: dash, linecolor:red,pointstyle: dot, pointcolor: green}),
);
end ModelName;

Each declaration or equation line should be terminated with a semicolon, with arguments separated by commas. Comments are indicated by the double forward slash.