| org.cougaar.planning.ldm.plan.NewConstraint
All known Subclasses: org.cougaar.planning.ldm.plan.ConstraintImpl,
NewConstraint | public interface NewConstraint extends Constraint(Code) | | NewConstraint extends Constraint and provides
setter methods for building valid Constraint objects.
|
setAbsoluteConstrainingValue | void setAbsoluteConstrainingValue(double value)(Code) | | Set an absolute value as the constraining aspect value. The
constrained task's preferences can be adjusted to fulfill the
constraint. The constraining value of an absolute constraint
may be changed at any time. The new value will be used in
subsequent constraint violation checks and in setting the
preferences of the constrained task. The constraining value is
added to the offset value, but it is not necessary to use both
features.
The use of this method is mutually exclusive of using
setConstrainingTask. Use one or the other, not both for a
particular Constraint.
Parameters: value - the value against which the constrained value is tested. |
setConstrainedAspect | void setConstrainedAspect(int aspect)(Code) | | setConstrainedAspect allows you to set the constrained
aspect. For non-temporal constraints both constraining and
constrained aspects must be the same. For temporal aspects
they can be different, but must be temporal aspects.
This method should be called once before the constraint is
added to the workflow.
Parameters: aspect - the aspect type of the allocation result to betested. |
setConstrainedTask | void setConstrainedTask(Task task)(Code) | | setConstrainedTask allows you to set the constrained task.
This should be done exactly once for a particular constraint
and must be done before the constraint is added to the
workflow.
Parameters: task - is the task that is to be adjusted to satisfy theconstraint. |
setConstrainingAspect | void setConstrainingAspect(int aspect)(Code) | | setConstrainingAspect allows you to set the constraining
aspect. For non-temporal constraints both constraining and
constrained aspects must be the same For temporal aspects they
can be different (as long as they are both temporal aspects).
This should be done exactly once for a particular constraint
that is not an absolute constraint and must be done before the
constraint is added to the workflow.
Parameters: aspect - the aspect of the constraining task. |
setConstrainingTask | void setConstrainingTask(Task task)(Code) | | setConstrainingTask allows you to set the constraining task.
This should be done exactly once for a particular constraint
that is not an absolute constraint and must be done before the
constraint is added to the workflow.
Parameters: task - the task that is constraining another task. |
setConstraintOrder | void setConstraintOrder(int order)(Code) | | Specifies how the aspect values should be constrained. The
order should be COINCIDENT, BEFORE, or AFTER for temporal
constraints, GREATERTHAN, LESSTHAN, or EQUALTO for
non-temporal constraints.
mynewconstraint.setConstraintOrder(BEFORE);
Parameters: order - - Should be COINCIDENT, BEFORE, AFTER,GREATERTHAN, LESSTHAN or EQUALTO. |
setOffsetOfConstraint | void setOffsetOfConstraint(double offset)(Code) | | setOffsetOfConstraint allows you to set the offset of the
Constraint. The offset is added to the constraining aspect
value before it is compared to the constrained aspect value.
mynewconstraint.setOffsetOfConstraint(-2000);
Parameters: offset - - of the Constraint |
|
|