Demand Configuration

Purpose

example/scenarios/default/config/demand_config.xml defines the scenario demand used by the simulator’s flight generator. Demand is a list of flows. A flow is one demand stream: an arrival process, a path definition, and the fixed parameters of the flights it produces.

Every element of the document is attribute-style: the repeated <flow> and <vType> rows alike. Nesting only groups; a value is never element text.

Keys carry no unit suffix. Seconds are the implicit time unit and per-second the implicit rate unit; a key spells out its unit only when it is not the base unit (arrival_rate_per_hour).

Main Variables

Variable Unit Default Meaning
flow@flow_id name f0, f1, … Flow identity, and the FIRST attribute of the row. Optional; a blank id takes the document-order auto name. Must be unique
flow@origin node_id OD flow only Origin vertiport semantic node_id
flow@destination node_id OD flow only Destination vertiport semantic node_id
flow@route route_id route flow only The route relation the flow follows, referenced by its semantic route_id
flow@routing_mode name inferred OD flows only: shortest_path, route, or route_distribution. When omitted: route_distribution if the flow sets route_distribution, route if it sets routes, otherwise shortest_path
flow@routes list optional OD flows only: comma-separated route references; requests are distributed uniformly
flow@route_distribution list optional OD flows only: weighted route list, e.g. route_a:0.7,route_b:0.3
flow@arrival_model name inferred poisson, uniform, probability, or count
flow@arrival_rate 1/s one arrival source required Expected arrivals per second
flow@arrival_rate_per_hour 1/h one arrival source required The same rate expressed per hour
flow@period s one arrival source required Deterministic headway between arrivals
flow@probability probability one arrival source required Bernoulli probability of one request per second
flow@count integer one arrival source required Fixed number of requests, evenly spaced over begin to end or simulation end
flow@begin / flow@end s 0 / simulation end Active window of the flow
flow@vehicle_type name hybrid Vehicle type for this flow: quadrotor, fixed_wing, hybrid, or a user-defined type
flow@priority_class label regular Fixed priority class label
flow@priority_rank integer 0 Higher values are scheduled before lower values
flow@service_class label "" Mission/service category carried onto the generated flights

Arrival models and their parameters

There are exactly four arrival models and exactly five ways to parameterize them. There are no synonym spellings.

arrival_model Process Parameter
poisson Exponential headways arrival_rate or arrival_rate_per_hour (or period as the mean headway)
uniform Evenly spaced arrivals period, or a rate that implies the headway
probability Per-second Bernoulli trial probability
count A fixed number, evenly spaced over the flow window count

uniform is the model name for evenly spaced arrivals; period is a parameter key. No word does double duty.

Arrival source fields are mutually exclusive: each flow defines exactly one of arrival_rate, arrival_rate_per_hour, period, probability, or count. Omitting arrival_model infers it from the source: a rate implies poisson, a period implies uniform, and probability/count imply themselves.

Identity and Reference Attributes

Two naming rules govern a <flow> row:

  • flow_id comes first. Write it as the first attribute of the row, so a reader sees which flow a row is before what it points at. The shipped demand files follow this order; the loader accepts any order.
  • An attribute that defines an identity is <thing>_id; one that references another object is named after that object’s type, with no _id suffix. A flow following a route says route="r0", while the route relation itself carries route_id="r0", and the plural candidate list is routes="r1,r2". The retired route_id / route_ids spellings on a flow are rejected with the replacement named.

A row that is about an object stays keyed by that object’s identity: <corridor corridor_id="c3"> in corridor_overrides and <element element_id="c3"> in an operation strategy. route_distribution also keeps its name: it is a weighted distribution literal (r1:0.7,r2:0.3), not a single reference.

How a flow declares its path

A flow declares its path in exactly ONE of two ways:

  • OD flow — origin + destination. The simulator derives the path at request time (shortest travel time by default, or one of the route-choice modes through routing_mode).
  • Route flow — route. The flow follows that route relation exactly.

