| java.lang.Object org.cougaar.planning.ldm.plan.ConstraintImpl
ConstraintImpl | public class ConstraintImpl implements Constraint,NewConstraint,Cloneable,Serializable(Code) | | Constraint implementation
A Constraint is part of a Workflow.
Constraints provide pair-wise precedence
relationship information about the Tasks
contained in the Workflow. Each Task can have
more than one applicable Constraint.
|
Constructor Summary | |
public | ConstraintImpl() | public | ConstraintImpl(Task aConstrainedTask, int aConstrainedAspect, Task aConstrainingTask, int aConstrainingAspect, double anOffset, int anOrder) | public | ConstraintImpl(Task aConstrainedTask, int aConstrainedAspect, double aConstrainingValue, int anOrder) |
ConstraintImpl | public ConstraintImpl()(Code) | | no-arg constructor
|
ConstraintImpl | public ConstraintImpl(Task aConstrainedTask, int aConstrainedAspect, Task aConstrainingTask, int aConstrainingAspect, double anOffset, int anOrder)(Code) | | Constructor for new constraint API *
|
ConstraintImpl | public ConstraintImpl(Task aConstrainedTask, int aConstrainedAspect, double aConstrainingValue, int anOrder)(Code) | | Create a constraint against an absolute value on a task
|
computeValidConstrainedValue | public double computeValidConstrainedValue()(Code) | | Computes a value from constraining, offset, and order to
satisfy constraint
Note that the current implementation only computes for temporal
constraint aspects.
|
getConstrainedAspect | public int getConstrainedAspect()(Code) | | returns the aspect type of the constrained task
|
getConstrainedEventObject | public ConstraintEvent getConstrainedEventObject()(Code) | | Return the ConstraintEvent object for the constraining task *
|
getConstrainedTask | public Task getConstrainedTask()(Code) | | Task mytask = myconstraint.getConstrainedTask();
Task Returns a Task which is constrained by another event or Task. |
getConstrainingAspect | public int getConstrainingAspect()(Code) | | returns the aspect type of the constraining task
|
getConstrainingEventObject | public ConstraintEvent getConstrainingEventObject()(Code) | | Return the ConstraintEvent object for the constraining task *
|
getConstrainingTask | public Task getConstrainingTask()(Code) | | Task mytask = myconstraint.getConstrainingTask();
Task Returns the Task which is constraining another event or Task. |
getConstraintOrder | public int getConstraintOrder()(Code) | | Returns an int which represents the
order of the Constraint.
int myorder = myconstraint.getConstraintOrder();
int The int valuewill be equal to "0" (COINCIDENT), "-1" (BEFORE) or "1" (AFTER).There are also order analogues for constraints on non-temporal aspects.These are "1" (GREATERTHAN), "-1" (LESSTHAN) or "0" (EQUALTO). |
getOffsetOfConstraint | public double getOffsetOfConstraint()(Code) | | Returns a double which represents the offset
of the Constraint.
the value to be added to the constraining value beforecomparing to the constrained value. |
setAbsoluteConstrainingValue | public void setAbsoluteConstrainingValue(double value)(Code) | | |
setConstrainedAspect | public void setConstrainedAspect(int aspect)(Code) | | |
setConstrainedTask | public void setConstrainedTask(Task task)(Code) | | |
setConstrainingAspect | public void setConstrainingAspect(int aspect)(Code) | | |
setConstrainingTask | public void setConstrainingTask(Task task)(Code) | | |
setConstraintOrder | public void setConstraintOrder(int order)(Code) | | setConstraintOrder allows you to set the order.
The order should be COINCIDENT, BEFORE, or AFTER.
mynewconstraint.setConstraintOrder(BEFORE);
Parameters: order - Should be COINCIDENT, BEFORE or AFTER only. |
setOffsetOfConstraint | public void setOffsetOfConstraint(double offset)(Code) | | setOffsetofConstraint allows you to set the time
offset of the Constraint. If it is + than the offset
is in the future, if it is - than the offset is in the
past.
mynewconstraint.setOffsetofConstraint(-2000);
Parameters: offset - - offset of constraint |
|
|