public interface RealVar extends Variable, CArExpression
CArExpression.OperatorBOOL, CSTE, INT, KIND, REAL, SET, TYPE, VAR, VIEWNO_CHILD| Modifier and Type | Method and Description |
|---|---|
double |
getLB()
Retrieves the lower bound of the variable
|
double |
getPrecision() |
double |
getUB()
Retrieves the upper bound of the variable
|
default RealVar |
realVar(double p) |
boolean |
updateBounds(double lowerbound,
double upperbound,
ICause cause)
Updates the bounds of the domain of
this to value. |
boolean |
updateLowerBound(double value,
ICause cause)
Updates the lower bound of the domain of
this to value. |
boolean |
updateUpperBound(double value,
ICause cause)
Updates the upper bound of the domain of
this to value. |
_schedIter, addMonitor, asBoolVar, asIntVar, asRealVar, asSetVar, clearEvents, contradiction, createDelta, getCause, getDelta, getDindex, getEnvironment, getIndexInPropagator, getMask, getModel, getName, getNbProps, getPIndices, getPropagator, getPropagators, getTypeAndKind, getViews, isAConstant, isInstantiated, link, notifyMonitors, notifyPropagators, notifyViews, removeMonitor, setPIndice, storeEvents, subscribeView, swapOnActivate, swapOnPassivate, unlinkcompareToabs, acos, acosh, add, add, asin, asinh, atan, atan2, atan2, atanh, cos, cosh, div, div, eq, eq, exp, ge, ge, getModel, gt, gt, le, le, ln, lt, lt, max, max, min, min, mul, mul, neg, pow, pow, sin, sinh, sqrt, sub, sub, tan, tanhdouble getLB()
double getUB()
boolean updateLowerBound(double value,
ICause cause)
throws ContradictionException
this to value.
The instruction comes from propagator.
value is smaller than the lower bound of the domain, nothing is done and the return value is false,value leads to a dead-end (domain wipe-out),
a ContradictionException is thrown,value can be done safely,
the event type is created (the original event can be promoted) and observers are notified
and the return value is truevalue - new lower bound (included)cause - updating releaserContradictionException - if the domain become empty due to this actionboolean updateUpperBound(double value,
ICause cause)
throws ContradictionException
this to value.
The instruction comes from propagator.
value is greater than the upper bound of the domain, nothing is done and the return value is false,value leads to a dead-end (domain wipe-out),
a ContradictionException is thrown,value can be done safely,
the event type is created (the original event can be promoted) and observers are notified
and the return value is truevalue - new upper bound (included)cause - update releaserContradictionException - if the domain become empty due to this actionboolean updateBounds(double lowerbound,
double upperbound,
ICause cause)
throws ContradictionException
this to value.
The instruction comes from propagator.
lowerbound,upperbound] includes the domain of this, nothing is done and the return value is false,ContradictionException is thrown,truelowerbound - new lower bound (included)upperbound - new upper bound (included)cause - update releaserContradictionException - if the domain become empty due to this actiondouble getPrecision()
default RealVar realVar(double p)
realVar in interface CArExpressionp - precision of the variable to returnRealVar.
If necessary, it creates intermediary variable and posts intermediary constraintsCopyright © 2018. All rights reserved.