simulate_until
core.Simulate.simulate_until(
max_duration,
population,='and',
operator=False,
measure_time=0,
net_id )
Runs the network for the maximal duration in milliseconds. If the stop_condition
defined in the population becomes true during the simulation, it is stopped.
One can specify several populations. If the stop condition is true for any of the populations, the simulation will stop (‘or’ function).
Example:
= Population( ..., stop_condition = "r > 1.0 : any")
pop1 compile()
=1000.0, population=pop1) simulate_until(max_duration
Parameters
Name | Type | Description | Default |
---|---|---|---|
max_duration | float | Maximum duration of the simulation in milliseconds. | required |
population | Population | list[Population] | (list of) population(s) whose stop_condition should be checked to stop the simulation. |
required |
operator | Operator to be used (‘and’ or ‘or’) when multiple populations are provided (default: ‘and’). | 'and' |
|
measure_time | bool | Defines whether the simulation time should be printed (default=False). | False |
Returns
Name | Type | Description |
---|---|---|
the actual duration of the simulation in milliseconds. |