histopath_bim_des.distribution module
Random distributions for the simulation model.
This module overrides the salabim.Constant and salabim.Triangular classes to provide better string representations, and adds a PERT distribution.
See: https://en.wikipedia.org/wiki/PERT_distribution
- class histopath_bim_des.distribution.Constant(value: float, time_unit: str = None, randomstream: Any = None, env: Environment = None)[source]
Bases:
Constant
Constant distribution.
- class histopath_bim_des.distribution.Tri(low: float, mode: float | None = None, high: float | None = None, time_unit: str | None = None, randomstream=None, env: Environment | None = None)[source]
Bases:
Triangular
Triangular distribution.
- _low
Minimum of the distribution
- _mode
Mode of the distribution. If None, replaced with the mean of _low and _high.
- _high
Maximum of the distribution. If None, replaced with _min, thus forming a constant distribution.
- class histopath_bim_des.distribution.PERT(low: float, mode: float | None = None, high: float | None = None, time_unit: str | None = None, randomstream=None, env: Environment | None = None)[source]
Bases:
Triangular
PERT distribution.
A three-point distribution with more probability mass around the mode than the triangular distribution. The mean of the distribution is (_low + _shape * _mode + _high) / (_shape + 2). By default, _shape = 4.
- _low
Minimum of the distribution.
- _mode
Mode of the distribution. If None, replaced with the mean of _low and _high.
- _high
Maximum of the distribution. If None, replaced with _min, thus forming a constant distribution.
- histopath_bim_des.distribution.Distribution
A continuous distribution (constant, triangular, or PERT).
- class histopath_bim_des.distribution.IntPERT(low: int, mode: int, high: int, randomstream=None, env: Environment | None = None)[source]
Bases:
object
Discretized PERT distribution.
- low
Minimum of the distribution.
- mode
Mode of the distribution.
- high
Maximum of the distribution.
- pert
Underlying continuous PERT distribution, i.e. PERT(low-mode-0.5, 0, high-mode+0.5).
- class histopath_bim_des.distribution.IntTri(low: int, mode: int, high: int, randomstream=None, env: Environment | None = None)[source]
Bases:
object
Discretized Triangular distribution.
- low
Minimum of the distribution.
- mode
Mode of the distribution.
- high
Maximum of the distribution.
- tri
Underlying continuous Tri distribution, i.e. Tri(low-mode-0.5, 0, high-mode+0.5).
- class histopath_bim_des.distribution.IntConstant(value: int, randomstream=None, env: Environment = None)[source]
Bases:
Constant
Alias of sim.Constant for integers.
- histopath_bim_des.distribution.IntDistribution
A continuous distribution (constant, triangular, or PERT).
alias of
IntConstant
|IntTri
|IntPERT