:orphan:

****************
The command @run
****************

The command ``@run`` starts a simulation. It takes as input the name(s) of the phase(s) that should
be used, in that order::

  @run phase_name

or::

  @run phase_name1, phase_name2, ...

With :ref:`multiple runs <multiple-runs>`, one may label the different ``@run`` commands to be able to
refer to them in postprocessing::

  @run phase_name runlabel:run1
  ...
  @run phase_name runlabel:run2


.. _multiple-runs:

Multiple runs
*************

The simulation depends on the value of a number of parameters, such as
``n_subjects``, ``mechanism``, etc. It will use the values that are set at the point of the ``@run`` command.

In other words, it is possible to re-set the value of a parameter and perform a ``@run`` again. In a script
with several ``@run`` commands, use the label ``runlabel`` to label a ``@run`` command::

  n_subjects = 10
  @run phase_name runlabel:ten_individuals

  n_subjects = 100
  @run phase_name runlabel:hundred_individuals

These labels (``ten_individuals`` and ``hundred_individuals``) can then be used in the postprocessing stage in order to, for example,
plot the data from the simulation with ten individuals, or from the simulation with 100 individuals::

  runlabel = ten_individuals
  @vplot e->b  # Plots the associative strength betweeen e and b in the simulation with 10 individuals

  runlabel = hundred_individuals
  @vplot e->b  # Plots the associative strength betweeen e and b in the simulation with 100 individuals

