BaseScenario
Shared contracts scenarios · Implementation: mlsysim/engine/scenario_definitions/base.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Base for calculation scenarios: a name, a description, and stated inputs.
Notes
Equation: Use the dimensional products, ratios, or selection rules documented on the calculated properties below.
Assumptions: A variant shares unchanged nested objects and does not revalidate replacement fields.
Excludes: A variant is not a deep clone or a validation boundary.
References
Derivation: the calculated properties below state their defining arithmetic and units. They are scenario accounting or input-selection rules, not independently measured relationships.
Examples
>>> case = BaseScenario(name="original", description="stated inputs")
>>> case.variant(name="comparison").name
'comparison'Attributes
| Name | Description |
|---|---|
| description | |
| model_config | |
| name |
Methods
| Name | Description |
|---|---|
| variant | Return a shallow scenario copy with the supplied field replacements. Equation: Pydantic |
variant
engine.scenario_types.BaseScenario.variant(**changes)Return a shallow scenario copy with the supplied field replacements. Equation: Pydantic model_copy(update=changes); replacements are not revalidated. Units: unchanged fields retain their original quantities.
name
Type: str.
Declared default: required.
description
Type: str.
Declared default: required.