histopath_bim_des.config.distributions module

Defines a dataclass for a discrete probability distribution on the integers.

class histopath_bim_des.config.distributions.DistributionInfo(*, type: Literal['Constant', 'Triangular', 'PERT'], low: float, mode: float, high: float, time_unit: Literal['s', 'm', 'h'])[source]

Bases: BaseModel

Information describing a three-point random distributions for task durations.

type: Literal['Constant', 'Triangular', 'PERT']

The type of the distribution, one of β€˜Constant’, β€˜Triangular’, or β€˜PERT’.

low: float

The minimum value of the distribution.

mode: float

The most likely value of the distribution.

high: float

The maximum of the distribution.

time_unit: Literal['s', 'm', 'h']

The time unit of the distribution, i.e. seconds, minutes, or hours. Represented by the first letter; the validator will accept any string starting with β€˜s’, β€˜m’, or β€˜h’.

class histopath_bim_des.config.distributions.IntDistributionInfo(*, type: Literal['Constant', 'IntTriangular', 'IntPERT'], low: int, mode: int, high: int)[source]

Bases: BaseModel

Information describing a discretised three-point random distribution. The underlying continuous distribution is constructed with parameters (low - 0.5, mode, high + 0.5).

type: Literal['Constant', 'IntTriangular', 'IntPERT']

Type of the distribution.

low: int

Minimum value of the distribution.

mode: int

Most likely value of the distribution, before discretisation.

high: int

Maximum value of the distribution.