NASA-AMMOS/aerie

Fix Procedural Generator Constraint to work with classes or use interfaces

Opened this issue · 0 comments

Background

The "Generator Constraint" is a utility wrapper provided with the procedural constraints library to make it easier to generate constraint violations, described in the docs here:

https://nasa-ammos.github.io/aerie-docs/scheduling-and-constraints/procedural/constraints/#generator-constraints

Issue

@skovati found while implementing #1611 that the generator constraint described in the docs doesn't work yet, and the reason is related to the fact that it's using a Java class for the Violation instead of a record. Per discussion with @skovati and @JoelCourtney we can either:

  • Make some changes to make it work with a Java class
  • Or use an interface instead of a class

@JoelCourtney will look into this more and decide on the best path.