histopath_bim_des.config.runners module

Runner-related configuration module for the histopath simulation model.

class histopath_bim_des.config.runners.ProcessDoorMap(*, Reception: str | Sequence[str], cutup: str | Sequence[str], Processing: str | Sequence[str], Microtomy: str | Sequence[str], Staining: str | Sequence[str], Labelling: str | Sequence[str], Scanning: str | Sequence[str], QC: str | Sequence[str])[source]

Bases: BaseModel

A mapping of process stages to door names. Each door name corresponds to a room where the the process takes place.

Note that some processes (e.g., cutup) may take place in multiple rooms.

reception: str | Sequence[str]
cutup: str | Sequence[str]
processing: str | Sequence[str]
microtomy: str | Sequence[str]
staining: str | Sequence[str]
labelling: str | Sequence[str]
scanning: str | Sequence[str]
qc: str | Sequence[str]
class histopath_bim_des.config.runners.PathDefinition(*, path: tuple[str, str], duration_seconds: float)[source]

Bases: BaseModel

Defines a direct path between two doors, with a travel duration.

path: tuple[str, str]
duration_seconds: float
class histopath_bim_des.config.runners.RunnerExtraDurations(*, loading_time: float | str, unloading_time: float | str)[source]

Bases: BaseModel

Defines runner durations independent of the travel distance, i.e. loading and unloading times.

loading_time: float | str
unloading_time: float | str
class histopath_bim_des.config.runners.RunnerConfig(*, door_map: ProcessDoorMap, runner_speed: float, cutup_dist: Sequence[float], extra_paths: Sequence[PathDefinition], extra_durations: RunnerExtraDurations)[source]

Bases: BaseModel

Configuration dataclass for runner-related parameters.

door_map: ProcessDoorMap
runner_speed: float
cutup_dist: Sequence[float]
extra_paths: Sequence[PathDefinition]
extra_durations: RunnerExtraDurations
static from_excel(wbook: Workbook) Self[source]

Generate a RunnerConfig from an Excel file.

Parameters:

wbook (Workbook) – The Excel file to parse.

Returns:

the parsed RunnerConfig.

Return type:

RunnerConfig

class histopath_bim_des.config.runners.RunnerTimesConfig(*, reception_cutup: float, cutup_processing: float, processing_microtomy: float, microtomy_staining: float, staining_labelling: float, labelling_scanning: float, scanning_qc: float, extra_loading: float, extra_unloading: float)[source]

Bases: BaseModel

Configuration dataclass containing runner times between process stages.

reception_cutup: float
cutup_processing: float
processing_microtomy: float
microtomy_staining: float
staining_labelling: float
labelling_scanning: float
scanning_qc: float
extra_loading: float
extra_unloading: float
static from_workbook(wbook: Workbook, speed: float | None = None) RunnerTimesConfig[source]

Construct a dataclass instance from an Excel workbook.

Parameters:

wbook (Workbook) – The Excel workbook to parse.

Returns:

The parsed dataclass instance.

Return type:

RunnerTimesConfig