histopath_bim_des.config.resources moduleο
Resource configuration module for the histopath simulation model.
- class histopath_bim_des.config.resources.ResourceSchedule(*, day_flags: Sequence[bool], allocation: Sequence[int])[source]ο
Bases:
BaseModel
A resource allocation schedule.
- day_flags: Sequence[bool]ο
True/1 if resource is scheduled for the day (MON to SUN), False/0 otherwise.
- allocation: Sequence[int]ο
Number of resource units allocated for the day (in 30-min intervals), if the corresponding day flag is set to 1. The list length is expected to be 48.
- static from_pd(df: DataFrame, row_name: str) ResourceSchedule [source]ο
Construct a resource schedule from a DataFrame row.
- Parameters:
df β The dataframe containing the resource allocation information.
row_name β The name of the resource, matching a row index in the inputted dataframe.
- class histopath_bim_des.config.resources.ResourceInfo(*, name: str, type: Literal['staff', 'machine'], schedule: ResourceSchedule)[source]ο
Bases:
BaseModel
Contains information about a resource.
- schedule: ResourceScheduleο
A schedule defining the number of allocated resource units over the course of a week.
- class histopath_bim_des.config.resources.ResourcesInfo(*, booking_in_staff: ResourceInfo, bms: ResourceInfo, cut_up_assistant: ResourceInfo, processing_room_staff: ResourceInfo, microtomy_staff: ResourceInfo, staining_staff: ResourceInfo, scanning_staff: ResourceInfo, qc_staff: ResourceInfo, histopathologist: ResourceInfo, bone_station: ResourceInfo, processing_machine: ResourceInfo, staining_machine: ResourceInfo, coverslip_machine: ResourceInfo, scanning_machine_regular: ResourceInfo, scanning_machine_megas: ResourceInfo)[source]ο
Bases:
BaseModel
Dataclass for tracking the staff resources of a model.
The fields in this dataclass MUST match the rows of the configuration Excel template (βResourcesβ tab), with all letters to lowercase, spaces to underscores, and other characters removed.
- booking_in_staff: ResourceInfoο
- bms: ResourceInfoο
- cut_up_assistant: ResourceInfoο
- processing_room_staff: ResourceInfoο
- microtomy_staff: ResourceInfoο
- staining_staff: ResourceInfoο
- scanning_staff: ResourceInfoο
- qc_staff: ResourceInfoο
- histopathologist: ResourceInfoο
- bone_station: ResourceInfoο
- processing_machine: ResourceInfoο
- staining_machine: ResourceInfoο
- coverslip_machine: ResourceInfoο
- scanning_machine_regular: ResourceInfoο
- scanning_machine_megas: ResourceInfoο
- static from_workbook(wbook: Workbook) ResourcesInfo [source]ο
Construct a dataclass instance from an Excel workbook.
- Parameters:
wbook β The Excel workbook to parse.
- Returns:
The parsed dataclass instance.