Neither form, or both forms on the same flow, is a hard error naming the flow: the path definition would be ambiguous and there is no sensible default. A route flow must NOT carry origin/destination — a route already carries its endpoints — and routing_mode on a route flow is meaningless (one warning, then ignored).

Typical Example

<demand_config>
  <flows>
    <!-- OD flow: the simulator derives the path. -->
    <flow flow_id="mair_to_mm_shortest" origin="M-Air" destination="Michigan Medicine"
          arrival_model="poisson" arrival_rate_per_hour="140"/>
    <!-- OD flow choosing between two route relations. -->
    <flow flow_id="nc_to_cc_spread" origin="North Campus" destination="Central Campus"
          arrival_model="uniform" arrival_rate_per_hour="220" vehicle_type="hybrid"
          routing_mode="route_distribution"
          route_distribution="nc_to_cc_main:0.8,nc_to_cc_alt:0.2"/>
    <!-- Route flow: follows the named route, no origin/destination. -->
    <flow flow_id="mm_express_shuttle" route="mair_to_mm_express"
          arrival_model="uniform" period="120" vehicle_type="quadrotor"/>
    <!-- A second flow over the SAME route, with its own arrival process. -->
    <flow flow_id="mm_express_medical" route="mair_to_mm_express"
          arrival_model="poisson" arrival_rate_per_hour="6"
          priority_class="medical" priority_rank="10"
          service_class="medical_delivery"/>
  </flows>
</demand_config>

Flow identity

  • flow_id is optional. Blank ids take the auto name f0, f1, … assigned in document order over the single <flows> list. The OSM-format primitives (id, lat, lon, k, v, ref) keep their bare names in the network file; a demand flow is ours, so its identity attribute is flow_id.
  • Ids must be unique. A duplicate — between two explicit ids, or between an explicit id and an auto-generated one — is a hard error.
  • The id is functional, not decorative: it names the flow in every demand diagnostic, and every generated request carries it (demand_id). The preflight-schedule output writes it as the demand_id attribute of each <flight> row, so a schedule can be grouped by flow even when several flows share one route.

Notes

  • Each flow is an independent demand stream with its own arrival model.
  • Flows over the same OD pair stack additively. Two identical 20 flights/hour OD flows load as 40 flights/hour for that OD.
  • Flows with the same path but different fixed parameters remain distinct streams. For example one quadrotor flow and one hybrid flow generate both vehicle types on that path.
  • The aggregate scenario rate is the sum of all configured flow rates. There is no aggregate fallback: a scenario with no flows simply runs empty.
  • Unknown flow attributes are rejected. Use the documented fields rather than ad hoc attributes.
  • Retired demand fields (such as a flow’s route_id) and retired sections (such as <od_demand> or <traffic>) are rejected with a message naming the replacement; Upgrading Older Scenarios lists them all. A child-element value anywhere in the document is rejected with the attribute-style spelling of the same element.

Vehicle types

A vehicle type is ONE attribute-style <vType> row inside <vTypes>, in the same demand document as the flows that reference it. The two belong together: <vTypes> says which vehicles exist, <flows> says how many of each fly.

<vType> is the one place to set a vehicle parameter: mass, battery, speed and acceleration limits, response time constants, power coefficients, inertia, drag and attitude limits. A per-vehicle performance.* or dynamics.* key in simulation_config.xml fails to load with the <vType> row that replaces it; see Vehicle Parameters Moved to vType.

vehicle_type is both the row’s identity and the name that a <flow vehicle_type="..."> or a corridor vehicle_access tag uses to reference the type.

Performance and dynamics fields share one flat row because the two field sets are disjoint; the loader splits them apart on registration.

The section does two different jobs, and which fields are REQUIRED depends on which one you are doing.

Overriding a built-in type: write only what changes

Naming a built-in type (quadrotor, fixed_wing, hybrid) — or any type already registered — overrides only the fields the row lists and inherits every other parameter from that type’s built-in profile. This is the common case, and it is why the row is usually one or two attributes long:

<vTypes>
  <!-- Every parameter this row does not name keeps its built-in hybrid value. -->
  <vType vehicle_type="hybrid" mass="32.0" hover_power="3100.0"/>
