histopath_bim_des.config.arrivals module

Arrival process configuration module for the histopath simulation model.

class histopath_bim_des.config.arrivals.ArrivalSchedule(*, rates: Sequence[float])[source]

Bases: BaseModel

An arrival schedule for specimens.

rates: Sequence[float]

Hourly arrival rates for the arrival process, for one week (168 hours).

static from_pd(df: DataFrame) ArrivalSchedule[source]

Construct an arrival schedule from a dataframe with the 24 hours the day as rows and the seven days of the week as columns (starting on Monday). Each value is the arrival rate for one hour of the week

Parameters:

df – The dataframe containing the arrival schedule information.

Returns:

The ArrivalSchedule object.

class histopath_bim_des.config.arrivals.ArrivalSchedules(*, cancer: ArrivalSchedule, noncancer: ArrivalSchedule)[source]

Bases: BaseModel

Dataclass for tracking the specimen arrival schedules of the histopathology model.

cancer: ArrivalSchedule

Arrival schedule for cancer pathway specimens.

noncancer: ArrivalSchedule

Arrival schedule for non-cancer pathway specimens.

static from_workbook(wbook: Workbook) ArrivalSchedules[source]

Construct a dataclass instance from an Excel workbook.

Parameters:

wbook – The Excel workbook to parse.

Returns:

The parsed dataclass instance.