Configuration Overview
Scenario Files
The flagship, actively maintained sample lives under
example/scenarios/sample_demo/ (example/scenarios/default/ remains the
recommended-defaults showcase that the tutorials draw inputs from):
| Path | Purpose |
|---|---|
config/simulation_config.xml |
Input references, run time, physical/environment settings, visualization, and outputs |
config/demand_config.xml |
Demand flows (<flows>) and vehicle types (<vTypes>) |
config/operation_strategy.xml |
Optional strategic, tactical, and contingency operation baseline |
network/airspace_network.osm |
3D Digital Airspace Network built in LOFT-Edit. The older default scenario, which the tutorials and the examples on these pages use, names it airspace_network_enriched.osm. See Airspace Network (OSM contract) |
network/infrastructure.osm |
Optional CNS infrastructure sites layer (CNS Infrastructure File) |
config/additional.xml |
Optional geometry smoothing and measured corridor overrides (Additional Configuration; vehicle types live in demand_config.xml <vTypes>) |
../../basemap/ann_arbor_north_campus.osm |
Optional background map shared by the scenarios (input.background_osm_file): context for LOFT-Edit and the viewer, never read by the simulation |
Schemas
Every configuration file type has a W3C XML Schema under
schema/:
simulation_config.xsd, demand_config.xsd, additional.xsd and
operation_strategy.xsd. Point an editor or xmllint at them for completion
and inline errors:
xmllint --noout --schema schema/simulation_config.xsd \
example/scenarios/default/config/simulation_config.xml
They are generated from the loader’s own definitions by
tools/generate_xsd.py, never hand-written, and CI fails both when a schema
falls behind the loader and when a shipped config disagrees with its schema.
The schemas encode the three vocabulary rules structurally: SI base units are
implicit, so an attribute name carries a unit suffix only for a value in a
non-SI unit, spelled out in full (arrival_rate_per_hour); every value is an
attribute and never element text; and nesting only groups.
Ownership Rules
| Concern | Authoritative input |
|---|---|
| Element identity, 3D geometry, topology, nominal physical/resource attributes | Network OSM |
| Request arrival process, rate, OD/route stream, service and priority defaults | Demand XML |
| Strategic operation, tactical element rules, contingency operation | Operation-strategy XML |
| Time, seed, physical models, environment, viewer, outputs | Simulation-config XML |
| Real-time intervention | ACI Python controller; never declared in XML |
This ownership keeps the simulator stable and makes network, demand, and
strategy independently reusable. Retired and unknown keys in
simulation_config.xml, demand_config.xml and operation_strategy.xml are
rejected with a message instead of being silently mapped to new names;
Upgrading Older Scenarios lists every retired form with its
replacement. The checks are not uniform everywhere:
additional.xmldoes not reject unknown sections or attributes; a misspelled smoothing attribute is ignored and its default applies.- Model and arrival names are matched without regard to case, and a few short
value aliases are accepted (for example
quadfor thequadrotorvehicle type andfastestfor theshortest_pathrouting mode). - A demand
probabilityoutside 0 to 1, a negativecount, and a negativebeginorendare clamped to the valid range without a message. A negative rate orperiodis not clamped silently: it is rejected, because the arrival needs a positive one.
Common Edits
| Task | Edit |
|---|---|
| Change network or input paths | simulation_config.xml |
| Change demand level or arrival process | demand_config.xml |
| Select 4D, DCB, following, junction, or contingency behavior | operation_strategy.xml |
| Add an exact local rule | tactical.element_overrides keyed by the element’s semantic element_id (a node_id or corridor_id) |
| Add a reusable class rule | tactical.class_defaults, as a <class name="..."/> row |
| Change environment, physics or output settings, or the cruise speed | simulation_config.xml |
| Change the vehicle type a flow flies | demand_config.xml, the <flow> row’s vehicle_type; a row that sets none flies hybrid, whatever vehicle.vehicle_type says |
| Change a vehicle type’s performance or dynamics parameters | demand_config.xml, a <vType> row in <vTypes> |
| Add a custom vehicle type | demand_config.xml, in <vTypes> |
| Implement a real-time custom controller | Python ACI script |
Minimal Simulation Configuration
simulation_config.xml is LOFT-Sim’s .sumocfg: a section groups, and every
setting is its own element carrying a value attribute. Every OTHER
configuration document is attribute-style — one record is one element and its
values are that element’s own attributes. SI base units (s, m, m/s, kg, Hz,
W, J, deg) are implicit, so a key carries a unit suffix only for a non-SI unit
(arrival_rate_per_hour), and each configuration page documents the unit of
every key.
<simulation_config>
<input>
<network_file value="../network/airspace_network_enriched.osm"/>
<demand_file value="demand_config.xml"/>
<operation_strategy_file value="operation_strategy.xml"/>
</input>
<runtime>
<gui value="false"/>
<random_seed value="2002"/>
</runtime>
<time>
<step value="0.2"/>
<total_duration value="3600"/>
</time>
</simulation_config>
Remove or empty operation_strategy_file when no declarative strategy is
needed. The simulator then uses no strategic model, Newell corridor/terminal
following, FCFS controlled-junction sequencing, and disabled network-level
contingency operation.
Validate and Inspect
loft-sim validate -c example/scenarios/default/config/simulation_config.xml
loft-sim dump-effective-config -c example/scenarios/default/config/simulation_config.xml
validate checks a scenario’s configuration files without running it, and
dump-effective-config prints the simulation configuration with every
built-in default filled in; see
Command Line (loft-sim). The optional
operation strategy is resolved and bound to the loaded network only when a run
is built. For a running ACI session, use
aci.simulation.getResolvedConfiguration() to inspect the fully resolved
runtime baseline and use each element domain to inspect the source of an active
override.