NASA-AMMOS / NASA-AMMOS/plandev
Constraints: expose struct fields as profiles
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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