beforeCommitment(Date currentdate) Check to see if the current time is before the Commitment date.
Will return true if we have not reached the commitment date.
Will return true if the commitment date is undefined (null)
Will return false if we have passed the commitment date.
Parameters: currentdate - The current date.
private_updatePreferences(TaskImpl that) ONLY for infrastructure! Compare the preferences from two
tasks, updating this.preferences to match that.preferences
only if needed.
public void addingToBlackboard(Subscriber s, boolean commit)(Code)
beforeCommitment
public boolean beforeCommitment(Date currentdate)(Code)
Check to see if the current time is before the Commitment date.
Will return true if we have not reached the commitment date.
Will return true if the commitment date is undefined (null)
Will return false if we have passed the commitment date.
Parameters: currentdate - The current date. boolean
changingInBlackboard
public void changingInBlackboard(Subscriber s, boolean commit)(Code)
WARNING: This date may be null if it is undefined
Get the Commitment date of this task.
After this date, the task is not allowed to be rescinded
or re-planned (change in preferences).
Date
Returns PlanElement that this Task is associated with.
Can be used to discern between expandable and non-expandable
Tasks. If Task has no PlanElement associated with it, will
return null.
public synchronized Preference getPreference(int aspect_type)(Code)
return the preference for the given aspect type
will return null if there is not a preference defined for this aspect type
Parameters: aspect_type - The Aspect referenced by the preference Preference
getPreferenceFromArray
public synchronized Preference getPreferenceFromArray(int i)(Code)
public double getPreferredValue(int aspect_type)(Code)
return the preferred value for a given aspect type
from the defined preference (and scoring function)
will return Double.NaN if there is not a preference defined for this aspect type
Parameters: aspect_type - The Aspect referenced by the preference double
public synchronized boolean private_updatePreferences(TaskImpl that)(Code)
ONLY for infrastructure! Compare the preferences from two
tasks, updating this.preferences to match that.preferences
only if needed.
true IFF the preferences were changed in this.
privately_resetPlanElement
public synchronized void privately_resetPlanElement()(Code)
This method clears the PlanElement associated with this Task.
public void setAuxiliaryQueryTypes(int[] thetypes)(Code)
Set the collection of AuxiliaryQueryTypes that the task is
requesting information on. This information will be returned in
the AllocationResult of this task's disposition.
Parameters: thetypes - A collection of defined AuxiliaryQueryTypes See Also:org.cougaar.planning.ldm.plan.AuxiliaryQueryType
setCommitmentDate
public void setCommitmentDate(Date commitDate)(Code)
Set the Commitment date of this task.
After this date, the task is not allowed to be rescinded
or re-planned (change in preferences).
Parameters: commitDate -