dict_based_kinetic_parameter#
Defines a kinetic parameter, that is constant over time.
- class DictBasedKineticParameter(values: dict[float, +T_co])#
Bases:
Generic[T_co]A kinetic parameter which value depends on the timestamp and given by a dict.
Missing value will be interpolated by using the last known value.
- values#
A dictionary mapping the timestamp to the value of the kinetic parameter.
Initializes a dict based kinetic parameter.
- Parameters:
values – A dict mapping the timestamp to the value of the kinetic parameter.
- Raises:
ZeroNotSetError – If no value for the timestamp 0 is provided.
- get_at_timestamp(run: int, t: float) T_co#
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.
- 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.