public interface IloSolution
add or
remove methods.
You can access current values using get*** methods.
Each different engine provides its way of storing or restoring solutions.| Modifier and Type | Method and Description |
|---|---|
void |
add(IloIntervalVar a)
Adds the interval variable
a
to the invoking solution. |
void |
add(IloIntervalVar[] a)
Adds each element of array
a to the invoking solution. |
void |
add(IloIntVar var) |
void |
add(IloIntVar[] var) |
void |
add(IloNumVar v) |
boolean |
contains(IloIntervalVar extr)
Returns
true if extr is present
in the invoking object. |
boolean |
contains(IloIntVar extr)
Returns
true if extr is present
in the invoking object. |
void |
end() |
int |
getEnd(IloIntervalVar a)
Returns the end value of interval
variable
a in the invoking solution. |
int |
getEndMax(IloIntervalVar a)
Returns the maximal end value of interval
variable
a in the invoking solution. |
int |
getEndMin(IloIntervalVar a)
Returns the minimal end value of interval
variable
a in the invoking solution. |
int |
getLength(IloIntervalVar a)
Returns the length value of interval
variable
a in the invoking solution. |
int |
getLengthMax(IloIntervalVar a)
This member function returns the maximal length value of
interval variable
a in the invoking solution. |
int |
getLengthMin(IloIntervalVar a)
Returns the minimal length value of
interval variable
a in the invoking solution. |
int |
getMax(IloIntVar var) |
double |
getMax(IloNumVar var) |
int |
getMin(IloIntVar var) |
double |
getMin(IloNumVar var) |
int |
getSize(IloIntervalVar a)
Returns the size value of interval
variable
a in the invoking solution. |
int |
getSizeMax(IloIntervalVar a)
Returns the maximal size value of
interval variable
a in the invoking solution. |
int |
getSizeMin(IloIntervalVar a)
Returns the minimal size value of
interval variable
a in the invoking solution. |
int |
getStart(IloIntervalVar a)
Returns the start value of interval
variable
a in the invoking solution. |
int |
getStartMax(IloIntervalVar a)
Returns the maximal start value of
interval variable
a in the invoking solution. |
int |
getStartMin(IloIntervalVar a)
Returns the minimal start value of
interval variable
a in the invoking solution. |
int |
getValue(IloIntVar var) |
double |
getValue(IloNumVar v) |
boolean |
isAbsent(IloIntervalVar a)
Returns true if the absence status of
interval variable
a is true in the invoking
solution. |
boolean |
isFixed(IloIntVar var) |
boolean |
isInDomain(IloIntVar var,
int value) |
boolean |
isPresent(IloIntervalVar a)
Returns true if the presence status of
interval variable
a is true in the invoking
solution. |
void |
remove(IloIntervalVar extr)
Removes extractable
extr from the invoking
solution. |
void |
remove(IloIntervalVar[] extr)
Removes each element of
array from the invoking
solution. |
void |
remove(IloIntVar extr)
Removes
extr from the invoking
solution. |
void |
remove(IloIntVar[] extr)
Removes each element of
extr from the invoking
solution. |
void |
setAbsent(IloIntervalVar a)
Sets the absence status of interval
variable
a to be true in the invoking solution. |
void |
setDomain(IloIntVar var,
int min,
int max) |
void |
setEnd(IloIntervalVar a,
int v)
Sets the end value (both minimum and
maximum) of interval variable
a to v in
the invoking solution. |
void |
setEndMax(IloIntervalVar a,
int max)
Sets the maximal end value of interval
variable
a in the invoking solution to
max. |
void |
setEndMin(IloIntervalVar a,
int min)
Sets the minimal end value of interval
variable
a in the invoking solution to
min. |
void |
setLength(IloIntervalVar a,
int v)
Sets the length value (both minimum and
maximum) of interval variable
a to v in
the invoking solution. |
void |
setLengthMax(IloIntervalVar a,
int max)
Sets the maximal length value of interval
variable
a in the invoking solution to
max. |
void |
setLengthMin(IloIntervalVar a,
int min)
Sets the minimal length value of interval
variable
a in the invoking solution to
min. |
void |
setMax(IloIntVar var,
int max) |
void |
setMax(IloNumVar var,
double max) |
void |
setMin(IloIntVar var,
int min) |
void |
setMin(IloNumVar var,
double min) |
void |
setOptional(IloIntervalVar a)
This member function states that interval variable
a is optional in the invoking solution, that is, its
presence/absence status is unbound. |
void |
setPresent(IloIntervalVar a)
Sets the presence status of interval
variable
a to be true in the invoking solution. |
void |
setSize(IloIntervalVar a,
int v)
Sets the size value (both minimum and
maximum) of interval variable
a to v in
the invoking solution. |
void |
setSizeMax(IloIntervalVar a,
int max)
Sets the maximal size value of interval
variable
a in the invoking solution to
max. |
void |
setSizeMin(IloIntervalVar a,
int min)
Sets the minimal size value of interval
variable
a in the invoking solution to
min. |
void |
setStart(IloIntervalVar a,
int v)
Sets the start value (both minimum and
maximum) of interval variable
a to v in
the invoking solution. |
void |
setStartMax(IloIntervalVar a,
int max)
Sets the maximal start value of interval
variable
a in the invoking solution to
max. |
void |
setStartMin(IloIntervalVar a,
int min)
Sets the minimal start value of interval
variable
a in the invoking solution to
min. |
void |
setValue(IloIntVar var,
int value) |
void |
setValue(IloNumVar var,
double value) |
void |
store()
Stores the values of the objects added to the solution.
|
void add(IloNumVar v) throws IloException
IloExceptiondouble getValue(IloNumVar v) throws IloException
IloExceptionvoid setMin(IloNumVar var, double min) throws IloException
IloExceptionvoid setMax(IloNumVar var, double max) throws IloException
IloExceptiondouble getMin(IloNumVar var) throws IloException
IloExceptiondouble getMax(IloNumVar var) throws IloException
IloExceptionvoid setValue(IloNumVar var, double value) throws IloException
IloExceptionint getMin(IloIntVar var) throws IloException
IloExceptionint getMax(IloIntVar var) throws IloException
IloExceptionvoid setValue(IloIntVar var, int value) throws IloException
IloExceptionvoid setMin(IloIntVar var, int min) throws IloException
IloExceptionvoid setMax(IloIntVar var, int max) throws IloException
IloExceptionvoid add(IloIntVar var) throws IloException
IloExceptionvoid add(IloIntVar[] var) throws IloException
IloExceptionboolean isFixed(IloIntVar var) throws IloException
IloExceptionboolean isInDomain(IloIntVar var, int value) throws IloException
IloExceptionvoid setDomain(IloIntVar var, int min, int max) throws IloException
IloExceptionint getValue(IloIntVar var)
void store()
throws IloException
Stores the values of the objects added to the solution.
IloExceptionboolean contains(IloIntVar extr) throws IloException
Returns true if extr is present
in the invoking object. Otherwise, it returns false.
IloExceptionvoid remove(IloIntVar extr) throws IloException
Removes extr from the invoking
solution. If the invoking solution does not contain extr, the member
function throws an instance of IloException.
IloExceptionvoid remove(IloIntVar[] extr) throws IloException
Removes each element of extr from the invoking
solution. If the invoking solution does not contain all elements of extr,
it throws an instance of IloException.
IloExceptionboolean contains(IloIntervalVar extr) throws IloException
Returns true if extr is present
in the invoking object. Otherwise, it returns false.
IloExceptionvoid remove(IloIntervalVar extr) throws IloException
Removes extractable extr from the invoking
solution. If the invoking solution does not contain extr,
it throws an instance of IloException.
IloExceptionvoid remove(IloIntervalVar[] extr) throws IloException
Removes each element of array from the invoking
solution. If the invoking solution does not contain all elements of array,
the member function throws an instance of IloException.
IloExceptionvoid add(IloIntervalVar a) throws IloException
Adds the interval variable a
to the invoking solution.
IloExceptionvoid add(IloIntervalVar[] a) throws IloException
Adds each element of array a to the invoking solution.
IloExceptionboolean isPresent(IloIntervalVar a) throws IloException
Returns true if the presence status of
interval variable a is true in the invoking
solution. If the presence status of the saved interval variable
is not fixed or fixed to false (absent interval), this member
function returns false. If the invoking solution does not contain
the interval variable, this function throws an instance of
IloException.
IloExceptionboolean isAbsent(IloIntervalVar a) throws IloException
Returns true if the absence status of
interval variable a is true in the invoking
solution. If the absence status of the saved interval variable is
not fixed or fixed to false (present interval), this member
function returns false. If the invoking solution does not contain
the interval variable, this function throws an instance of
IloException.
IloExceptionint getStart(IloIntervalVar a) throws IloException
Returns the start value of interval
variable a in the invoking solution. If the invoking
solution does not contain the interval variable or if the saved
minimum and maximum start of the interval variable are not equal,
this member function throws an instance of
IloException.
IloExceptionint getStartMin(IloIntervalVar a) throws IloException
Returns the minimal start value of
interval variable a in the invoking solution. If the
invoking solution does not contain the interval variable, this
function throws an instance of IloException.
IloExceptionint getStartMax(IloIntervalVar a) throws IloException
Returns the maximal start value of
interval variable a in the invoking solution. If the
invoking solution does not contain the interval variable, this
function throws an instance of IloException.
IloExceptionint getEnd(IloIntervalVar a) throws IloException
Returns the end value of interval
variable a in the invoking solution. If the invoking
solution does not contain the interval variable or if the saved
minimum and maximum end of the interval variable are not equal,
this member function throws an instance of
IloException.
IloExceptionint getEndMin(IloIntervalVar a) throws IloException
Returns the minimal end value of interval
variable a in the invoking solution. If the invoking
solution does not contain the interval variable, this function
throws an instance of IloException.
IloExceptionint getEndMax(IloIntervalVar a) throws IloException
Returns the maximal end value of interval
variable a in the invoking solution. If the invoking
solution does not contain the interval variable, this function
throws an instance of IloException.
IloExceptionint getLength(IloIntervalVar a) throws IloException
Returns the length value of interval
variable a in the invoking solution. If the invoking
solution does not contain the interval variable or if the saved
minimum and maximum length of the interval variable are not
equal, this member function throws an instance of
IloException.
IloExceptionint getLengthMin(IloIntervalVar a) throws IloException
Returns the minimal length value of
interval variable a in the invoking solution. If the
invoking solution does not contain the interval variable, this
function throws an instance of IloException.
IloExceptionint getLengthMax(IloIntervalVar a) throws IloException
This member function returns the maximal length value of
interval variable a in the invoking solution. If the
invoking solution does not contain the interval variable, this
function throws an instance of IloException.
IloExceptionint getSize(IloIntervalVar a) throws IloException
Returns the size value of interval
variable a in the invoking solution. If the invoking
solution does not contain the interval variable or if the saved
minimum and maximum size of the interval variable are not equal,
this member function throws an instance of
IloException.
IloExceptionint getSizeMin(IloIntervalVar a) throws IloException
Returns the minimal size value of
interval variable a in the invoking solution. If the
invoking solution does not contain the interval variable, this
function throws an instance of IloException.
IloExceptionint getSizeMax(IloIntervalVar a) throws IloException
Returns the maximal size value of
interval variable a in the invoking solution. If the
invoking solution does not contain the interval variable, this
function throws an instance of IloException.
IloExceptionvoid setPresent(IloIntervalVar a) throws IloException
Sets the presence status of interval
variable a to be true in the invoking solution. If
the invoking solution does not contain the interval variable,
this function will automatically add it.
IloExceptionvoid setAbsent(IloIntervalVar a) throws IloException
Sets the absence status of interval
variable a to be true in the invoking solution. If
the invoking solution does not contain the interval variable,
this function will automatically add it.
IloExceptionvoid setOptional(IloIntervalVar a) throws IloException
This member function states that interval variable
a is optional in the invoking solution, that is, its
presence/absence status is unbound. If the invoking solution does
not contain the interval variable, this function will
automatically add it.
IloExceptionvoid setStart(IloIntervalVar a, int v) throws IloException
Sets the start value (both minimum and
maximum) of interval variable a to v in
the invoking solution. If the invoking solution does not contain
the interval variable, this function will automatically add
it.
IloExceptionvoid setStartMin(IloIntervalVar a, int min) throws IloException
Sets the minimal start value of interval
variable a in the invoking solution to
min. If the invoking solution does not contain the
interval variable, this function will automatically add it.
IloExceptionvoid setStartMax(IloIntervalVar a, int max) throws IloException
Sets the maximal start value of interval
variable a in the invoking solution to
max. If the invoking solution does not contain the
interval variable, this function will automatically add it.
IloExceptionvoid setEnd(IloIntervalVar a, int v) throws IloException
Sets the end value (both minimum and
maximum) of interval variable a to v in
the invoking solution. If the invoking solution does not contain
the interval variable, this function will automatically add
it.
IloExceptionvoid setEndMin(IloIntervalVar a, int min) throws IloException
Sets the minimal end value of interval
variable a in the invoking solution to
min. If the invoking solution does not contain the
interval variable, this function will automatically add it.
IloExceptionvoid setEndMax(IloIntervalVar a, int max) throws IloException
Sets the maximal end value of interval
variable a in the invoking solution to
max. If the invoking solution does not contain the
interval variable, this function will automatically add it.
IloExceptionvoid setLength(IloIntervalVar a, int v) throws IloException
Sets the length value (both minimum and
maximum) of interval variable a to v in
the invoking solution. If the invoking solution does not contain
the interval variable, this function will automatically add
it.
IloExceptionvoid setLengthMin(IloIntervalVar a, int min) throws IloException
Sets the minimal length value of interval
variable a in the invoking solution to
min. If the invoking solution does not contain the
interval variable, this function will automatically add it.
IloExceptionvoid setLengthMax(IloIntervalVar a, int max) throws IloException
Sets the maximal length value of interval
variable a in the invoking solution to
max. If the invoking solution does not contain the
interval variable, this function will automatically add it.
IloExceptionvoid setSize(IloIntervalVar a, int v) throws IloException
Sets the size value (both minimum and
maximum) of interval variable a to v in
the invoking solution. If the invoking solution does not contain
the interval variable, this function will automatically add
it.
IloExceptionvoid setSizeMin(IloIntervalVar a, int min) throws IloException
Sets the minimal size value of interval
variable a in the invoking solution to
min. If the invoking solution does not contain the
interval variable, this function will automatically add it.
IloExceptionvoid setSizeMax(IloIntervalVar a, int max) throws IloException
Sets the maximal size value of interval
variable a in the invoking solution to
max. If the invoking solution does not contain the
interval variable, this function will automatically add it.
IloExceptionvoid end()
throws IloException
IloException