|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.cpsolver.ifs.model.Model<V,T>
net.sf.cpsolver.ifs.constant.ConstantModel<V,T>
public class ConstantModel<V extends Variable<V,T>,T extends Value<V,T>>
Extension of the model with constant variables.
Such variables are excluded from the solver process, however, they can be
included in constraints. Such model can allow us to build a solution on top
of another solution (e.g., committed classes in the course timetabling).
Constant variable has to implement interface ConstantVariable,
returning ConstantVariable.isConstant() true.
| Field Summary |
|---|
| Fields inherited from class net.sf.cpsolver.ifs.model.Model |
|---|
iAssignedVariables, iPerturbVariables, iUnassignedVariables, sDoubleFormat, sPercentageFormat, sTimeFormat |
| Constructor Summary | |
|---|---|
ConstantModel()
|
|
| Method Summary | |
|---|---|
void |
addVariable(V variable)
Adds a variable to the model |
void |
afterAssigned(long iteration,
T value)
Called after a value is assigned to its variable. |
void |
afterUnassigned(long iteration,
T value)
Called after a value is unassigned from its variable. |
void |
beforeAssigned(long iteration,
T value)
Called before a value is assigned to its variable. |
void |
beforeUnassigned(long iteration,
T value)
Called before a value is unassigned from its variable. |
List<V> |
constantVariables()
List of constant variables |
boolean |
hasConstantVariables()
True, if the model contains at least one constant variable. |
boolean |
isConstant(V variable)
True, if the given variable is constant. |
void |
removeVariable(V variable)
Removes a variable from the model |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantModel()
| Method Detail |
|---|
public List<V> constantVariables()
public boolean hasConstantVariables()
public boolean isConstant(V variable)
public void addVariable(V variable)
addVariable in class Model<V extends Variable<V,T>,T extends Value<V,T>>public void removeVariable(V variable)
removeVariable in class Model<V extends Variable<V,T>,T extends Value<V,T>>
public void beforeAssigned(long iteration,
T value)
beforeAssigned in class Model<V extends Variable<V,T>,T extends Value<V,T>>
public void beforeUnassigned(long iteration,
T value)
beforeUnassigned in class Model<V extends Variable<V,T>,T extends Value<V,T>>
public void afterAssigned(long iteration,
T value)
afterAssigned in class Model<V extends Variable<V,T>,T extends Value<V,T>>
public void afterUnassigned(long iteration,
T value)
afterUnassigned in class Model<V extends Variable<V,T>,T extends Value<V,T>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||