Configuration Files

Four Independent Inputs

A LOFT-Sim study keeps network, demand, operation strategy, and simulation settings separate:

File Typical path Owns
Simulation configuration example/scenarios/default/config/simulation_config.xml Input references, run time, vehicle/environment/physical settings, viewer, and outputs
Airspace network example/scenarios/default/network/airspace_network_enriched.osm Element IDs, classes, 3D geometry, topology, physical/resource attributes, and vehicle eligibility
Demand configuration example/scenarios/default/config/demand_config.xml OD/route request streams (flows, <flows>), arrival models, rates, time windows, and vehicle types (<vTypes>)
Operation strategy example/scenarios/default/config/operation_strategy.xml Strategic model, local tactical rules, and contingency model

The default scenario keeps an older network file name, airspace_network_enriched.osm; packages exported from LOFT-Edit use network/airspace_network.osm.

Optional supporting inputs include a background OSM map for the viewer, additional.xml (corridor smoothing and measured per-corridor CNS overrides), and a CNS infrastructure layer. Custom vehicle profiles are <vType> rows in demand_config.xml. Paths are resolved relative to simulation_config.xml.

Run and Validate

loft-sim validate -c example/scenarios/default/config/simulation_config.xml
loft-sim run -c example/scenarios/default/config/simulation_config.xml --nogui

The runtime loads the network, applies optional geometry processing, loads demand, resolves the optional operation strategy, advances the simulation, and writes configured outputs. --nogui runs headless, which takes about 4 to 7 minutes for this one-hour scenario on a 4-core machine; without it the browser viewer opens and plays the scenario at real time.

Choose the Outputs

The <output> section of the simulation configuration decides which files a run writes, one element per output kind; a kind that is not listed is not written. In example/scenarios/default/config/simulation_config.xml the whole <output> block is commented out, so the run above writes no files. To get results, uncomment that block, or add a smaller one inside <simulation_config>:

<output>
  <summary_output file="../outputs/summary.xml" interval="60.0"/>
  <tripinfo_output file="../outputs/tripinfo.xml"/>
</output>

Output paths are resolved relative to the configuration file, so these two land in example/scenarios/default/outputs/, and the run ends by listing them under Generated output files:. A path that starts with outputs/ instead, as in the tutorial cases, is resolved against the repository root whatever the current directory; see Where output files are written. Output Files describes every output kind and its fields.

Bind an Operation Strategy

<input>
  <network_file value="../network/airspace_network_enriched.osm"/>
  <demand_file value="demand_config.xml"/>
  <operation_strategy_file value="operation_strategy.xml"/>
</input>

The operation strategy uses the current format (schema_version="2.0"):

<operation_strategy strategy_id="tutorial_strategy_v2" schema_version="2.0">
  <tactical>
    <defaults corridor_model="newell" vertiport_model="newell" intersection_model="fcfs" />
    <class_defaults>
      <class name="corridor" min_headway="50" />
    </class_defaults>
    <element_overrides>
      <element element_id="corridor_001" min_headway="80" />
    </element_overrides>
  </tactical>
</operation_strategy>

The file is optional. If omitted, the strategic layer has no model, while simple Newell following and FCFS controlled-junction sequencing remain available. Network-level contingency operation is disabled by default.

Keep Demand and Strategy Separate

poisson, uniform, probability, and count arrivals belong in demand_config.xml. Admission, metering, 4D reservation, and DCB belong in operation_strategy.xml. A strategy never becomes a demand generator.

Static OSM properties and local operational rules are separate too:

network: geometry, topology, nominal speed/capacity, eligibility, pad count
strategy: following/sequencing, active headway, queues, reservations, DCB

An older network may still carry policy tags such as min_headway. The runtime ignores them: loading prints one warning per affected element and never applies the tag values, and loft-sim validate does not report them. Migrate an Older Network shows how scripts/migrate_legacy_network.py moves them into the operation strategy’s <element_overrides> and writes an old 2D map as an explicit 3D network.

Attach ACI Without Configuration

ACI is not a configuration mode. A normal scenario can be controlled simply by starting it from Python:

from loft import aci

aci.start(config_file="example/scenarios/default/config/simulation_config.xml", gui=False)
try:
    aci.simulationStep()
finally:
    aci.close()

The XML/internal strategy remains the baseline; ACI commands are runtime overrides. Continue with Toy Simulation with ACI and Build an ACI Controller, and see Operation Strategy Configuration.