rubem.configuration.simulation_period.SimulationPeriod
- class SimulationPeriod(**data)[source]
-
Bases:
BaseModelPeriod of time covered by a simulation, in monthly steps.
- Parameters:
-
start (Union[date, datetime]) – The start date of the simulation period (also accepted as
start_date).end (Union[date, datetime]) – The end date of the simulation period (also accepted as
end_date).alignment (Optional[Union[date, datetime]]) – The date the step numbering is aligned to. If not provided, the start date is used.
- Raises:
-
ValueError – If the start date is not before the end date, or the alignment date is after the start date.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
Attributes
Number of the first simulated step, counted from the alignment month.
Number of the last simulated step, counted from the alignment month.
Number of simulated steps.
start_dateend_datealignment- property first_step: int
-
Number of the first simulated step, counted from the alignment month.
- property last_step: int
-
Number of the last simulated step, counted from the alignment month.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_by_alias': True, 'validate_by_name': True}
-
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property total_steps: int
-
Number of simulated steps.