Skip to content

Commit

Permalink
Constraint interface
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCourtney committed Mar 28, 2024
1 parent 4d1500f commit cf869b5
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package gov.nasa.jpl.aerie.constraints

import gov.nasa.jpl.aerie.timeline.CollectOptions
import gov.nasa.jpl.aerie.timeline.plan.Plan

/** The interface that all constraints must satisfy. */
interface Constraint {
/**
* Run the constraint on a plan.
*
* The provided collect options are the options that the [Violations] result will be collected on after
* the constraint is run. The constraint does not need to use the options unless it collects a timeline prematurely.
*
* @param plan the plan to check the constraint on
* @param options the [CollectOptions] that the result will be collected with
*/
fun run(plan: Plan, options: CollectOptions): Violations
}

0 comments on commit cf869b5

Please sign in to comment.