Optimize queue staffing SLA
Invert an Erlang-C queue across weighted demand scenarios to find the lowest expected-cost staffing level that satisfies a wait-time SLA.
What it's for
Finds the cheapest staffing level that still meets a wait-time target, across weighted demand scenarios rather than one assumed load.
Turns incident and support demand into an explainable staffing decision with stability, utilization, SLA probability, and breach economics.
What you give it
Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.
| Field | Type | Role | Required |
|---|---|---|---|
| breach_cost_per_event | number ≥ 0 | Your calibration | Yes |
| demand_scenarios | array of objects (4 fields) | Evidence | Yes |
| maximum_servers | integer ≥ 1, ≤ 500 | Your calibration | Yes |
| required_scenario_coverage | number ≥ 0, ≤ 1 | Your calibration | Yes |
| server_cost_per_hour | number ≥ 0 | Your calibration | Yes |
| sla_wait_minutes | number ≥ 0 | Your calibration | Yes |
| target_probability_within_sla | number ≥ 0, ≤ 1 | Your calibration | Yes |
Each demand_scenarios
record
| Field | Type | Required |
|---|---|---|
| arrival_rate_per_hour | number (≥ 0) | Yes |
| id | string (non-empty) | Yes |
| mean_service_minutes | number (> 0) | Yes |
| probability | number (≥ 0, ≤ 1) | Yes |
{
"breach_cost_per_event": 200,
"demand_scenarios": [
{
"arrival_rate_per_hour": 4,
"id": "normal",
"mean_service_minutes": 15,
"probability": 0.8
},
{
"arrival_rate_per_hour": 10,
"id": "surge",
"mean_service_minutes": 15,
"probability": 0.2
}
],
"maximum_servers": 12,
"required_scenario_coverage": 1,
"server_cost_per_hour": 50,
"sla_wait_minutes": 15,
"target_probability_within_sla": 0.9
} What you get back
This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.
{
"assumptions": [
"Each scenario is a stationary M/M/c queue with Poisson arrivals, exponential service, identical parallel responders, and no abandonment.",
"Scenario probabilities represent the planning-period demand mixture and sum to one.",
"Breach cost is the marginal expected cost per event missing the wait-time SLA, in the same hourly units as staffing cost.",
"Use the delivery digital twin when arrivals, service, routing, priorities, or rework materially violate Erlang-C assumptions."
],
"constraints": {
"maximum_servers": 12,
"required_scenario_coverage": 1,
"sla_wait_minutes": 15,
"target_probability_within_sla": 0.9
},
"decision": "staffing_plan_found",
"evaluated_staffing_levels": 12,
"maximum_server_diagnostic": null,
"method": "scenario_weighted_erlang_c_staffing_v1",
"minimum_staffing_meeting_sla": 4,
"recommended_staffing": {
"expected_breach_cost_per_hour": 29.2,
"expected_probability_within_sla": 0.9849,
"expected_total_cost_per_hour": 229.2,
"scenario_probability_meeting_target": 1,
"scenarios": [
{
"expected_breaches_per_hour": 0.0041,
"probability_within_sla": 0.999,
"scenario_id": "normal",
"stable": true,
"utilization": 0.25
},
{
"expected_breaches_per_hour": 0.7137,
"probability_within_sla": 0.9286,
"scenario_id": "surge",
"stable": true,
"utilization": 0.625
}
],
"servers": 4,
"staffing_cost_per_hour": 200
}
} How it works
Constrained optimization — Pick the best feasible option under real limits — budget, headcount, dependencies, capacity — rather than ranking a list and hoping it fits.
- 1 Invert an Erlang-C queue across weighted demand scenarios to find the lowest expected-cost staffing level that satisfies a wait-time SLA.
- 2 Evaluate the method-specific diagnostics and gates returned by the function, then abstain unless the declared decision clears them under locally governed thresholds.
Before you trust it
Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.
Assumptions & guardrails
- Objectives use commensurable locally governed value units, constraints reflect real feasibility, and uncertainty covers plausible adverse inputs.
- The recommendation is optimal only for its stated objective, feasible set, evidence, and solver guarantee; it is not a universal management optimum.
Minimum evidence
- demand_scenarios: required and organization-defined
- sla_wait_minutes: required and organization-defined
- target_probability_within_sla: required and organization-defined
- required_scenario_coverage: required and organization-defined
- server_cost_per_hour: required and organization-defined
- breach_cost_per_event: required and organization-defined
- maximum_servers: required and organization-defined
How to validate it
Backtest the chosen action against simple feasible baselines on held-out scenarios, sweep costs/constraints/risk tolerance, and require constraint feasibility under adverse inputs.
Calibrating it to your org
Same for everyone
The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.
Specific to you
- metric/outcome definitions, entity grain, observation window, costs, thresholds, priors, and constraints represented by the function inputs
Calibration workflow
- 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
- 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
- 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.
Call it from your AI
You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.
gitrevio_capabilities_search
{ "q": "invert an erlangc queue across weighted" }
→ finds "optimize_queue_staffing_sla"
gitrevio_capability_describe
{ "capability_id": "optimize_queue_staffing_sla" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "optimize_queue_staffing_sla", "arguments": { ... } }
→ returns the result shown above Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.
Related tools
Allocate attention budget
Use exact knapsack optimization to allocate limited expert-review time by expected avoided loss.
Allocate capacity by marginal value
Allocate indivisible aggregate capacity across initiative-specific diminishing marginal-value scenario curves, activation thresholds, hard minimum commitments, unit cost, and portfolio CVaR with discrete next-unit value and explicit solver certainty.
Allocate capacity nash bargaining
Allocate discrete shared capacity by weighted Nash social welfare over concave team utility curves, with disagreement guarantees and a utilitarian counterfactual.
Calculate engineering runway
Compare three-point roadmap effort with three-point team capacity and expose unfunded commitments.
Calculate hidden work tax
Translate unplanned work, rework, incidents, and coordination into capacity and cost leakage.
Calculate shadow price of capacity
Calculate lumpy, discrete capacity shadow prices by re-optimizing a scenario-valued initiative portfolio after a governed increment to each resource, with CVaR penalty and explicit exact or heuristic solver status.