NASA-AMMOS / NASA-AMMOS/plandev

Constraints: expose struct fields as profiles

Open
#627 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

constraints feature
Dominant language
Java
Stars
128
Forks
33
Avg merge
1d 17h
Merged PRs (30d)
12

Description

From https://jira.jpl.nasa.gov/browse/AERIEQS-442:

E.g. we have an Activity with a 3 vector parameter that within the constraint system generates a Discrete parameter with a {x: number; y: number, z: number} schema. I want to grab the x value from that and check if it is less than something, but can’t do that while it’s a Discrete

The scope of this task would be to make is possible to refer to a numeric field of a struct discrete profile (whether a resource profile, or an activity parameter). Ideally, this would also handle deeper nesting.

Non-struct discrete profiles (e.g. lists) would be out of scope for this ticket.

Very notional syntax:
Where, /vector is a discrete resource, which is a struct with a numeric field "x".

Real.Resource("/vector", "x").lessThan(5)

These profiles would probably be limited to step functions - though we could give some thought to whether we could have a non-zero slope linear profile as a field of a struct. (this topic came up when we were walking through #546, I forget where we arrived).

Related to #757

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the constraint-system handling of discrete resource profiles and activity parameters, then read related issue #757 and the discussion referenced from #546. Define how numeric fields and deeper nested fields are selected, including whether field profiles are limited to step functions; done means struct fields can be referenced in constraints while list profiles remain out of scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.