| Constructor and Description |
|---|
DefaultSettings() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkDeclaredConstraints() |
boolean |
checkModel(Solver solver) |
boolean |
cloneVariableArrayInPropagator() |
boolean |
debugPropagation()
Deprecated.
|
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
|
DefaultSettings |
setCheckDeclaredConstraints(boolean checkDeclaredConstraints)
Indicate if the declared constraints are either posted or reified.
|
DefaultSettings |
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.
|
DefaultSettings |
setDebugPropagation(boolean debugPropagation)
When this setting returns
true, a complete trace of the events is output. |
DefaultSettings |
setDefaultPrefix(String defaultPrefix)
Define prefix of internally created variables
|
DefaultSettings |
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.
|
DefaultSettings |
setEnableDecompositionOfBooleanSum(boolean enableDecompositionOfBooleanSum)
Define if boolean sums should be decomposed into an equality constraint + arithmetic constraint
|
DefaultSettings |
setEnableIncrementalityOnBoolSum(IntPredicate enableIncrementalityOnBoolSum)
Define the predicate to choose incremental sum, based on number variables declared
|
DefaultSettings |
setEnableSAT(boolean enableSAT)
Indicate if clauses are managed by a unique SAT solver.
|
DefaultSettings |
setEnableTableSubstitution(boolean enableTableSubstitution)
Define whether some intension constraints are replaced by extension constraints
|
DefaultSettings |
setEnableViews(boolean enableViews)
Set to 'true' to allow the creation of views in the
Model. |
DefaultSettings |
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.
|
DefaultSettings |
setInitSolver(Function<Model,Solver> initSolver)
Define the solver initialization
|
DefaultSettings |
setMaxDomSizeForEnumerated(int maxDomSizeForEnumerated)
Define the minimum number of cardinality threshold to a sum/scalar constraint to be decomposed in intermediate
sub-sums.
|
DefaultSettings |
setMaxTupleSizeForSubstitution(int maxTupleSizeForSubstitution)
Define the maximum domain size threshold to replace intension constraints by extension constraints
Only checked when
Settings.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.
|
DefaultSettings |
setModelChecker(Predicate<Solver> modelChecker)
Define what to do when a solution is found.
|
DefaultSettings |
setSortPropagatorActivationWRTPriority(boolean sortPropagatorActivationWRTPriority)
Set whether propagators are sorted wrt their priority in
org.chocosolver.solver.propagation.PropagationTrigger when
dealing with propagator activation. |
DefaultSettings |
setSwapOnPassivate(boolean swapOnPassivate)
Define if passivation of propagator swap it in variables' list
|
DefaultSettings |
setWarnUser(boolean warnUser)
To be informed of warnings detected during modeling/solving
|
DefaultSettings |
setWelcomeMessage(String welcomeMessage)
Define the welcome message, printed in the console
|
boolean |
sortPropagatorActivationWRTPriority() |
boolean |
swapOnPassivate() |
boolean |
warnUser() |
public String getWelcomeMessage()
getWelcomeMessage in interface Settingspublic DefaultSettings setWelcomeMessage(String welcomeMessage)
SettingssetWelcomeMessage in interface SettingswelcomeMessage - a messagepublic boolean checkModel(Solver solver)
checkModel in interface Settingssolver - the solverpublic DefaultSettings setModelChecker(Predicate<Solver> modelChecker)
Settings
return !ESat.FALSE.equals(solver.isSatisfied());
A hard check of the model can be done like this:
return ESat.TRUE.equals(solver.isSatisfied());
setModelChecker in interface SettingsmodelChecker - a predicate to check the solutionpublic boolean enableViews()
enableViews in interface Settingspublic DefaultSettings setEnableViews(boolean enableViews)
SettingsModel.
Creates new variables with channeling constraints otherwise.setEnableViews in interface SettingsenableViews - true to enable viewspublic int getMaxDomSizeForEnumerated()
getMaxDomSizeForEnumerated in interface Settingspublic DefaultSettings setMaxDomSizeForEnumerated(int maxDomSizeForEnumerated)
SettingssetMaxDomSizeForEnumerated in interface SettingsmaxDomSizeForEnumerated - cardinality thresholdpublic int getMinCardForSumDecomposition()
getMinCardForSumDecomposition in interface Settingspublic Settings setMinCardinalityForSumDecomposition(int defaultMinCardinalityForSumDecomposition)
SettingssetMinCardinalityForSumDecomposition in interface SettingsdefaultMinCardinalityForSumDecomposition - cardinality thresholdpublic boolean enableTableSubstitution()
enableTableSubstitution in interface Settingspublic DefaultSettings setEnableTableSubstitution(boolean enableTableSubstitution)
SettingssetEnableTableSubstitution in interface SettingsenableTableSubstitution - enable table substitutionpublic int getMaxTupleSizeForSubstitution()
getMaxTupleSizeForSubstitution in interface Settingspublic double getMCRDecimalPrecision()
getMCRDecimalPrecision in interface SettingsIIntConstraintFactory.multiCostRegular(IntVar[], IntVar[], ICostAutomaton) algorithmpublic Settings setMCRDecimalPrecision(double precision)
SettingsIIntConstraintFactory.multiCostRegular(IntVar[], IntVar[], ICostAutomaton) algorithmsetMCRDecimalPrecision in interface Settingsprecision - default precision for MCRpublic DefaultSettings setMaxTupleSizeForSubstitution(int maxTupleSizeForSubstitution)
SettingsSettings.enableTableSubstitution() returns truesetMaxTupleSizeForSubstitution in interface SettingsmaxTupleSizeForSubstitution - threshold to substitute intension constraint by table one.public boolean sortPropagatorActivationWRTPriority()
sortPropagatorActivationWRTPriority in interface Settingstrue if propagators are sorted wrt their priority on initial activation.public DefaultSettings setSortPropagatorActivationWRTPriority(boolean sortPropagatorActivationWRTPriority)
Settingsorg.chocosolver.solver.propagation.PropagationTrigger when
dealing with propagator activation.setSortPropagatorActivationWRTPriority in interface SettingssortPropagatorActivationWRTPriority - true to allow sorting static propagators.public AbstractStrategy makeDefaultSearch(Model model)
SettingsmakeDefaultSearch in interface Settingsmodel - a model requiring a default search strategySearch.defaultSearch(Model)public DefaultSettings setDefaultSearch(Function<Model,AbstractStrategy> defaultSearch)
SettingssetDefaultSearch in interface SettingsdefaultSearch - what default search strategy should bepublic ICondition getEnvironmentHistorySimulationCondition()
getEnvironmentHistorySimulationCondition in interface Settingspublic DefaultSettings setEnvironmentHistorySimulationCondition(ICondition environmentHistorySimulationCondition)
SettingsICondition.FALSE if no backtrackable object is created during the search.setEnvironmentHistorySimulationCondition in interface SettingsenvironmentHistorySimulationCondition - the condition to satisfy when rebuilding history of backtrackable objects is needed.public boolean warnUser()
public DefaultSettings setWarnUser(boolean warnUser)
SettingssetWarnUser in interface SettingswarnUser - true to be print warnings on console@Deprecated public boolean debugPropagation()
debugPropagation in interface Settingspublic DefaultSettings setDebugPropagation(boolean debugPropagation)
Settingstrue, 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.setDebugPropagation in interface SettingsdebugPropagation - true to output a complete trace of the propagated events.public boolean enableDecompositionOfBooleanSum()
enableDecompositionOfBooleanSum in interface Settingstrue if boolean sum should be decomposed into an equality constraint and an arithmetic constraint,
falseif a single constraint should be used instead.public DefaultSettings setEnableDecompositionOfBooleanSum(boolean enableDecompositionOfBooleanSum)
SettingssetEnableDecompositionOfBooleanSum in interface SettingsenableDecompositionOfBooleanSum - true to enable decompositionpublic boolean enableIncrementalityOnBoolSum(int nbvars)
enableIncrementalityOnBoolSum in interface Settingsnbvars - number of variables in the constrainttrue if the incrementality is enabled on boolean sum, based on the number of variables involved.public DefaultSettings setEnableIncrementalityOnBoolSum(IntPredicate enableIncrementalityOnBoolSum)
SettingssetEnableIncrementalityOnBoolSum in interface SettingsenableIncrementalityOnBoolSum - predicate to pick declare sumpublic boolean cloneVariableArrayInPropagator()
cloneVariableArrayInPropagator in interface Settingspublic DefaultSettings setCloneVariableArrayInPropagator(boolean cloneVariableArrayInPropagator)
SettingssetCloneVariableArrayInPropagator in interface SettingscloneVariableArrayInPropagator - true to clone variables array on constructorpublic boolean enableACOnTernarySum()
enableACOnTernarySum in interface Settingspublic Settings setEnableACOnTernarySum(boolean enable)
SettingssetEnableACOnTernarySum in interface Settingsenable - true to enable AC by defaultpublic String defaultPrefix()
SettingsIVariableFactory.generateName()defaultPrefix in interface Settingspublic DefaultSettings setDefaultPrefix(String defaultPrefix)
SettingssetDefaultPrefix in interface SettingsdefaultPrefix - prefix of internally created variables' namepublic boolean enableSAT()
enableSAT in interface SettingsISatFactory,
false when clauses are managed with CSP constraints only.public DefaultSettings setEnableSAT(boolean enableSAT)
SettingssetEnableSAT in interface SettingsenableSAT - true to rely on SAT Solver to handle clausespublic boolean swapOnPassivate()
swapOnPassivate in interface Settingspublic DefaultSettings setSwapOnPassivate(boolean swapOnPassivate)
SettingssetSwapOnPassivate in interface SettingsswapOnPassivate - true to enable swappingpublic boolean checkDeclaredConstraints()
checkDeclaredConstraints in interface Settingspublic DefaultSettings setCheckDeclaredConstraints(boolean checkDeclaredConstraints)
SettingssetCheckDeclaredConstraints in interface SettingscheckDeclaredConstraints - true to check constraints before resolutionpublic Solver initSolver(Model model)
SettingsModel.Model(IEnvironment, String, Settings) to create the
solver to associate with a model.initSolver in interface Settingsmodel - a model to initialize with a solverpublic DefaultSettings setInitSolver(Function<Model,Solver> initSolver)
SettingssetInitSolver in interface SettingsinitSolver - function to initialize the solverpublic byte enableHybridizationOfPropagationEngine()
enableHybridizationOfPropagationEngine in interface Settingspublic Settings setHybridizationOfPropagationEngine(byte hybrid)
SettingssetHybridizationOfPropagationEngine in interface Settingshybrid - 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.