Simulation Configuration

Purpose

simulation_config.xml connects a scenario’s inputs and defines execution, vehicle, physical, environment, visualization, and output settings. Operational model selection does not belong in this file; use the optional independent operation_strategy.xml input. Vehicle parameters do not belong here either: mass, battery, speed and acceleration limits, power and attitude limits are fields of a vehicle type, set with a <vType> row in demand_config.xml (see Vehicle parameters are set per vehicle type).

Document Shape and Units

A section groups settings, and every setting is its own element on its own line carrying a value attribute:

<time>
  <begin value="0"/>
  <step value="0.2"/>
  <total_duration value="3600"/>
</time>

Only this file uses that form. In additional.xml, demand_config.xml and operation_strategy.xml, one record is one element and its values are that element’s own attributes (<network_smoothing enabled="true" method="catmull_rom"/>). <output> uses the record form in this file too; see Optional Outputs.

Rejections name the replacement rather than only the rule. A section still written in the attribute-row form is rejected with the option spelling of every value it carried, a bare <step/> is rejected for having no value, and a value written as element text is rejected too.

Keys carry no unit suffix. SI base units are implicit - seconds, metres, metres per second, metres per second squared, kilograms, hertz, watts, joules, and degrees for angles. A key spells out its unit only when the value is not in the base unit, and then it spells it in full (arrival_rate_per_hour). The unit of every key is documented in the tables below.

Inputs and Runtime

Variable Unit Default Meaning
input.network_file path maintained scenario network Simulation-ready 3D Digital Airspace Network
input.demand_file path maintained scenario demand Demand-arrival and request configuration
input.operation_strategy_file path "" Optional V2 operation-strategy XML
input.background_osm_file path "" Optional map context for LOFT-Edit and the viewer; the simulation never reads it
input.additional_file path "" Optional additional configuration: network smoothing and the measured corridor_overrides table (vehicle types belong in demand_config.xml <vTypes>; a <vehicle_types> section here is rejected). Accepts a comma-separated list, read left to right, like SUMO’s additional-files. See Additional Configuration
input.infrastructure_file path "" Optional CNS infrastructure .osm layer: one node per site, position and device parameters together. See CNS Infrastructure File
runtime.gui boolean true Enable a viewer by default (the browser web viewer)
runtime.random_seed integer 2002 Repeatable stochastic seed
runtime.randomize_seed boolean false true ignores runtime.random_seed and seeds from the wall clock, unless a seed is passed to the session or ACI API (random_seed=). loft-sim run has no seed option
time.begin s 0 Absolute simulation start time
time.step s 0.2 Integration step duration
time.total_duration s 3600 Duration when time.end is omitted
time.end s (omitted) Optional absolute end time. When both are set, time.end wins and time.total_duration is ignored

Omit time.end entirely when time.total_duration should govern; an empty placeholder element is not a canonical form.

Input paths are resolved relative to the selected simulation configuration. Keep scenario packages self-contained with sibling config/, network/, and outputs/ directories.

input.additional_file may name several files, read left to right; see Several Additional Files for the merge order and the rule that a collision between two files is an error naming both.

An empty operation_strategy_file is valid. It selects no strategic model, Newell corridor/terminal following, FCFS controlled-junction sequencing, and no network-level contingency model. ACI also requires no declaration here.

Vehicle and Separation

Variable Unit Default Meaning
vehicle.vehicle_type name hybrid Active built-in or user-defined vehicle type. It does not change demand-file flows: a <flow> row that sets no vehicle_type flies hybrid
vehicle.cruise_speed m/s 17.0 The ONE nominal-speed fallback for a corridor without nominal_speed. It also sets each vehicle type’s maximum airspeed, max_speed_factor x cruise_speed, unless the type’s <vType> row sets max_airspeed (no built-in type does; see Vehicle types)
vehicle.climb_rate_threshold m/s 0.5 Vertical-speed magnitude for realized climb/descent state
vehicle.flight_mode_hysteresis m/s 0.1 Return threshold offset that prevents phase chatter
vehicle.planned_vertical_slope_threshold ratio 0.01 Local 3D path-slope threshold for planned climb/descent
separation.safe_headway m 90.0 Global same-corridor safety fallback
separation.stop_distance m 15.0 Braking look-ahead near controlled junctions
separation.stop_line_offset m 40.0 Virtual stop-line offset
separation.queue_capture_distance m 5.0 Distance at which a vehicle joins a junction queue
separation.protected_exit_distance m 25.0 Protected-exit distance past a controlled junction
separation.protected_zone_timeout s 20.0 Protected-zone reservation timeout
separation.node_occupancy_time s 2.0 Time a vehicle occupies a controlled node
separation.queue_gap m 90.0 Standing gap between queued vehicles
separation.geofencing_buffer m 40.0 Corridor-centerline containment radius fallback
separation.intersection_control_radius m 40.0 Controlled-junction execution-zone radius
separation.vertiport_terminal_distance m 50.0 Minimum derived terminal-zone path extent
separation.vertiport_terminal_time s 5.0 Minimum derived terminal-zone travel-time extent
separation.vertiport_clearance_altitude m 30.0 Relative clearance criterion for terminal-zone extent

