Skip to content

[uss_qualifier] Add resource environments - #1775

Merged
BenjaminPelletier merged 5 commits into
interuss:mainfrom
BenjaminPelletier:resource-environments
Oct 9, 2026
Merged

BenjaminPelletier merged 5 commits into
interuss:mainfrom
BenjaminPelletier:resource-environments

Conversation

@BenjaminPelletier

Copy link
Copy Markdown
Member

This PR is a follow-up to #1749 to fix the challenge of clearing all the areas (in PrepareFlightPlanners) that will later be used in ConflictHigherPriority after offsetting each instance to avoid conflicts. The approach taken in this PR is:

  • Create a PluralResource interface indicating that a resource actually contains many resources
  • Annotate FlightPlannersResource as a PluralResource
  • Create a ResourceEnvironmentsGenerator interface indicating that the implementing object (usually a resource) is capable of producing a sequence of resource environments (set of resources each identified by an ID)
  • Create a ResourceCombinationsResource which is a resource that is a ResourceEnvironmentsGenerator for each applicable combination of a set of plural resources
  • Create a EnvironmentAugmentationResource which is a ResourceEnvironmentsGenerator resource that attaches additional resources to each environment produced by an underlying/source ResourceEnvironmentsGenerator according to specified ResourceProvidingResources
  • Update PrepareFlightPlanners to accept a ResourceEnvironmentsGenerator that produces environments with flight_intents in the generated environments
  • Create a ResourceEnvironmentsActionGenerator that generates an action per environment from a ResourceEnvironmentsGenerator
  • Chain the tools above together to allow the priority_preemption_flights_provider resource in the F3548-21 test suite to inform both PrepareFlightPlanners and ConflictHigherPriority:
flowchart TD
  conflicting_flights[conflicting_flights<br>FlightIntentsResource]
  priority_preemption_flights_provider[priority_preemption_flights_provider<br>TriangularCascadeSoutheastResource<br>ResourceProvidingResource]
  priority_preemption_combinations[priority_preemption_combinations<br>ResourceCombinationsResource<br>ResourceEnvironmentsGenerator]
  flight_planners[flight_planners<br>FlightPlannersResource<br>PluralResource]
  priority_preemption_environments[priority_preemption_environments<br>EnvironmentAugmentationResource<br>ResourceEnvironmentsGenerator]
  flight_intents_environments[flight_intents_environments<br>ConcatenatedResourceEnvironmentsResource<br>ResourceEnvironmentsGenerator]
  other_envs["Other (future) flight-intent-providing environments"]
  style other_envs stroke-dasharray: 5 5
  PrepareFlightPlanners
  ActionGenerator[ResourceEnvironmentsActionGenerator]
  ConflictHigherPriority@{ shape: procs, label: "ConflictHigherPriority"}

  conflicting_flights -->|flight_intents| priority_preemption_flights_provider
  flight_planners -->|uss1| priority_preemption_combinations
  flight_planners -->|uss2| priority_preemption_combinations
  priority_preemption_combinations -->|uss1,uss1<br>uss1,uss2<br>...| priority_preemption_environments
  priority_preemption_flights_provider -->|flight_intents, ...| priority_preemption_environments
  priority_preemption_environments -->|flight_intents,uss1,uss1<br>flight_intents,uss1,uss2<br>...| flight_intents_environments
  other_envs -->|flight_intents,...<br>...| flight_intents_environments
  flight_intents_environments -->|flight_intents| PrepareFlightPlanners
  priority_preemption_environments -->|flight_intents,uss1,uss1<br>flight_intents,uss1,uss2<br>...| ActionGenerator --> ConflictHigherPriority
Loading

This PR also adjusts resource instantiation to allow optional resources to be specified as keyword-based resource dependencies even though keyword-based resource dependencies can't specify a default value when the resource isn't provided (we assume it's None).

My intent after this PR is to extend this approach to other similar situations: certainly ConflictEqualPriorityNotPermitted, but likely also deprecating all special-purpose action generators.

@BenjaminPelletier
BenjaminPelletier marked this pull request as ready for review October 7, 2026 05:57

@mickmis mickmis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

remaining_generators = generators.copy()
self._generators = []
if (
"environments_sequence" in specification

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not needed anymore :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed; I've removed after merging main :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this change is not breaking for users of this test suite, correct?
If not, this would warrant a note in the 'next release notes'.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, no change for test suite users.

flight_intents2: FlightIntentsResource | None = None,
flight_intents3: FlightIntentsResource | None = None,
flight_intents4: FlightIntentsResource | None = None,
flight_intents_provider: ResourceProvidingResource[

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this change warrants a note in the 'next release notes'? Scenarios may be used directly in configurations.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good; I had assumed effectively no one would use the scenarios directly, but probably not good to make that assumption. Note added.

@BenjaminPelletier
BenjaminPelletier merged commit 858a699 into interuss:main Oct 9, 2026
24 checks passed
@BenjaminPelletier
BenjaminPelletier deleted the resource-environments branch October 9, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants