xsimlab.runtime¶
-
xsimlab.
runtime
(meth=None, args=None)¶ Function decorator applied to a method of a process class that is called during simulation runtime.
- Parameters
meth (callable, optional) – The method to wrap (leave it to None if you use this function as a decorator).
args (str or list or tuple, optional) –
One or several labels of values that will be passed as positional argument(s) of the method during simulation runtime. The following labels are defined:
batch_size
: total number of simulations run in the batchbatch
: current simulation number in the batchsim_start
: simulation start (date)timesim_end
: simulation end (date)timensteps
: total number of simulation stepsstep
: current step numberstep_start
: current step start (date)timestep_end
: current step end (date)timestep_delta
: current step duration
- Returns
The same method that can be called during a simulation with runtime data.
- Return type
runtime_method