constant_kinetic_parameter#
Defines a kinetic parameter, that is constant over time.
- class ConstantKineticParameter(distribution: Distribution[T])#
Bases:
Generic[T]A constant kinetic parameter.
- samples#
The kinetic parameters for each run (time series) of the current simulation.
- Type:
Optional[list[~T]]
- distribution#
The distribution for possible values of the kinetic parameter.
Initializes a constant kinetic parameter.
- Parameters:
distribution – The distribution for possible values of the kinetic parameter.
- get_at_timestamp(run: int, t: float) T#
Returns the kinetic parameters at the given timestamp.
- Parameters:
t – The timestamp, at which the kinetic parameters are needed.
run – The run (time series) of the current simulation.
- Returns:
The kinetic parameters at the given timestamp.
- Raises:
RuntimeError – If the the samples have not been prepared. Preparation is done by calling the method prepare_samples.
- prepare_samples(n: int) None#
Prepares a sample of the kinetic parameter.
This method is called before a new simulation starts.
- Parameters:
n – The number of samples to prepare.
- set_for_run(run: int, value: T) None#
Sets the kinetic parameter for the given run.
- Parameters:
run – The run number of the current simulation.
value – The value of the kinetic parameter for the given run.
- Raises:
RuntimeError – If the the samples have not been prepared. Preparation is done by calling the method prepare_samples.
RuntimeError – If the run index is too large.