alive.core.resource.staffed_pool@1.4.0
Staffed pool
Where it applies
conditional workflow scenario; illustrative world. Domains: core. Populations: synthetic.
Not for
- empirical forecasts or claims about real systems
Assumptions
- One queue across the pool's steps: lowest class priority first, then earliest joined; non-preemptive.
- Service takes positive time, so an item never leaves in the instant it arrives (no zero-delay loops through the pool).
- Shift changes never interrupt service; when fewer are on duty, busy staff finish first.
- Breaks reduce staff on duty for their window; staff finish their current item first.
- With a weekly calendar the number on duty is constant within each hour of the week and repeats every week, starting at time zero with the first day (mon); breaks still repeat daily.
- A change during the run to servers, shifts, breaks or the weekly calendar (a scenario disturbance) takes effect at the time of the change: the number on duty is recomputed then. When it drops below the number busy, nobody is interrupted: items in service finish their drawn service time and no waiting item starts until the number busy is below the number on duty.
- A change to priorities during the run re-ranks the items waiting at that moment under the new priorities (ties still by earliest joined); items in service are not affected.
- Started from a state snapshot, the model continues from the stated situation: a snapshot taken from a running simulation restores every pending timer at its exact time and order, so the run continues exactly; a snapshot that gives only what an observer could know (who is where and for how long) is continued in distribution.
- An item in service in a snapshot that does not give its completion time has its time left drawn from the service-time distribution conditioned on the time already spent (rule alive.state.remaining.conditional_quantile@1); a constant service time leaves the constant minus the time spent.
Failure conditions
- Inputs outside the declared parameter ranges.
- A weekly calendar given for some days only, or together with shifts (refused at start).
- A calendar measured from an event log counts who recorded an event in each hour: a lower bound on who was at work, not a roster.
- A change during the run that adds a weekly calendar to a pool started without one, empties a day of the calendar, sets shifts beside a calendar, or cannot be read (the run stops with a message).
- Settings where staff going off duty hand work over, are interrupted, or stay late under a rule other than finishing the item in hand.
- A snapshot whose number busy or number on duty contradicts the items listed or the pool's own staffing parameters at the clock time (the run stops with a message).
Limitations
- No evidence assessed; draft passport. Tests check that a world started empty gives 1.3.0's events, that a run restarted from a snapshot taken mid-run continues with the same events, and a long initial queue against the exact transient answer for a memoryless queue; they are not recorded here as assessed evidence.
Parameters
| Name | Default | Provenance |
|---|---|---|
serversStaff on duty when no shifts are given (and the most on duty). May change during the run. | 2 servers | synthetic assumption Illustrative synthetic value; not measured or predictive. |
service_time0Service time at slot 0, drawn once per item and visit (keyed). | exponential(mean=300) seconds | synthetic assumption Illustrative synthetic value; not measured or predictive. |
service_time1Service time at slot 1, drawn once per item and visit (keyed). | exponential(mean=300) seconds | synthetic assumption Illustrative synthetic value; not measured or predictive. |
service_time2Service time at slot 2, drawn once per item and visit (keyed). | exponential(mean=300) seconds | synthetic assumption Illustrative synthetic value; not measured or predictive. |
service_time3Service time at slot 3, drawn once per item and visit (keyed). | exponential(mean=300) seconds | synthetic assumption Illustrative synthetic value; not measured or predictive. |
service_time4Service time at slot 4, drawn once per item and visit (keyed). | exponential(mean=300) seconds | synthetic assumption Illustrative synthetic value; not measured or predictive. |
service_time5Service time at slot 5, drawn once per item and visit (keyed). | exponential(mean=300) seconds | synthetic assumption Illustrative synthetic value; not measured or predictive. |
service_time6Service time at slot 6, drawn once per item and visit (keyed). | exponential(mean=300) seconds | synthetic assumption Illustrative synthetic value; not measured or predictive. |
service_time7Service time at slot 7, drawn once per item and visit (keyed). | exponential(mean=300) seconds | synthetic assumption Illustrative synthetic value; not measured or predictive. |
shiftsStaff on duty by time of day, e.g. '0-8:5,8-24:4'; empty means servers always. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
breaksBreaks: staff off duty within windows, "start-end:count" repeating daily ("12-13:2" takes two off from 12:00 to 13:00); empty means none. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
on_duty_monStaff on duty on the first day of the week (mon): comma-separated whole numbers that split the day into equal parts (24 values are one per hour; 1, 2, 3, 4, 6, 8 or 12 are longer blocks). Empty on all seven days means no weekly calendar. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
on_duty_tueStaff on duty on the second day of the week (tue): comma-separated whole numbers that split the day into equal parts (24 values are one per hour; 1, 2, 3, 4, 6, 8 or 12 are longer blocks). Empty on all seven days means no weekly calendar. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
on_duty_wedStaff on duty on the third day of the week (wed): comma-separated whole numbers that split the day into equal parts (24 values are one per hour; 1, 2, 3, 4, 6, 8 or 12 are longer blocks). Empty on all seven days means no weekly calendar. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
on_duty_thuStaff on duty on the fourth day of the week (thu): comma-separated whole numbers that split the day into equal parts (24 values are one per hour; 1, 2, 3, 4, 6, 8 or 12 are longer blocks). Empty on all seven days means no weekly calendar. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
on_duty_friStaff on duty on the fifth day of the week (fri): comma-separated whole numbers that split the day into equal parts (24 values are one per hour; 1, 2, 3, 4, 6, 8 or 12 are longer blocks). Empty on all seven days means no weekly calendar. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
on_duty_satStaff on duty on the sixth day of the week (sat): comma-separated whole numbers that split the day into equal parts (24 values are one per hour; 1, 2, 3, 4, 6, 8 or 12 are longer blocks). Empty on all seven days means no weekly calendar. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
on_duty_sunStaff on duty on the seventh day of the week (sun): comma-separated whole numbers that split the day into equal parts (24 values are one per hour; 1, 2, 3, 4, 6, 8 or 12 are longer blocks). Empty on all seven days means no weekly calendar. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. | |
prioritiesClass priorities, e.g. 'urgent:0,routine:1' (lower first); others are 0. May change during the run. | synthetic assumption Illustrative synthetic value; not measured or predictive. |