Skip to content

alive.core.resource.staffed_pool@1.4.0

Staffed pool

One group of staff serving up to eight steps from one queue, with class priorities and staffing that changes by time of day or by hour of the week; changes to staffing and priorities during a run take effect when they happen; a run can start from a stated situation (a state snapshot).

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

NameDefaultProvenance
servers

Staff on duty when no shifts are given (and the most on duty). May change during the run.

2 serverssynthetic assumption

Illustrative synthetic value; not measured or predictive.

service_time0

Service time at slot 0, drawn once per item and visit (keyed).

exponential(mean=300) secondssynthetic assumption

Illustrative synthetic value; not measured or predictive.

service_time1

Service time at slot 1, drawn once per item and visit (keyed).

exponential(mean=300) secondssynthetic assumption

Illustrative synthetic value; not measured or predictive.

service_time2

Service time at slot 2, drawn once per item and visit (keyed).

exponential(mean=300) secondssynthetic assumption

Illustrative synthetic value; not measured or predictive.

service_time3

Service time at slot 3, drawn once per item and visit (keyed).

exponential(mean=300) secondssynthetic assumption

Illustrative synthetic value; not measured or predictive.

service_time4

Service time at slot 4, drawn once per item and visit (keyed).

exponential(mean=300) secondssynthetic assumption

Illustrative synthetic value; not measured or predictive.

service_time5

Service time at slot 5, drawn once per item and visit (keyed).

exponential(mean=300) secondssynthetic assumption

Illustrative synthetic value; not measured or predictive.

service_time6

Service time at slot 6, drawn once per item and visit (keyed).

exponential(mean=300) secondssynthetic assumption

Illustrative synthetic value; not measured or predictive.

service_time7

Service time at slot 7, drawn once per item and visit (keyed).

exponential(mean=300) secondssynthetic assumption

Illustrative synthetic value; not measured or predictive.

shifts

Staff 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.

breaks

Breaks: 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_mon

Staff 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_tue

Staff 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_wed

Staff 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_thu

Staff 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_fri

Staff 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_sat

Staff 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_sun

Staff 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.

priorities

Class 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.