Class ScheduledGoal
java.lang.Object
edu.tufts.hrilab.action.goal.Goal
edu.tufts.hrilab.action.goal.schedule.ScheduledGoal
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionScheduledGoal(Predicate goalState) Scheduled goal form: scheduled(goalPred, startPred, periodPred, endPred) - only goalPred and startPred OR periodPred are required - no startTime means start right away - endPred only valid if periodPred is specified - startPred forms: start(number, timeunit), start(date-format) - periodPred forms: period(number,timeunit), period(date-format) - endPred forms: end(number, timeunit), end(date-format) -
Method Summary
Modifier and TypeMethodDescriptionGet end time specified in Date format.Get the full goal predicate.getGoalPredicate(boolean reformatDateString) Get the last submitted Goal instance from this scheduled goal.Generate and return a new Goal instance to execute.longGet periodicity in millisecondsGet start time specified in Date format.Get shallow copy of the submitted goals for this scheduled goal.booleanIf this goal has a specified end time.booleanIf this goal has a specified start time.booleanIf this goal is periodic.final booleanThis class represents scheduled goals, so this always returns true.static DateparseDateString(String dateString) booleanUpdate this goal's schedule.Methods inherited from class edu.tufts.hrilab.action.goal.Goal
addListener, bindPredicate, cancel, createGoal, createGoal, createGoal, getActionInterpreter, getActor, getContextDescription, getCurrentContext, getEndTime, getExecutionType, getFailConditions, getGoalStatePredicate, getHeldResources, getId, getInfo, getMetric, getObservableEnum, getPriority, getPriorityTier, getRequiredResources, getRootContext, getScheduledState, getStartTime, getStatus, getSubmitter, isAction, isLearningGoal, isObservation, isPersistent, matches, removeListener, resume, setActionInterpreter, setAsStarted, setCurrentContext, setExecutionType, setFailureStatus, setHeldResources, setIsAction, setIsLearningGoal, setMetric, setPriority, setPriorityTier, setRequiredResources, setRootContext, setScheduledState, setStatus, setSubmitter, suspend, toString
-
Constructor Details
-
ScheduledGoal
Scheduled goal form: scheduled(goalPred, startPred, periodPred, endPred) - only goalPred and startPred OR periodPred are required - no startTime means start right away - endPred only valid if periodPred is specified - startPred forms: start(number, timeunit), start(date-format) - periodPred forms: period(number,timeunit), period(date-format) - endPred forms: end(number, timeunit), end(date-format)- Parameters:
goalState- scheduled goal predicate: scheduled(goalPred, [startPred], [periodPred], [endPred])
-
-
Method Details
-
getDisplayPredicate
-
getGoalPredicate
Description copied from class:GoalGet the full goal predicate. This is the predicate that was used to create this goal. Examples: goal(self,state) --> goal(self,state) action1(self,args) --> action1(self,args) obs(self,state) --> obs(self,state) If the original goal predicate was unbound, this will return the unbound version.- Overrides:
getGoalPredicatein classGoal- Returns:
-
getGoalPredicate
-
getSubmittedGoals
Get shallow copy of the submitted goals for this scheduled goal.- Returns:
-
getNextGoalToSubmit
Generate and return a new Goal instance to execute.- Returns:
-
getLastSubmittedGoal
Get the last submitted Goal instance from this scheduled goal.- Returns:
-
isScheduled
public final boolean isScheduled()This class represents scheduled goals, so this always returns true.- Overrides:
isScheduledin classGoal- Returns:
-
isPeriodic
public boolean isPeriodic()If this goal is periodic.- Returns:
-
getScheduledPeriod
public long getScheduledPeriod()Get periodicity in milliseconds- Returns:
-
hasStartDate
public boolean hasStartDate()If this goal has a specified start time.- Returns:
-
getStartDate
Get start time specified in Date format.- Returns:
-
hasEndDate
public boolean hasEndDate()If this goal has a specified end time.- Returns:
-
getEndDate
Get end time specified in Date format.- Returns:
-
update
Update this goal's schedule.- Parameters:
update- predicate specifying update details- Returns:
- if update was successful
-
parseDateString
-