Class PrioritySolver

java.lang.Object
gov.nasa.jpl.aerie.scheduler.solver.PrioritySolver
All Implemented Interfaces:
Solver

public class PrioritySolver extends Object implements Solver
prototype scheduling algorithm that schedules activities for a plan this prototype is a single-shot priority-ordered greedy scheduler (note that there are many other possible scheduling algorithms!)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
    static class 
     
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    PrioritySolver(Problem problem, boolean analysisOnly)
    create a new greedy solver for the specified input planning problem the solver is configured to operate on a given planning problem, which must not change out from under the solver during its lifetime
  • Method Summary

    Modifier and Type
    Method
    Description
    createOneActivity(MissingActivityTemplateConflict missingConflict, String name, gov.nasa.jpl.aerie.constraints.time.Windows windows, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment evaluationEnvironment, ScheduleAt scheduleAt)
    creates one activity if possible
    calculates the next solution plan based on solver configuration operates according to the solver's controlling configuration to determine a new solution, which may range from an iterative improvement on a prior solution up to a contrasting high level alternative for consideration in general, the solution trajectory is not guaranteed to be identical across different executions on the same problem, though some specific algorithms may optionally support deterministic solution trajectories in general, the solver method is not re-entrant safe, though some specific algorithms may optionally support parallel solution requests in general, the solver requires that any previously specified input planning problem descriptor and solver configuration remain unchanged between successive calls, though some algorithms may optionally support changing problem specification the algorithm may return no solution in the event the solver has expended all of its solutions (eg by reaching a requested quality threshold, proving an optimum solution, exhausting the configured alternative search space, etc).
    void
    creates internal storage space to build up partial solutions in
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PrioritySolver

      public PrioritySolver(Problem problem, boolean analysisOnly)
      create a new greedy solver for the specified input planning problem the solver is configured to operate on a given planning problem, which must not change out from under the solver during its lifetime
      Parameters:
      problem - IN, STORED description of the planning problem to be solved, which must not change
    • PrioritySolver

      public PrioritySolver(Problem problem)
  • Method Details

    • getNextSolution

      public Optional<Plan> getNextSolution() throws SchedulingInterruptedException
      calculates the next solution plan based on solver configuration operates according to the solver's controlling configuration to determine a new solution, which may range from an iterative improvement on a prior solution up to a contrasting high level alternative for consideration in general, the solution trajectory is not guaranteed to be identical across different executions on the same problem, though some specific algorithms may optionally support deterministic solution trajectories in general, the solver method is not re-entrant safe, though some specific algorithms may optionally support parallel solution requests in general, the solver requires that any previously specified input planning problem descriptor and solver configuration remain unchanged between successive calls, though some algorithms may optionally support changing problem specification the algorithm may return no solution in the event the solver has expended all of its solutions (eg by reaching a requested quality threshold, proving an optimum solution, exhausting the configured alternative search space, etc). in general, the solver will return no solution for all requests thereafter, but some algorithms may optionally support further solutions (eg on some input/configuration modification) calculates the single-shot greedy solution to the input problem this solver is expended after one solution request; all subsequent requests will return no solution
      Specified by:
      getNextSolution in interface Solver
      Returns:
      an output schedule/plan that (possibly partially) solves the previously specified planning problem, or empty if the solver cannot provide any more solutions right now
      Throws:
      SchedulingInterruptedException
    • initializePlan

      creates internal storage space to build up partial solutions in
      Throws:
      SimulationFacade.SimulationException
      SchedulingInterruptedException
    • createOneActivity

      public Optional<SchedulingActivity> createOneActivity(MissingActivityTemplateConflict missingConflict, String name, gov.nasa.jpl.aerie.constraints.time.Windows windows, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment evaluationEnvironment, ScheduleAt scheduleAt) throws SchedulingInterruptedException
      creates one activity if possible
      Parameters:
      name - the activity name
      windows - the windows in which the activity can be instantiated
      Returns:
      the instance of the activity (if successful; else, an empty object) wrapped as an Optional.
      Throws:
      SchedulingInterruptedException
    • printEvaluation

      public void printEvaluation()