Built-in scenarios¶
Scenario cards.
handoverlab.scenarios
¶
Built-in scenarios and their scenario cards.
A built-in scenario is a named, documented starting point. Its card (one
YAML file per scenario in this package) holds the scenario values that differ
from the defaults, the purpose, the source of every parameter, the known
limitations and the reference results the scenario was checked against.
card_markdown turns a card into a page of the documentation and
layout_svg draws its layout.
Use a built-in scenario by name::
sc = hl.builtin_scenario("smoke")
or in a configuration file, alone or as the base of your own values::
scenario: smoke
scenario: {base: urban-grid-10ghz, mobility: {users: 60}}
scenario_names(deprecated: bool = False) -> List[str]
¶
Names of the built-in scenarios; deprecated ones (DEPRECATED) only with deprecated=True.
scenario_card(name: str) -> Dict[str, Any]
¶
The scenario card of name as a dictionary (scenario holds the values that differ from the defaults).
builtin_scenario(name: str) -> Scenario
¶
The built-in scenario name.
merge(base: Dict[str, Any], over: Dict[str, Any]) -> Dict[str, Any]
¶
Deep merge of two scenario dictionaries (over wins).
resolve(data: Any) -> Dict[str, Any]
¶
A scenario entry of a configuration -> plain dictionary.
"smoke" (a name) or {"base": "smoke", ...} start from a built-in
scenario; any other mapping is returned unchanged.
unused_keys(sc: Scenario) -> set
¶
Scenario keys that the layout kind and the radio model of sc do not read (since 2.1.0); the card pages
leave them out of the parameter table.
card_markdown(name: str, figure: str = None) -> str
¶
The scenario card name as a Markdown page (figure: file name of the layout figure).
layout_svg(scenario: Scenario, width_px: int = 640) -> str
¶
A plain SVG drawing of the layout of scenario: buildings, streets and sites.