Package com.artelys.kalis
Class KBranchingScheme
- java.lang.Object
- 
- com.artelys.kalis.KBranchingScheme
 
- 
- Direct Known Subclasses:
- KAssignAndForbid,- KAssignVar,- KBranchingSchemeGroupSerializer,- KFloatVarBranchingScheme,- KIntervalDomain,- KIntVarBranchingScheme,- KParallelBranchingScheme,- KProbe,- KProbeDisjunction,- KSettleDisjunction,- KSplitDomain,- KSplitNumDomain,- KTaskSerializer
 
 public class KBranchingScheme extends java.lang.ObjectAbstract class defining branching schemes.
 Search is made thanks to a tree search algorithm. At each node, propagation
 is made and if no solution exists, Artelys Kalis needs to split your problem
 in smaller subproblems covering (or not) all the initial problem. This
 partition is made following a branching scheme.
 
 Different types of branching schemes exist. For example, a classical way is
 to choose a variable which has not been instantiated so far and to build a
 sub-problem for each remaining value in the variable's domains, this
 sub-problem being the original problem where the variable has been
 instantiated to this value. And then, you can continue the search with these
 new nodes.
 
 Choosing the right branching schemes to be used with your particular problem
 could greatly improve the performance of the tree search. Artelys Kalis
 allows you to choose between many classical branching schemes provided with
 the library and to easily program yourself the more specialized branching
 schemes that you suppose to be useful for your own problems.
 - Since:
- 2016.1
- See Also:
- KSplitDomain KSettleDisjunction KProbe
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanswigCMemOwn
 - 
Constructor SummaryConstructors Modifier Constructor Description KBranchingScheme()ConstructorprotectedKBranchingScheme(long cPtr, boolean cMemoryOwn)KBranchingScheme(KBranchingScheme toCopy)KBranchingScheme(KProblem problem)Constructor with a given problemKBranchingScheme(com.artelys.kalis.SWIGTYPE_p_KBranchingScheme_I branchingScheme)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean_finishedBranching(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)Return true IFF branching is completed on one specific branch of the
 branch and bound.
 void_freeAllocatedObjectsForBranching(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation)This method is called upon finishing branching for the current node and
 allows freeing objects created at the current node.
 com.artelys.kalis.SWIGTYPE_p_void_getNextBranch(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)Return the next branch to explore
 void_goDownBranch(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)This method is called once a branch has been selected and a decision must
 be taken.
 void_goUpBranch(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)This method is called upon backtrack on a specific branch
 com.artelys.kalis.SWIGTYPE_p_void_selectNextBranchingObject()Select the next object (variable in general) to branch on when one branch
 has been explored.voiddelete()protected voidfinalize()KBranchingSchemegetCopyPtr()protected static longgetCPtr(KBranchingScheme obj)com.artelys.kalis.SWIGTYPE_p_std__stringgetGoDownDescription(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)Return a string representation of the branching decisionKBranchingSchemegetInstanceCopyPtr(KProblem problem)java.lang.StringgetName()Return the name of the branching schemeKProblemgetProblem()Return the current problemvoidprintName()Pretty printing of the branching schemevoidsetSolver_I_ptr(com.artelys.kalis.SWIGTYPE_p_KSolver_I solver_I)protected voidswigDirectorDisconnect()voidswigReleaseOwnership()voidswigTakeOwnership()
 
- 
- 
- 
Constructor Detail- 
KBranchingSchemeprotected KBranchingScheme(long cPtr, boolean cMemoryOwn)
 - 
KBranchingSchemepublic KBranchingScheme() Constructor
 - 
KBranchingSchemepublic KBranchingScheme(KProblem problem) Constructor with a given problem
 - 
KBranchingSchemepublic KBranchingScheme(com.artelys.kalis.SWIGTYPE_p_KBranchingScheme_I branchingScheme) 
 - 
KBranchingSchemepublic KBranchingScheme(KBranchingScheme toCopy) 
 
- 
 - 
Method Detail- 
getCPtrprotected static long getCPtr(KBranchingScheme obj) 
 - 
finalizeprotected void finalize() - Overrides:
- finalizein class- java.lang.Object
 
 - 
deletepublic void delete() 
 - 
swigDirectorDisconnectprotected void swigDirectorDisconnect() 
 - 
swigReleaseOwnershippublic void swigReleaseOwnership() 
 - 
swigTakeOwnershippublic void swigTakeOwnership() 
 - 
getProblempublic KProblem getProblem() Return the current problem
 - 
_selectNextBranchingObjectpublic com.artelys.kalis.SWIGTYPE_p_void _selectNextBranchingObject() Select the next object (variable in general) to branch on when one branch
 has been explored.
 - 
_finishedBranchingpublic boolean _finishedBranching(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)Return true IFF branching is completed on one specific branch of the
 branch and bound.
 - Parameters:
- branchingObject- the branching object
- branchingInformation- the branching information
- currentBranchNumber- the current branch number
 
 - 
_getNextBranchpublic com.artelys.kalis.SWIGTYPE_p_void _getNextBranch(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)Return the next branch to explore
 - Parameters:
- branchingObject- the branching object
- branchingInformation- the branching information
- currentBranchNumber- the current branch number
 
 - 
_goDownBranchpublic void _goDownBranch(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)This method is called once a branch has been selected and a decision must
 be taken.
 - Parameters:
- branchingObject- the branching object
- branchingInformation- the branching information
- currentBranchNumber- the current branch number
 
 - 
_goUpBranchpublic void _goUpBranch(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)This method is called upon backtrack on a specific branch
 - Parameters:
- branchingObject- the branching object
- branchingInformation- the branching information
- currentBranchNumber- the current branch number
 
 - 
_freeAllocatedObjectsForBranchingpublic void _freeAllocatedObjectsForBranching(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation)This method is called upon finishing branching for the current node and
 allows freeing objects created at the current node.
 - Parameters:
- branchingObject- the branching object
- branchingInformation- the branching information
 
 - 
printNamepublic void printName() Pretty printing of the branching scheme
 - 
getNamepublic java.lang.String getName() Return the name of the branching scheme
 - 
getGoDownDescriptionpublic com.artelys.kalis.SWIGTYPE_p_std__string getGoDownDescription(com.artelys.kalis.SWIGTYPE_p_void branchingObject, com.artelys.kalis.SWIGTYPE_p_void branchingInformation, int currentBranchNumber)Return a string representation of the branching decision
 - 
getCopyPtrpublic KBranchingScheme getCopyPtr() 
 - 
getInstanceCopyPtrpublic KBranchingScheme getInstanceCopyPtr(KProblem problem) 
 - 
setSolver_I_ptrpublic void setSolver_I_ptr(com.artelys.kalis.SWIGTYPE_p_KSolver_I solver_I) 
 
- 
 
-