Annotation: Difference between revisions

From Mechanomy Composer Wiki
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:


Successive entries should be comma separated.
Successive entries should be comma separated.
<code>
=== Example ===
annotation(
annotation(
  experiment(StartTime=0, StopTime=1, Tolerance=0.01, NumberOfIntervals=20),
  experiment(StartTime=0, StopTime=1, Tolerance=0.01, NumberOfIntervals=20),
  __Mechanomy_analyze(plot2D=[{x:world.frame_b.r_0[1], y:world.frame_b.r_0[2], linecolor:black}, {x:lowerArm.frame_b.r_0[1], y: lowerArm.frame_b.r_0[2], linecolor:red}, {x:upperArm.frame_b.r_0[1], y: upperArm.frame_b.r_0[2], linecolor:orange},  {x:bucket.frame_b.r_0[1], y: bucket.frame_b.r_0[2], linecolor:green}]),
  __Mechanomy_analyze( plot2D={x:time, y:revWL.phi} ),
  __Mechanomy_analyze(plot2D=[{x:time, y: revWL.phi, linecolor:red}, {x:time, y: revLU.phi, linecolor:green}, {x:time, y: revUB.phi, linecolor:blue}]),
  __Mechanomy_analyze( plot2D={x:time, y:revWL.frame_a.f[1]} )
  __Mechanomy_analyze(plot2D=[{x:revWL.phi, y: revWL.frame_a.f[2], linecolor:red}, {x:revLU.phi, y: revLU.frame_a.f[2], linecolor:green}, {x:revUB.phi, y: revUB.frame_a.f[2], linecolor:blue}] )
);
);
</code>

Latest revision as of 17:45, 3 January 2020

The annotation object adds meta information to the model or component.

Model Annotation[edit]

When used to annotate a model, the annotation comes after the equation section and before the final end.

It is most often used to provide the experiment and __Mechanomy_analyze options. experiment configures the simulation by specifying the start and stop times, solution tolerance, and step size or number of intervals. __Mechanomy_analyze provides quick plotting of simulation results.

Successive entries should be comma separated.

Example[edit]

annotation(
  experiment(StartTime=0, StopTime=1, Tolerance=0.01, NumberOfIntervals=20),
  __Mechanomy_analyze( plot2D={x:time, y:revWL.phi} ),
  __Mechanomy_analyze( plot2D={x:time, y:revWL.frame_a.f[1]} )
);