Class PrioritySolver
java.lang.Object
gov.nasa.jpl.aerie.scheduler.solver.PrioritySolver
- All Implemented Interfaces:
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 ClassesModifier and TypeClassDescriptionstatic final recordstatic classstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionPrioritySolver(Problem problem) 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 TypeMethodDescriptioncreateOneActivity(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 possiblecalculates 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).voidcreates internal storage space to build up partial solutions invoid
-
Constructor Details
-
PrioritySolver
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
-
-
Method Details
-
getNextSolution
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:
getNextSolutionin interfaceSolver- 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
public void initializePlan() throws SimulationFacade.SimulationException, SchedulingInterruptedExceptioncreates internal storage space to build up partial solutions in -
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 namewindows- 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()
-