|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractModel
choco.AbstractProblem
choco.palm.JumpProblem
choco.palm.BendersProblem
public class BendersProblem
Choco problem extension involving explanations and a Benders decomposition algorithm based on the use of explanations. The decomposition is made among the variables and the choco model need only to be enrich by indicating for each variable the problem to which it belongs. Warning : subproblems must be independent once the master is instantiated. If it is not the case, it has to be precised with the use of setApproximatedStructure().
Field Summary | |
---|---|
protected boolean |
approximatedStructure
Boolean indicating whether the subproblems are completely independant once master variables instantiated. |
protected java.util.ArrayList |
masterVariables
List of the Master variables. |
protected int |
nbSubProblems
The number of sub problems considered at each iteration |
protected java.util.ArrayList |
subvariables
for each subproblems, a table of variables corresponding to the subproblem n°i is stored in subvariables.get(i) |
Fields inherited from class choco.palm.JumpProblem |
---|
contradictionExplanation, displayRelease, erasedCst, indexOfLastInitializedStaticConstraint, logger, maxRelaxLevel |
Fields inherited from class choco.AbstractProblem |
---|
environment, feasible, precision, propagationEngine, reduction, solved, solver |
Fields inherited from class choco.AbstractModel |
---|
constraints, doMaximize, FALSE, floatVars, intVars, nbConstraint, objective, setVars, TRUE |
Constructor Summary | |
---|---|
BendersProblem()
build a problem that will use the decomposition algorithm |
Method Summary | |
---|---|
void |
addMasterVariables(IntDomainVar v)
Add a variable to the master set. |
void |
addSubVariables(int i,
IntDomainVar v)
Add a variable to a given sub-problem. |
IntDomainVar[] |
getMasterVariables()
|
java.util.ArrayList |
getMasterVariablesList()
|
int |
getNbCutsLearned()
|
int |
getNbSubProblems()
|
IntDomainVar[] |
getSubvariables(int i)
|
java.util.ArrayList |
getSubvariablesList(int i)
|
boolean |
isApproximatedStructure()
|
Explanation |
makeExplanation()
factory to build explanation within the Benders Framework |
Explanation |
makeExplanation(int level)
factory to build an explanation at a given level within the Benders Framework |
void |
maximize(IntDomainVar obj)
minimize an objective function only including variables of the master. |
void |
maximize(IntDomainVar mobj,
IntDomainVar[] objs,
MasterSlavesRelation relation)
maximize an objective function over both the master and sub-problems. |
void |
minimize(IntDomainVar obj)
minimize an objective function only including variables of the master. |
void |
minimize(IntDomainVar mobj,
IntDomainVar[] objs,
MasterSlavesRelation relation)
minimize an objective function over both the master and sub-problems. |
protected java.lang.Boolean |
optimize(boolean maximize,
IntDomainVar mobj,
IntDomainVar[] objs,
MasterSlavesRelation relation)
|
protected java.lang.Boolean |
optimize(boolean maximize,
IntDomainVar obj,
MasterSlavesRelation relation)
|
void |
setApproximatedStructure()
precise that the structures used as subproblems is not ideal but has week relationships WARNING : it can only be used in case of satisfaction problem. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int nbSubProblems
protected java.util.ArrayList masterVariables
protected java.util.ArrayList subvariables
protected boolean approximatedStructure
Constructor Detail |
---|
public BendersProblem()
Method Detail |
---|
public void addMasterVariables(IntDomainVar v)
v
- the variable to be added to the masterpublic void addSubVariables(int i, IntDomainVar v)
i
- the number of considered sub-problemv
- the variable to be addedpublic Explanation makeExplanation()
makeExplanation
in interface ExplainedProblem
makeExplanation
in class JumpProblem
public Explanation makeExplanation(int level)
makeExplanation
in class JumpProblem
public boolean isApproximatedStructure()
public void setApproximatedStructure()
public int getNbSubProblems()
public int getNbCutsLearned()
public IntDomainVar[] getMasterVariables()
public java.util.ArrayList getMasterVariablesList()
public java.util.ArrayList getSubvariablesList(int i)
public IntDomainVar[] getSubvariables(int i)
public void minimize(IntDomainVar mobj, IntDomainVar[] objs, MasterSlavesRelation relation)
mobj
- objective variable of the masterobjs
- objectives variables of each subproblemrelation
- a relation representing the objective functionpublic void minimize(IntDomainVar obj)
obj
- objective variable of the masterpublic void maximize(IntDomainVar mobj, IntDomainVar[] objs, MasterSlavesRelation relation)
mobj
- objective variable of the masterobjs
- objectives variables of each subproblemrelation
- a relation representing the objective functionpublic void maximize(IntDomainVar obj)
obj
- objective variable of the masterprotected java.lang.Boolean optimize(boolean maximize, IntDomainVar obj, MasterSlavesRelation relation)
protected java.lang.Boolean optimize(boolean maximize, IntDomainVar mobj, IntDomainVar[] objs, MasterSlavesRelation relation)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |