Executing a Behavior

In order to perform early validation, you can execute a behavior within the Dynamic Behavior Modeling workbench etiher using the Execute command or the player .

This task shows you how to:


Before you begin:

In this section you will use a model from the Modelica Standard Library. You must therefore ensure that you have access to this library.

Related Topics
About Virtual Execution
Executing a Behavior with Interaction
Executing a Behavior Synchronized with Real Time
Managing a 2D Animation
Managing a 3D Animation
Setting up a Virtual Execution
DDE Communication with Dymosim

Execute a Behavior with the Execute Command

This section describes how to use the Execute command to perform a simulation and then show a 2D/3D animation.

  1. Activate a model from the Package Browser.

  2. Click Execute in the Execution toolbar.


    • A window containing a status bar is displayed. The status bar shows the progress of the simulation calculations.
    • When the simulation calculations are completed, the window closes and the Simulation Player toolbar is displayed.
    • The results of the simulation are shown as a list in the Variable Browser in the Dock.
    • If your model contains a 3D representation, a window containing the 3D representation is displayed.
    • The Messages Reporting dialog box appears to display information about the compilation.

  3. In the Simulation Player toolbar click Play Forward:

    Other options available on the Simulation Player toolbar are:

    Option Description

    Loop Mode

    : Plays a single animation.

    : Continuously repeats the animation from the start.

    : Continuously reverses the animation.

    Current Simulation Parameter box

    Displays the current timer value and units. You can enter a value in this box.

    Jump to begin

    Stops the simulation animation and resets the timer to the start value.

    Play Backward

    Plays the simulation animation backwards from the current position.

    Play Step Backward

    Plays the simulation animation backwards one step at a time.

    Pause

    Pauses the simulation animation.

    Play Step Forward

    Plays the simulation animation one step at a time.

    Play Forward

    Plays the simulation animation from the current position.

    Jump to End

    Stops the simulation animation and resets the timer to the end value.

    Seek slider control

    Displays the current timer value and units. You can drag the slider to change the timer value.

    SpeedFactor box and drop down list

    Displays the current speed factor and units (the speed factor is the value of one step when using the Play Step Backward and Play Step Forward commands). Use the drop down list to change the speed factor value.

    Important: The Simulation Player toolbar may be displayed before the simulation calculation has been completed. In these circumstances, if you position the Seek slider control at a time that is not yet computed, the animation will not be displayed anymore.

    The animation of the simulation is displayed. If your model contains a 3D representation, the 3D representation is also animated. At the timer end value, the animation stops.

  4. To end the execution, do one of the following:

    • Click Simulate in the Virtual Execution toolbar.
    • Close the Simulation Player toolbar.

Execute a Behavior with the Player

With the compass, the virtual execution is computed and the 2D/3D animation starts.

  1. Select a model from the Component Browser.

  2. Select Play from the Compass.



    • The animation starts via a 3D viewer or via the diagram.

      A control bar appears that enables you to control the simulation.



    • The Variable Browser appears from the Dock to display the result of the simulation.
    • The Messages Reporting dialog box appears to display information about the compilation.

  3. To end the execution, deactivate Play from the Compass.