Interface Plan

All Known Implementing Classes:
PlanInMemory

public interface Plan
a solution to a planning problem including a schedule of activities may only be a partial solution to the whole planning problem, ie some goals may be left unsatisfied
  • Method Details

    • duplicate

      Plan duplicate()
      Duplicates a plan
      Returns:
      the duplicate plan
    • add

      void add(Collection<SchedulingActivity> acts)
      adds the given activity instances to the scheduled plan solution the provided instances must have start times specified
      Parameters:
      acts - IN the set of activity instances to schedule into the plan
    • add

      void add(SchedulingActivity act)
      adds the given activity instance to the scheduled plan solution the provided instance must have start time specified
      Parameters:
      act - IN activity instance to schedule into the plan
    • remove

      void remove(Collection<SchedulingActivity> acts)
      adds the given activity instances to the scheduled plan solution the provided instances must have start times specified
      Parameters:
      acts - IN the set of activity instances to remove from the plan
    • remove

      void remove(SchedulingActivity act)
      removes the given activity instance to the scheduled plan solution the provided instance must have start time specified
      Parameters:
      act - IN activity instance to remove from the plan
    • replaceActivity

      void replaceActivity(SchedulingActivity oldAct, SchedulingActivity newAct)
      replace and old activity by a new one
      Parameters:
      oldAct - Old Activity
      newAct - New Activity
    • getActivitiesByTime

      List<SchedulingActivity> getActivitiesByTime()
      fetches activities in the plan ordered by start time
      Returns:
      set of all activities in the plan ordered by start time
    • getActivitiesByType

      Map<ActivityType,List<SchedulingActivity>> getActivitiesByType()
      fetches activities in the plan by type
      Returns:
      map of all activities in the plan by type
    • getActivitiesById

      Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,SchedulingActivity> getActivitiesById()
      fetches activities in the plan by id
      Returns:
      map of all activities in the plan by id
    • getActivities

      Set<SchedulingActivity> getActivities()
      fetches activities in the plan
      Returns:
      set of all activities in the plan
    • getAnchorIds

      Set<gov.nasa.jpl.aerie.types.ActivityDirectiveId> getAnchorIds()
      Returns:
      the set of anchors from all activities in the plan
    • find

      Collection<SchedulingActivity> find(ActivityExpression template, gov.nasa.jpl.aerie.constraints.model.SimulationResults simulationResults, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment evaluationEnvironment)
      finds activity instances in the plan that meet the given criteria
      Parameters:
      template - IN the matching criteria to use on activity instances
      Returns:
      collection of instances that match the given template
    • addEvaluation

      void addEvaluation(Evaluation eval)
      adds a new evaluation to the plan note that different solvers or metrics will have different evaluations for the same plan
      Parameters:
      eval - IN the new evaluation to add to the plan
    • getEvaluation

      Evaluation getEvaluation()
      fetches evaluation posted to the plan
      Returns:
      evaluation posted to the plan
    • calculateAbsoluteStartOffsetAnchoredActivity

      gov.nasa.jpl.aerie.merlin.protocol.types.Duration calculateAbsoluteStartOffsetAnchoredActivity(SchedulingActivity actAnchorTo)
    • replaceIds

      Plan replaceIds(Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId> map)