Attention
This project is still in an early phase of development.
The python API is not yet stable, and some aspects of the schema for the blueprint and workplan will likely evolve. Therefore whilst you are welcome to try out using the package, we cannot yet guarantee backwards compatibility. We expect to reach a more stable version in 2026.
cstar.simulation.Simulation.restart#
- Simulation.restart(new_end_date: str | datetime) Simulation#
Create a new Simulation instance starting from the end date of the current simulation.
This method generates a deep copy of the current simulation and updates its start date to match the current simulation’s end date. The new simulation may require additional modifications, such as setting restart files, which should be implemented in subclasses.
- Parameters:
new_end_date (str or datetime) – The end date for the restarted simulation.
- Returns:
Simulation – A new simulation instance with updated parameters for continuing the previous simulation.
- Raises:
ValueError – If new_end_date is not of type str or datetime.