separation.intersection_control_radius should equal separation.stop_line_offset so the execution-zone boundary coincides with the FCFS stop line.

The route’s 3D waypoints define vertical motion. Planned phase uses local path slope; actual climb/descent uses estimated vertical speed plus threshold and hysteresis. The simulator does not insert endpoint vertical legs or infer them from a special corridor label.

Altitude datum. Every altitude in the simulator — the network’s node altitude tag, separation.vertiport_clearance_altitude, and the z of every reported state — is a height above the ground directly below the point, i.e. above ground level (AGL); see Tag Units for why. There is no terrain model, so ground is a flat plane at 0 and AGL currently coincides with MSL.

For every route that begins or ends at a vertiport, the simulator derives departure/arrival terminal zones from path distance, nominal travel time, and clearance altitude. Pad capacity, release, arrival sequencing, queues, reservations, preflight scheduling, and DCB consume the same vertiport resource/terminal-zone model. No special way tag is required for it; an explicit terminal leg is tagged way_type=vertiport_terminal.

See Vehicle types for the built-in quadrotor, fixed_wing, and hybrid profiles and user-defined types; every vehicle parameter is set there, per type.

Physical and Environment Blocks

The simulation configuration also contains these typed parameter groups. Every key follows the unit convention above; the unit column names the unit each key of the group uses.

Group Units Contents
estimation.* Hz (update_rate); m (position_bias_std, altitude_bias_std); s (*_filter_time_constant) State-estimation rate, filter time constants, and biases. The filter blends over the elapsed interval as alpha = 1 - exp(-dt / tau), so its response is a property of the filter and not of update_rate. The retired per-sample *_filter_gain keys are rejected with a conversion hint
guidance.* Hz (control_update_rate); s (heading_time_constant, newell_time_shift); 1/s (lateral_error_gain, vertical_error_gain: commanded correction speed per metre of tracking error) Control rate and path tracking
dynamics.* Hz (update_rate); m/s^2 (gravity) Scenario-global integration settings, for every vehicle type. update_rate (default 20.0) is the rate at which each vehicle’s 6-DOF state is integrated. gravity (default 9.80665) cancels out of the translational force balance, so it shapes only the reported attitude (roll, pitch and their rates)
performance.* m/s (max_climb_rate, max_descent_rate); deg/s (max_turn_rate) Scenario-global rates, not a vehicle’s envelope. max_climb_rate and max_descent_rate (defaults 4.0 and 3.0) give the vertical rate, the smaller of the two, of the strategic vertiport pad-hold estimate that the 4D pre-flight scheduler and the DCB pad capacity use. max_turn_rate (default 20.0) is read only by the load-time warning about a smoothed curve tighter than a vehicle can fly. A vehicle’s own climb, descent and turn limits are its type’s <vType> fields of the same names
environment.* m/s (mean_wind_x, mean_wind_y, vertical_wind_amplitude); kg/m^3 (base_density); degC (base_temperature); m (density_scale_height, vicinity_radius); degC/m (temperature_lapse); Hz (gust_frequency); 1/m (gust_spatial_frequency_xy, vertical_wind_spatial_frequency_xy, nav_quality_altitude_slope); per veh/km (nav_quality_density_penalty, comm_quality_density_penalty); s/m (comm_quality_wind_penalty: quality lost per m/s of vertical wind); ratio (gust_amplitude_ratio, min_nav_quality, min_comm_quality) Atmosphere, wind, gust, and CNS-quality models
uncertainty.* m (position_error_std, altitude_error_std); m/s (velocity_error_std, speed_noise_std, vertical_speed_noise_std); s (latency_mean, latency_std); Hz (update_rate); probability (packet_loss_prob, detection_probability); boolean (surv.enabled, default false); comma-separated corridor ids (surv.coverage_corridor_ids, default empty) Noise sub-blocks uncertainty.nav, uncertainty.control, uncertainty.comm, and uncertainty.surv. surv.enabled switches the surveillance channel on, and surv.coverage_corridor_ids limits it to the listed corridors (empty means every corridor). A surveillance site in the infrastructure layer fills both when they are not set
visualization.* name (color_mode) Vehicle colors in the legacy VisPy viewer (--visualization vispy): color_mode is flight_state (default, color by flight phase) or layer (color by altitude layer). Any other value is rejected when the configuration loads. The browser viewer does not read it
map_context.* m (building_safe_buffer, building_path_buffer, default_building_height); text (place_name) Background-map/building defaults for supporting tools

