CycleBudgetScenario
Robotics scenarios · Implementation: mlsysim/engine/scenario_definitions/robotics/control.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Stage sub-budgets of one permission check against site’s declared WCET and deadline.
Notes
Equation: total is the worked quantity; each property below states its equation and units.
Assumptions: The named stage budgets add sequentially and the stage list is nonempty.
Excludes: Execution-time measurement, parallel overlap, and additional blocking/interference.
References
Derivation: The equations below follow the stated counts, geometric relations, or accounting definitions; scenario inputs are supplied assumptions or observations, not fitted predictions.
Examples
Execute the registered worked inputs; this is a modeled calculation.
>>> from mlsysim import Scenarios
>>> case = Scenarios.WarehouseEnforcerCycleBudget
>>> value = case.total
>>> print(f"{value.m_as('microsecond'):.3f} microsecond")
250.000 microsecondAttributes
| Name | Description |
|---|---|
| headroom | Microseconds left between the deadline and summed stage budgets. |
| site | |
| stages | |
| total | Sum of named stage time budgets in microseconds. |
Methods
| Name | Description |
|---|---|
| share | Dimensionless named-stage share of total stage time. |
| stage | Named stage duration in microseconds. |
stage
engine.scenario_types.CycleBudgetScenario.stage(name)Named stage duration in microseconds.
Equation: return dict(self.stages)[name].to(‘us’)
site
Type: Any.
Declared default: required.
stages
Type: List[Tuple[str, Quantity]].
Declared default: required.
total
engine.scenario_types.CycleBudgetScenario.total
Sum of named stage time budgets in microseconds.
Equation: return sum((q for _, q in self.stages), 0 * self.stages[0][1]).to(‘us’)
headroom
engine.scenario_types.CycleBudgetScenario.headroom
Microseconds left between the deadline and summed stage budgets.
Deadline left after the declared worst case.
Equation: return (self.site.enforcer_deadline - self.total).to(‘us’)