pastas.stressmodels.LinearTrend#

class pastas.stressmodels.LinearTrend(tstart: pandas.Timestamp | str | None = None, tend: pandas.Timestamp | str | None = None, name: str = 'trend', start: pandas.Timestamp | str | None = None, end: pandas.Timestamp | str | None = None)#

Stressmodel that simulates a linear trend.

Parameters:
  • tstart (str or Timestamp) – String with a date to start the trend (e.g., “2018-01-01”), will be transformed to an ordinal number internally.

  • tend (str or Timestamp) – String with a date to end the trend (e.g., “2018-01-01”), will be transformed to an ordinal number internally.

  • name (str, optional) – Name of the stressmodel. Default is “trend”.

Notes

While possible, it is not recommended to vary the parameters for the start and end time of the linear trend. These parameters are usually hard or even impossible to estimate from the data.

property stresses: tuple#

All the stress time series in the stressmodel as a tuple.

property nsplit: int#

Number of time series the contribution can be split in.

Methods#

set_init_parameters(→ None)

Set the initial parameters (back) to their default values.

simulate(→ pandas.Series)

Simulate the stressmodel's contribution.

to_dict(→ dict[str, Any])

Export the stressmodel to a dictionary.