public interface Settings
Model
.
Created by cprudhom on 25/11/14. Project: choco.
Modifier and Type | Method and Description |
---|---|
boolean |
checkDeclaredConstraints() |
boolean |
checkModel(Solver solver) |
boolean |
cloneVariableArrayInPropagator() |
boolean |
debugPropagation()
Deprecated.
will be removed in next release
|
String |
defaultPrefix()
Define the prefix of internally created variables (through a call to
IVariableFactory.generateName() |
boolean |
enableACOnTernarySum() |
boolean |
enableDecompositionOfBooleanSum() |
byte |
enableHybridizationOfPropagationEngine() |
boolean |
enableIncrementalityOnBoolSum(int nbvars) |
boolean |
enableSAT() |
boolean |
enableTableSubstitution() |
boolean |
enableViews() |
ICondition |
getEnvironmentHistorySimulationCondition() |
int |
getMaxDomSizeForEnumerated() |
int |
getMaxTupleSizeForSubstitution() |
double |
getMCRDecimalPrecision() |
int |
getMinCardForSumDecomposition() |
String |
getWelcomeMessage() |
Solver |
initSolver(Model model)
This method is called in
Model.Model(IEnvironment, String, Settings) to create the
solver to associate with a model. |
AbstractStrategy |
makeDefaultSearch(Model model)
Creates a default search strategy for the input model
|
Settings |
setCheckDeclaredConstraints(boolean checkDeclaredConstraints)
Indicate if the declared constraints are either posted or reified.
|
Settings |
setCloneVariableArrayInPropagator(boolean cloneVariableArrayInPropagator)
If this setting is set to true (default value), a clone of the input variable array is made in any propagator constructors.
|
Settings |
setDebugPropagation(boolean debugPropagation)
When this setting returns
true , a complete trace of the events is output. |
Settings |
setDefaultPrefix(String defaultPrefix)
Define prefix of internally created variables
|
Settings |
setDefaultSearch(Function<Model,AbstractStrategy> defaultSearch)
Define a default search strategy for the input model
|
Settings |
setEnableACOnTernarySum(boolean enable)
If this is set to true then AC algorithm is used to filter ternary sum by default,
otherwise, BC is used.
|
Settings |
setEnableDecompositionOfBooleanSum(boolean enableDecompositionOfBooleanSum)
Define if boolean sums should be decomposed into an equality constraint + arithmetic constraint
|
Settings |
setEnableIncrementalityOnBoolSum(IntPredicate enableIncrementalityOnBoolSum)
Define the predicate to choose incremental sum, based on number variables declared
|
Settings |
setEnableSAT(boolean enableSAT)
Indicate if clauses are managed by a unique SAT solver.
|
Settings |
setEnableTableSubstitution(boolean enableTableSubstitution)
Define whether some intension constraints are replaced by extension constraints
|
Settings |
setEnableViews(boolean enableViews)
Set to 'true' to allow the creation of views in the
Model . |
Settings |
setEnvironmentHistorySimulationCondition(ICondition environmentHistorySimulationCondition)
Set the condition to satisfy when rebuilding history of backtrackable objects is needed.
|
Settings |
setHybridizationOfPropagationEngine(byte hybrid)
Define behavior of the propagation engine.
|
Settings |
setInitSolver(Function<Model,Solver> initSolver)
Define the solver initialization
|
Settings |
setMaxDomSizeForEnumerated(int maxDomSizeForEnumerated)
Define the minimum number of cardinality threshold to a sum/scalar constraint to be decomposed in intermediate
sub-sums.
|
Settings |
setMaxTupleSizeForSubstitution(int maxTupleSizeForSubstitution)
Define the maximum domain size threshold to replace intension constraints by extension constraints
Only checked when
enableTableSubstitution() returns true |
Settings |
setMCRDecimalPrecision(double precision)
Defines the default smallest used double for
IIntConstraintFactory.multiCostRegular(IntVar[], IntVar[], ICostAutomaton) algorithm |
Settings |
setMinCardinalityForSumDecomposition(int defaultMinCardinalityForSumDecomposition)
Define the default minimum number of cardinality threshold to a sum/scalar constraint to be
decomposed into intermediate sub-sums.
|
Settings |
setModelChecker(Predicate<Solver> modelChecker)
Define what to do when a solution is found.
|
Settings |
setSortPropagatorActivationWRTPriority(boolean sortPropagatorActivationWRTPriority)
Set whether propagators are sorted wrt their priority in
org.chocosolver.solver.propagation.PropagationTrigger when
dealing with propagator activation. |
Settings |
setSwapOnPassivate(boolean swapOnPassivate)
Define if passivation of propagator swap it in variables' list
|
Settings |
setWarnUser(boolean warnUser)
To be informed of warnings detected during modeling/solving
|
Settings |
setWelcomeMessage(String welcomeMessage)
Define the welcome message, printed in the console
|
boolean |
sortPropagatorActivationWRTPriority() |
boolean |
swapOnPassivate() |
boolean |
warnUser() |
String getWelcomeMessage()
Settings setWelcomeMessage(String welcomeMessage)
welcomeMessage
- a messageboolean checkModel(Solver solver)
solver
- the solverSettings setModelChecker(Predicate<Solver> modelChecker)
return !ESat.FALSE.equals(solver.isSatisfied());
A hard check of the model can be done like this:
return ESat.TRUE.equals(solver.isSatisfied());
modelChecker
- a predicate to check the solutionboolean enableViews()
Settings setEnableViews(boolean enableViews)
Model
.
Creates new variables with channeling constraints otherwise.enableViews
- true
to enable viewsint getMaxDomSizeForEnumerated()
Settings setMaxDomSizeForEnumerated(int maxDomSizeForEnumerated)
maxDomSizeForEnumerated
- cardinality thresholdint getMinCardForSumDecomposition()
Settings setMinCardinalityForSumDecomposition(int defaultMinCardinalityForSumDecomposition)
defaultMinCardinalityForSumDecomposition
- cardinality thresholdboolean enableTableSubstitution()
Settings setEnableTableSubstitution(boolean enableTableSubstitution)
enableTableSubstitution
- enable table substitutionint getMaxTupleSizeForSubstitution()
double getMCRDecimalPrecision()
IIntConstraintFactory.multiCostRegular(IntVar[], IntVar[], ICostAutomaton)
algorithmSettings setMCRDecimalPrecision(double precision)
IIntConstraintFactory.multiCostRegular(IntVar[], IntVar[], ICostAutomaton)
algorithmprecision
- default precision for MCRSettings setMaxTupleSizeForSubstitution(int maxTupleSizeForSubstitution)
enableTableSubstitution()
returns true
maxTupleSizeForSubstitution
- threshold to substitute intension constraint by table one.boolean sortPropagatorActivationWRTPriority()
true
if propagators are sorted wrt their priority on initial activation.Settings setSortPropagatorActivationWRTPriority(boolean sortPropagatorActivationWRTPriority)
org.chocosolver.solver.propagation.PropagationTrigger
when
dealing with propagator activation.sortPropagatorActivationWRTPriority
- true
to allow sorting static propagators.AbstractStrategy makeDefaultSearch(Model model)
model
- a model requiring a default search strategySearch.defaultSearch(Model)
Settings setDefaultSearch(Function<Model,AbstractStrategy> defaultSearch)
defaultSearch
- what default search strategy should beICondition getEnvironmentHistorySimulationCondition()
Settings setEnvironmentHistorySimulationCondition(ICondition environmentHistorySimulationCondition)
ICondition.FALSE
if no backtrackable object is created during the search.environmentHistorySimulationCondition
- the condition to satisfy when rebuilding history of backtrackable objects is needed.boolean warnUser()
Settings setWarnUser(boolean warnUser)
warnUser
- true
to be print warnings on console@Deprecated boolean debugPropagation()
Settings setDebugPropagation(boolean debugPropagation)
true
, a complete trace of the events is output.
This can be quite big, though, and it slows down the overall process.
Note that this parameter is read once at propagation engine creation and set in a final variable.debugPropagation
- true
to output a complete trace of the propagated events.boolean enableDecompositionOfBooleanSum()
true
if boolean sum should be decomposed into an equality constraint and an arithmetic constraint,
false
if a single constraint should be used instead.Settings setEnableDecompositionOfBooleanSum(boolean enableDecompositionOfBooleanSum)
enableDecompositionOfBooleanSum
- true
to enable decompositionboolean enableIncrementalityOnBoolSum(int nbvars)
nbvars
- number of variables in the constrainttrue
if the incrementality is enabled on boolean sum, based on the number of variables involved.Settings setEnableIncrementalityOnBoolSum(IntPredicate enableIncrementalityOnBoolSum)
enableIncrementalityOnBoolSum
- predicate to pick declare sumboolean cloneVariableArrayInPropagator()
Settings setCloneVariableArrayInPropagator(boolean cloneVariableArrayInPropagator)
cloneVariableArrayInPropagator
- true
to clone variables array on constructorboolean enableACOnTernarySum()
Settings setEnableACOnTernarySum(boolean enable)
enable
- true
to enable AC by defaultString defaultPrefix()
IVariableFactory.generateName()
Settings setDefaultPrefix(String defaultPrefix)
defaultPrefix
- prefix of internally created variables' nameboolean enableSAT()
ISatFactory
,
false when clauses are managed with CSP constraints only.Settings setEnableSAT(boolean enableSAT)
enableSAT
- true
to rely on SAT Solver to handle clausesboolean swapOnPassivate()
Settings setSwapOnPassivate(boolean swapOnPassivate)
swapOnPassivate
- true
to enable swappingboolean checkDeclaredConstraints()
Settings setCheckDeclaredConstraints(boolean checkDeclaredConstraints)
checkDeclaredConstraints
- true
to check constraints before resolutionSolver initSolver(Model model)
Model.Model(IEnvironment, String, Settings)
to create the
solver to associate with a model.model
- a model to initialize with a solverSettings setInitSolver(Function<Model,Solver> initSolver)
initSolver
- function to initialize the solverbyte enableHybridizationOfPropagationEngine()
Settings setHybridizationOfPropagationEngine(byte hybrid)
hybrid
- When set to '0b00', this works as a constraint-oriented propagation engine;
when set to '0b01', this workds as an hybridization between variable and constraint oriented
propagation engine.
when set to '0b10', this workds as a variable- oriented propagation engine.Copyright © 2018. All rights reserved.