Environment Domain
The environment domain provides the environmental and CNS conditions needed by a runtime controller. It does not replace the configured environment model.
Retrieve Information
| Information | Python method |
|---|---|
| Effective runtime environment state | aci.environment.getSnapshot() |
| Conditions at a 3D location and time | aci.environment.getSample(x, y, z, *, time=None, vicinity_density_veh_per_km=0.0, corridor_id=None) |
getSample() always returns six keys, and unlike the rest of ACI they name
their units:
| Key | Meaning |
|---|---|
wind_mps |
Wind vector [x, y, z], m/s |
density_kgpm3 |
Air density, kg/m³ |
temperature_c |
Air temperature, °C |
nav_quality, comm_quality, visibility_quality |
Dimensionless quality in [0, 1] |
vicinity_density_veh_per_km is the local traffic density to assume at the
point (vehicles per km). Higher values lower nav_quality and
comm_quality through the environment.nav_quality_density_penalty and
environment.comm_quality_density_penalty settings.
The arguments after x, y, z are keyword-only: write
getSample(x, y, z, time=10.0), not getSample(x, y, z, 10.0). Every
optional argument of an ACI command works this way; see
IDs and method conventions.
In a scenario with a CNS infrastructure layer (input.infrastructure_file),
each corridor carries its own navigation and communication quality, and a
vehicle samples the qualities of the corridor it is on. Without
corridor_id, getSample() returns the network-wide base qualities, which no
vehicle on a covered corridor experiences. Pass corridor_id to read what a
vehicle on that corridor experiences.
Change State
| Command | Python method |
|---|---|
| Override supported runtime environment/CNS inputs | aci.environment.setOverride(*, ...) |
| Return selected or all values to the configured model | aci.environment.clearOverride(*parameter_names) |
setOverride() accepts only these explicit keyword arguments:
| Keyword | Unit/range |
|---|---|
mean_wind_x, mean_wind_y |
m/s |
gust_amplitude_x, gust_amplitude_y |
nonnegative m/s |
gust_frequency |
nonnegative Hz |
base_temperature |
degrees Celsius, not below absolute zero |
base_density |
positive kg/m3 |
base_nav_quality, base_comm_quality, base_visibility_quality |
dimensionless quality in [0, 1] |
At least one keyword is required. Unknown keys are rejected by the Python signature rather than stored as arbitrary parameters.
What Each Override Drives
| Keyword | Read by |
|---|---|
mean_wind_x, mean_wind_y, gust_amplitude_x, gust_amplitude_y, gust_frequency |
Vehicle airspeed, power and energy (and ground speed when airspeed is capped), the estimator’s wind estimate, and the contingency wind_speed_max / vertical_wind_max thresholds. gust_frequency also sets the phase of the vertical wind. |
base_temperature |
Only the contingency temperature_max closure rule; with contingency disabled it changes nothing |
base_density |
Reported in samples only; no dynamics, energy or contingency model reads it |
base_nav_quality |
Estimator measurement noise (scaled by 1/quality) and the contingency nav_quality_min rule |
base_comm_quality |
Traffic-awareness broadcasts (packet loss 0.5 x (1 - quality), latency scaled by 1/quality) and the contingency comm_quality_min rule |
base_visibility_quality |
Onboard sensing: range scaled by the quality, noise by 1/quality |
The gust amplitudes are derived once from the configured mean wind.
Overriding mean_wind_x or mean_wind_y does not rescale them; override
gust_amplitude_x and gust_amplitude_y as well when the gusts should
change. Sampled qualities have floors: navigation quality never falls below
environment.min_nav_quality (0.4 by default), communication quality never
falls below environment.min_comm_quality (0.3), and visibility never falls
below 0.05.
An override of base_nav_quality or base_comm_quality takes precedence over
the corridor-level qualities of an infrastructure layer. Every vehicle, on
every corridor, then samples the overridden value. Clearing the override
returns each corridor to its infrastructure quality. The contingency policy
samples each corridor with the same corridor-level qualities as the vehicles
on it.
Contingency Timing
An override that crosses a contingency threshold does not close elements at
once. The threshold-closure policy evaluates every evaluation_interval and
closes an element after contingency_count_threshold consecutive violations:
15 s with the default values. A closure it has issued lasts for
closure_duration (60 s by default). clearOverride() stops new closures,
but the closures already issued run to their end, so admission is not
restored at once. To reopen an element earlier, use the element domain’s
open() (for example aci.corridor.open(corridorID)). Then call
clearClosureOverride() after the internal closure has expired.