loft-sim dump-effective-config prints the default of every key in these groups.

Stable per-element physical values belong in the network. For example, nominal_speed, capacity, vehicle_access, geometry, and containment are network properties. Local operational rules such as min_headway, queue_gap, sequencing, and reservation buffers belong in the operation strategy.

The current simulation schema is strict: unknown sections and keys are errors, and a retired key or section is rejected with a message. A <legacy> element, for example, is rejected with a message naming the archive/paper-reproduction branch, which still has the nine reproduction pins the block held. Upgrading Older Scenarios lists the retired flat keys, operation sections, per-vehicle keys and the <legacy> block with their replacements.

Vehicle parameters are set per vehicle type

This file carries no per-vehicle parameter. Mass, battery capacity, speed and acceleration limits, response time constants, power coefficients, inertia, drag and attitude limits are fields of a vehicle type’s profile, and the one place to set them is a <vType> row in demand_config.xml; see Vehicle types. A row that names a built-in type lists only the fields that change:

<vTypes>
  <vType vehicle_type="hybrid" max_accel="3"/>
</vTypes>

A configuration that still sets one of the 28 per-vehicle performance.* or dynamics.* keys this file used to accept fails to load, and loft-sim validate fails, with a message that names the key and shows the <vType> row that replaces it. Upgrading Older Scenarios lists the 28 keys.

Optional Infrastructure Support

CNS support enters a run through two optional inputs:

  • input.infrastructure_file names the CNS infrastructure layer, an .osm file with one node per site. Its format, and how the simulator turns the sites into per-corridor quality and network-aggregate uncertainty values, are described in CNS Infrastructure File. A key you write in the uncertainty section always keeps your value; derived values fill only the keys left unset.
  • input.additional_file can carry a measured <corridor_overrides> table. Its keys, and the precedence of measured, derived and configured values, are described under Measured corridor overrides.

The airspace network file carries no infrastructure content.

Optional Smoothing

When input.additional_file enables network_smoothing, the canonical method names are catmull_rom, bspline, nurbs, and chaikin. Historical aliases such as B_Spline or B-Spline are rejected. See Additional Configuration for the full attribute list, including preserve_vertiport_interfaces and blend_endpoint_tangents.

Output spacing is set by one scale-free knob, resolution, in metres. The absolute point counts num_points and samples_per_segment are rejected with a message naming the replacement (see Removed Smoothing Attributes).

With smooth_z=false, smoothing changes XY and restores altitude by original 3D arc length. With smooth_z=true, it smooths XYZ and holds each altitude inside the band of the two drawn waypoints on either side of it. NURBS may use waypoint smoothing_weight and smoothing_anchor metadata.

Optional Outputs

<output> holds one element per output kind, and the element name is the kind; there is no kind attribute. Each kind is named after the root tag of the document it writes. Omit an element to disable that output entirely.

An output element is a record: its parameters are attributes. The path is file; the sampling window, for the outputs that have one, is begin / end / interval (see the table below).

<output>
  <summary_output file="../outputs/summary.xml" interval="60"/>
  <element_output file="../outputs/element_output.xml" begin="600" end="1800" interval="60"/>
  <safety_metrics_output file="../outputs/safety_metrics.xml" separation_threshold="10"/>
</output>
Element Parameters (unit) Meaning
summary_output file, begin, end, interval (s, default 60) Simulation-wide aggregate rows
fcd_output file, begin, end, interval (s, default 1) Per-vehicle state rows
tripinfo_output file, begin, end (s) Completed-mission summaries
preflight_schedule file Strategic 4D schedule metadata
corridor_output file, begin, end, interval (s, default 60) Per-corridor state rows
element_output file, begin, end, interval (s, default 60) Monitored network-operation element state
safety_metrics_output file, begin, end (s), separation_threshold (m) Separation and queueing diagnostics; the threshold, the distance below which two vehicles count as a separation violation, defaults to separation.safe_headway

