Skip to main content

OperationalLoadScenario

Economics scenarios · Implementation: mlsysim/engine/scenario_definitions/economics.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

Assumed operational-load shapes for N models: alerts a N, deployments N ln N, and pairwise conflicts c N^2 against one team’s team_capacity.

The shapes are a sketch, not measurements; crossing_models is the first model count whose total reaches the capacity.

Notes

Equation: The constructed load is a*n + n*ln(n) + c*n**2, compared with team_capacity on an integer grid.

Assumptions: Common abstract work units and a capacity crossing within 1..max_models.

Excludes: Empirical staffing forecasts and confidence intervals; if no crossing exists the current argmax selection returns the first grid point.

References

Derivation: The linear alert term, n*ln(n) deployment term, and quadratic conflict term are deliberately constructed workload shapes, not fitted laws. Adding them is meaningful only because the caller places them in common work units; the integer grid then locates a crossing of the supplied team capacity.

Examples

>>> from mlsysim import Scenarios
>>> s = Scenarios.OperationalLoadSketch
>>> len(s.model_counts()) == s.max_models
True

Attributes

Name Description
alerts_per_model
conflict_coefficient
crossing_models First grid count selected by the capacity-crossing mask; callers must ensure a crossing exists.
max_models
team_capacity

Methods

Name Description
alerts Illustrative alert work proportional to model count; scalar or array input is accepted.
conflicts Illustrative coordination work proportional to squared model count.
deployments Illustrative deployment work n*ln(n); this is a chosen growth shape, not measured cost.
model_counts Integer model-count grid from one through max_models.
total Sum of alert, deployment, and conflict work in the scenario’s common capacity units.

alerts

engine.scenario_types.OperationalLoadScenario.alerts(n)

Illustrative alert work proportional to model count; scalar or array input is accepted.

Equation: alerts_per_model * n.

conflicts

engine.scenario_types.OperationalLoadScenario.conflicts(n)

Illustrative coordination work proportional to squared model count.

Equation: conflict_coefficient * n ** 2.

deployments

engine.scenario_types.OperationalLoadScenario.deployments(n)

Illustrative deployment work n*ln(n); this is a chosen growth shape, not measured cost.

Equation: n * _np.log(n).

model_counts

engine.scenario_types.OperationalLoadScenario.model_counts()

Integer model-count grid from one through max_models.

Equation: _np.arange(1, max_models + 1).

total

engine.scenario_types.OperationalLoadScenario.total(n)

Sum of alert, deployment, and conflict work in the scenario’s common capacity units.

Equation: alerts(n) + deployments(n) + conflicts(n).

alerts_per_model

Type: float.

Declared default: required.

conflict_coefficient

Type: float.

Declared default: required.

team_capacity

Type: float.

Declared default: required.

max_models

Type: int.

Declared default: required.

crossing_models

engine.scenario_types.OperationalLoadScenario.crossing_models

First grid count selected by the capacity-crossing mask; callers must ensure a crossing exists.

Equation: n = model_counts(); int(n[int(_np.argmax(total(n) >= team_capacity))]).

Back to top