Using the real-time features

Once the simulation is launched, you can visualize the model evolving in the 3D visualization screen, thanks to Java.

On top of that, you can visualize the temporal evolution of the curves you defined with the function set_plot, on the SDL window.

To interact with your simulation, the focus must be on the SDL window (the one with the curves). So, click on this window if it is not the case. Usually, the focus is already on this SDL window when launching the simulation with a Unix Terminal, but it is not the default behavior with an IDE in Windows.

The default commands you can use during the simulation are detailed hereafter. You can define your own command in userfctR/realtime/user_realtime_events.c, explanations to do it are given in the file.

To modify the simulation time

  • p: make a pause during the simulation, press again to stop this pause.

  • m: quit the simulation, a similar result can be obtained by clicking on the top corner cross (on some Azerty keyboards, this feature might appear on the comma key).

  • o: increase the simulation speed. The speed factor is indicated next to the speed indication. During a pause, this value corresponds to the target speed factor. Otherwise, it corresponds to the real speed factor.

  • l: decrease the simulation speed, similar to the key o.

  • g: go back in time for the Java visualization (only available during a pause). Press this key multiple times to go to the past moment you want to see. Adjust the speed factor (with the o and l keys), to get the desired time interval between two moments. Holding this key also works.

  • t: similar to the g key, but in the opposite direction.

To manipulate the graphs with the mouse (better to do this during a pause)

  • Use the mouse wheel to zoom in/out.

  • Click on your graph with the left mouse button and hold it down while moving the mouse to make translations.

  • Click on the right mouse button to switch the mouse effects:

    • acting on both the x and y coordinates

    • acting only on the y coordinate

    • acting only on the x coordinate

To manipulate the graphs with the keyboard keys

  • k: activate or not the signals auto-scaling. Signals whose values range highly differs from the first one are modified according to a linear mathematical rule described under the corresponding legend, so that all signals can easily be seen and compared in a single window, no matter their order of magnitude.

  • i: activate or not the plot auto-scaling. The y range is adapted to see all the curves when this plot auto-scaling is activated.

  • u, j: zoom in/out along the x or y axis. See the corresponding symbol. You can switch from horizontal to vertical effect by pressing the n key during a pause.

  • y, h: translation along the x or y axis. See the corresponding symbol. You can switch from horizontal to vertical effect by pressing the n key during a pause.

  • n: switch from horizontal to vertical effect for the u, j, y and h keys (only available during a pause).

Some other indications are also provided like the axes ranges, the simulation time (in s), the legend of the curves…