Where output files are written

A relative file is resolved against the folder that holds this simulation_config.xml, so ../outputs/summary.xml lands in the scenario’s own outputs/ folder. The exception is a path whose first folder is outputs/ (or output/): it is resolved against the folder that contains the loft package, whatever the current working directory and wherever the configuration file sits. In a source checkout with the editable install the guides use, that folder is the repository root; after a regular, non-editable pip install it is the environment’s site-packages folder. The tutorial cases use that form, so example/tutorials/cases/config_poisson.xml writes to outputs/examples/poisson/ at the repository root even when you run it from another directory or copy the configuration elsewhere. To keep results next to a scenario, write ../outputs/... or an absolute path; absolute paths are used as given.

The sampling window

begin and end are absolute simulation times and both are optional: an omitted begin samples from the run’s own start, an omitted end samples to its end. A window is per-output and independent of time.begin / time.end, which bound the run itself. interval is the sampling period.

An output honours only the parameters listed for it above, and rejects the others by name rather than accepting and ignoring them. The reason differs per kind, and the rejection says which:

  • tripinfo_output writes one row per completed mission, so begin/end select which completions are recorded and there is no interval to sample on.
  • safety_metrics_output accumulates every tick into one aggregate written at close, so begin/end bound what is accumulated and there is likewise no interval.
  • preflight_schedule is resolved before the simulation clock advances, so no part of a window applies to it.

A duplicate element, an unknown kind, and a parameter the kind cannot honour are all hard errors. Older spellings (<file kind="..." path="..."/>, the short kind names such as <summary/>, and the path attribute) are rejected with the replacement named; Output Spellings lists them.

Output column names follow the same unit convention as configuration keys: SI base units are implicit and carry no suffix (x, speed, energy), and only a non-SI unit is named, spelled out in full (density_per_km). See Output Files.

Example

<simulation_config>
  <input>
    <network_file value="../network/airspace_network_enriched.osm"/>
    <demand_file value="demand_config.xml"/>
    <operation_strategy_file value="operation_strategy.xml"/>
    <background_osm_file value="../../../basemap/ann_arbor_north_campus.osm"/>
  </input>
  <runtime>
    <gui value="false"/>
    <random_seed value="2002"/>
    <randomize_seed value="false"/>
  </runtime>
  <time>
    <begin value="0"/>
    <step value="0.2"/>
    <total_duration value="3600"/>
  </time>
  <vehicle>
    <vehicle_type value="hybrid"/>
    <climb_rate_threshold value="0.5"/>
    <flight_mode_hysteresis value="0.1"/>
    <planned_vertical_slope_threshold value="0.01"/>
  </vehicle>
  <output>
    <summary_output file="../outputs/summary.xml" interval="60"/>
  </output>
</simulation_config>

To check a configuration and print it with every default filled in, see Validate and Inspect. Continue with Operation Strategy Configuration and Demand Configuration.

Design notes

One element per setting. This file is LOFT-Sim’s .sumocfg and follows SUMO’s configuration form, which writes <net-file value="net.net.xml"/> under <input>. It is a deliberate exception, scoped to this file, to the rule that one record is one element whose values are its attributes. These are the few, top-level, frequently hand-edited settings that connect a scenario: one setting per line diffs cleanly, a comment attaches to the setting it explains, and anyone who has edited a .sumocfg already knows the shape. tools/check_conventions.py RULE-10 enforces the split in both directions: it fails on a section here that is not in the option form, and on an option-style leaf in additional.xml, demand_config.xml or operation_strategy.xml.

<output> names the kind. <output> is the recorded exception inside the exception. Its elements are named the way a .sumocfg writes <summary-output/>, <fcd-output/> and <tripinfo-output/>, and naming each kind after the root tag of the document it writes is the one rule that produces all seven names. An output carries several parameters, so it is a record and keeps the attribute form. file is what SUMO calls the path of an output definition (<edgeData id="..." file="..." begin="..." end="..." period="..."/>); SUMO spells interval as period. Because the kind is the element name, the generated XSD declares exactly the parameters each kind honours.

Altitude datum. loft.core.osm_schema.ALTITUDE_DECLARATION records the altitude unit and the AGL datum together. The datum is stated now, while there is no terrain model, so that adding terrain does not silently decide it.