public interface RealVar extends Variable
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
|
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 . |
addMonitor, contradiction, createDelta, duplicate, duplicate, getDelta, getIndexInPropagator, getName, getNbProps, getPIndices, getPropagator, getPropagators, getSolver, getTypeAndKind, getViews, isInstantiated, link, notifyMonitors, notifyPropagators, notifyViews, recordMask, removeMonitor, subscribeView, unlink
compareTo
double 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 true
value
- 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 true
value
- 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,true
lowerbound
- new lower bound (included)upperbound
- new upper bound (included)cause
- update releaserContradictionException
- if the domain become empty due to this actiondouble getPrecision()
Copyright © 2015. All rights reserved.