</vTypes>

That row changes mass from 25 to 32 and hover_power from 2600 to 3100 W, and leaves the other 29 performance and dynamics parameters exactly as the built-in defines them: state the difference, not the whole type. Of the two, only hover_power changes the run (more energy per mission); mass is stored but has no effect yet, see Fields with no effect on motion or energy yet.

Nothing is required beyond vehicle_type when overriding, so there is no minimum row. A row is not additive across parameters it does not name and it never zeroes an unnamed field.

Defining a NEW type: the field set must be complete

A row naming a type that does not exist yet has nothing to inherit from, so it must carry every performance and dynamics field, and a missing one is an error naming the field. The simulator needs the complete set to construct three things: the performance envelope, the energy model, and the 6-DOF true-state model. The Required for a new type column of the tables below is the authoritative list.

label is optional in both cases, and max_airspeed is optional even for a new type — see the table note.

XSD 1.0 cannot express “required only when the name is new”, so the schema marks only vehicle_type as required and the loader is the authority on the rest. The rejection names every missing field at once.

Registration rules

  • A row naming a built-in or already-registered type overrides only the fields it lists; every other parameter is inherited.
  • A row naming a NEW type must carry the complete performance and dynamics field sets. A missing field is an error naming the field.
  • A row without vehicle_type is an error.
  • A row may not be named after an alias of a built-in type (quad, multirotor, multi_rotor, fixedwing, vtol, hybrid_vtol, passenger_evtol, emergency). A flow may use these names for the built-in, so as a row name they would change that built-in rather than define a new type; the row is an error. Case and -/_ do not matter: Hybrid and fixed-wing name the built-ins.
  • A row carrying an attribute that is not a profile field is an error naming the attribute, so a typo in a parameter name cannot produce a type that only looks configured.
  • A non-numeric value produces one warning and the field is dropped: an override keeps the inherited value, and a new type reports the field as missing.

Registered types are available alongside the built-ins. Absent the section, nothing changes. Corridor-level vehicle_access tags reference built-in or user-defined type names:

vehicle_access=quadrotor,heavy_cargo

Identity fields

Attribute Unit Required Meaning
vehicle_type name always The type name flows and vehicle_access reference
label text never Display name; defaults to a title-cased vehicle_type

Fields with no effect on motion or energy yet

Every profile carries mass, payload, inertia_xx, inertia_yy, inertia_zz, drag_coefficient_x, drag_coefficient_y, drag_coefficient_z and reference_area, a new type must state them, and an override of them is accepted and stored. In this release, however, none of them changes how a vehicle moves or how much energy it uses, even set per type:

  • The autopilot response is modelled as a closed-loop net acceleration toward the commanded speed, so mass and the surrogate drag (drag_coefficient_*, reference_area) cancel out of the force balance. Changing them moves results only by floating-point rounding.
  • payload and inertia_* are not read by any model.

They are placeholders for a later thrust-drag and attitude model. To change energy use, set hover_power and the *_power_coeff fields (and battery_capacity for state of charge); to change how a vehicle flies, set the speed, acceleration, rate, response-time and attitude fields.

The complete parameter set, with every built-in default

The table below is GENERATED from loft.models.vehicle by tools/generate_doc_tables.py, so it cannot drift from the registry the simulator actually reads. Do not edit it by hand; CI fails when it is stale.

max_airspeed is recognised but not required even for a new type: it is the ABSOLUTE speed ceiling, and a profile that omits it falls back to max_speed_factor * cruise_speed, which is a ratio of a scenario knob and can therefore fall below the profile’s own min_airspeed. Declaring it is how a profile states an envelope no scenario setting can invert. No built-in declares one.

label is the only non-numeric field and the only one with a fallback (a title-cased vehicle_type); the built-ins carry quadrotor = Quadrotor, fixed_wing = Fixed-wing, hybrid = Hybrid VTOL.

Performance fields

