rgrow.Simulation.evolve#
- Simulation.evolve(state_index: int = 0, for_events: int | None = None, total_events: int | None = None, for_time: float | None = None, total_time: float | None = None, size_min: int | None = None, size_max: int | None = None, for_wall_time: float | None = None, require_strong_bound: bool = True)#
Evolve a particular state, with index state_index, subject to some bounds. Runs state 0 by default.
By default, this requires a strong bound (the simulation will eventually end, eg, not a size or other potentially unreachable bound). Releases the GIL during the simulation.
- Parameters:
- state_indexint, optional
The index of the state to evolve. Defaults to 0, and creates sufficient states if they do not already exist.
- for_eventsint, optional
Evolve until this many events have occurred. Defaults to no limit. (Strong bound)
- total_eventsint, optional
Evolve until this many events have occurred in total. Defaults to no limit. (Strong bound)
- for_timefloat, optional
Evolve until this much (physical) time has passed. Defaults to no limit. (Strong bound)
- total_timefloat, optional
Evolve until this much (physical) time has passed since the state creation. Defaults to no limit. (Strong bound)
- size_minint, optional
Evolve until the system has this many, or fewer, tiles. Defaults to no limit. (Weak bound)
- size_maxint, optional
Evolve until the system has this many, or more, tiles. Defaults to no limit. (Weak bound)
- for_wall_timefloat, optional
Evolve until this much (wall) time has passed. Defaults to no limit. (Strong bound)
- require_strong_boundbool, optional
If True (default), a ValueError will be raised unless at least one strong bound has been set, ensuring that the simulation will eventually end. If False, ensure only that some weak bound has been set, which may result in an infinite simulation.
- Returns:
- EvolveOutcome
The stopping condition that caused the simulation to end.