public class Agenda
extends java.lang.Object
The lists of pending goals and preempted goals are sorted by priority. See
PDDLSingleGoal
to get more information.
Constructor and Description |
---|
Agenda(java.util.LinkedList<PDDLSingleGoal> goals)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
PDDLSingleGoal |
containedPredicateInPendingGoals(java.lang.String predicate)
Method that allows to check whether a predicate is contained in the pending
goals list.
|
PDDLSingleGoal |
containedPredicateInPreemptedGoals(java.lang.String predicate)
Method that allows to check whether a predicate is contained in the preempted
goals list.
|
PDDLSingleGoal |
getCurrentGoal() |
java.util.LinkedList<PDDLSingleGoal> |
getPendingGoals() |
java.util.LinkedList<PDDLSingleGoal> |
getPreemptedGoals() |
java.util.LinkedList<PDDLSingleGoal> |
getReachedGoals() |
void |
haltCurrentGoal()
Method that allows to halt the current goal in case some discrepancy is found.
|
boolean |
setCurrentGoal()
Method that sets the current goal.
|
void |
setReachedFromPending(PDDLSingleGoal goal)
Method that allows to move a goal instance from the pending goals list
to the reached goals list.
|
void |
setReachedFromPreempted(PDDLSingleGoal goal)
Method that allows to move a goal instance from the preempted goals list
to the reached goals list.
|
java.lang.String |
toString() |
void |
updateReachedGoals()
Method that allows to update the reached goals list.
|
public Agenda(java.util.LinkedList<PDDLSingleGoal> goals)
goals
- List of goalspublic java.util.LinkedList<PDDLSingleGoal> getPendingGoals()
public java.util.LinkedList<PDDLSingleGoal> getPreemptedGoals()
public java.util.LinkedList<PDDLSingleGoal> getReachedGoals()
public PDDLSingleGoal getCurrentGoal()
public boolean setCurrentGoal()
public void haltCurrentGoal()
public void updateReachedGoals()
public PDDLSingleGoal containedPredicateInPendingGoals(java.lang.String predicate)
predicate
- Predicate to be searched.public PDDLSingleGoal containedPredicateInPreemptedGoals(java.lang.String predicate)
predicate
- Predicate to be searched.public void setReachedFromPending(PDDLSingleGoal goal)
goal
- PDDLSingleGoal instance to be moved.public void setReachedFromPreempted(PDDLSingleGoal goal)
goal
- PDDLSingleGoal instance to be moved.public java.lang.String toString()
toString
in class java.lang.Object