Metrics

This section allows you to define additional values that do not influence the simulation but are useful for reporting purposes. These values are calculated at each timestep and can be used to generate graphs in the dashboard.

You can define metrics using the same formula syntax as in the "Simulation Equations" section. Additionally, you can use the following special methods to aggregate variables:

  • groupby: can group variables in periods of time through the following syntax: {variable_reference}.groupby({period}, {aggregation}). For example: VA_profits.groupby(week, sum) to get the weekly profits.

  • cumsum: to get the cumulative sum of a variable throughout the simulation, timestep to timestep. The syntax is {variable_reference}.cumsum().

Last updated