Field Unit Required for a new type quadrotor fixed_wing hybrid
battery_capacity J yes 7200000 12000000 18000000
climb_power_coeff ratio yes 250 320 380
cubic_speed_power_coeff ratio yes 1.2 0.35 0.6
hover_power W yes 1800 900 2600
mass kg yes 10 18 25
max_accel m/s^2 yes 10 10 10
max_climb_rate m/s yes 4 3 3.5
max_decel m/s^2 yes 10 10 10
max_descent_rate m/s yes 3 2.5 3
max_speed_factor ratio yes 1.2 2 1.8
max_turn_rate deg/s yes 20 10 14
max_vertical_accel m/s^2 yes 10 10 10
min_airspeed m/s yes 0 12 0
payload kg yes 0 2 4
quadratic_speed_power_coeff ratio yes 8 4 5.5
speed_response_time_constant s yes 2 3 2.5
turn_power_coeff ratio yes 35 55 50
vertical_speed_response_time_constant s yes 2 3 2.5
max_airspeed m/s no (unset) (unset) (unset)

Dynamics fields

| Field | Unit | Required for a new type | quadrotor | fixed_wing | hybrid | | — | — | — | — | — | — | | attitude_damping_ratio | ratio | yes | 0.9 | 0.8 | 0.85 | | attitude_time_constant | s | yes | 0.45 | 0.8 | 0.65 | | drag_coefficient_x | ratio | yes | 0.9 | 0.18 | 0.35 | | drag_coefficient_y | ratio | yes | 0.9 | 0.8 | 0.75 | | drag_coefficient_z | ratio | yes | 1.1 | 0.9 | 0.9 | | inertia_xx | kgm^2 | yes | 0.35 | 0.9 | 1.2 | | inertia_yy | kgm^2 | yes | 0.35 | 1.4 | 1.6 | | inertia_zz | kg*m^2 | yes | 0.65 | 2 | 2.4 | | max_body_rate | deg/s | yes | 120 | 70 | 90 | | max_control_accel | m/s^2 | yes | 10 | 10 | 10 | | max_pitch | deg | yes | 25 | 15 | 20 | | max_roll | deg | yes | 25 | 35 | 30 | | reference_area | m^2 | yes | 0.18 | 0.75 | 0.65 |

Routes are standalone paths

A route is a path, not demand: an OSM relation with type=air_route whose ordered members are corridor ways, each starting where the previous one ends (head-to-tail, in the way drawing direction). It carries no arrival process, no vehicle type, and no schedule — those belong to the flows that reference it, and several flows may reference the same route.

  • A route must start and end at vertiports.
  • For OD flows with routing_mode=route or route_distribution, every referenced route must connect the configured origin and destination directly through the airborne corridor network.
  • If no airborne corridor path exists between two configured vertiports, the simulator prints a warning naming the flow and skips it. Intermediate vertiport land-and-relaunch transfers are not considered a connected OD path.
  • OD and route flows mix freely in one file. Their arrival processes stay independent of whether the operation strategy selects 4d_volume, 4d_volume_opt, capacity_limited_departure, element_centric_dcb, or no strategic model.
  • Routes are created in LOFT-Edit: select the corridor ways in order, then right-click the map and choose Create Route (one way) or Create Route from Selection.
Design notes

Both naming rules match SUMO. SUMO’s <route id="r0"> defines a route and <vehicle route="r0"> references one; a flow row makes the same split with route_id on the route relation and route on the flow. A row that is about an object (<corridor corridor_id="...">, <element element_id="...">) is keyed by that object’s identity, which is the same line SUMO draws between <edgeData id="..."> and <vehicle route="...">.

flow_id first. tools/check_conventions.py RULE-11 enforces the position in every demand file under example/ and tests/data/. The loader accepts any order on purpose: XML attribute order is not semantic, and a machine-written file must not be able to become unreadable-but-valid.

<vType> and its identity. The element name is SUMO’s <vType>, and an override row states the difference from the type it names, the way a SUMO vType relates to the vType it inherits from. The identity attribute is not SUMO’s bare id: this project spells identities after the thing they identify, the same divergence route_id makes, so vehicle_type is both the definition’s identity and the reference spelling.