Overall model structure: Difference between revisions

From Mechanomy Composer Wiki
Jump to navigation Jump to search
(Created page with "Models are formatted according to [https://www.modelica.org/documents/ModelicaSpec34.pdf Modelica language specification 3.4] == Basic Format == model ModelName //declara...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
  model ModelName
  model ModelName
   //declarations
   //declarations
 
  equation
  equation
   //equations
   //equations
 
  annotation(
  annotation(
   experiment(StartTime=0, StopTime=1, Tolerance=0.01, Interval=0.1),
   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}),
   __Mechanomy_analyze(plot2D={x:time, y: varName})
  );
  );
  end ModelName;
  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.
Each declaration or equation line should be terminated with a semicolon, with arguments separated by commas.  Comments are indicated by the double forward slash.

Latest revision as of 17:52, 3 January 2020

Models are formatted according to Modelica language specification 3.4

Basic Format[edit]

model ModelName
  //declarations

equation
  //equations

annotation(
  experiment(StartTime=0, StopTime=1, Tolerance=0.01, Interval=0.1),
  __Mechanomy_analyze(plot2D={x:time, y: varName})
);
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.