Package org.jacop.jasat.core
Class Config
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- org.jacop.jasat.core.Config
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.Object,java.lang.Object>
public class Config extends java.util.Properties
The configuration for a solver. It contains all numeric values or enumerations needed to set the solver behavior; those parameters can be changed before the Config object is given to the solver.- Version:
- 4.8
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
bump_rate
the default bump rate.java.util.List<AbstractClausesDatabase>
clausesDatabases
the list of databases the solver must addboolean
debug
switch for debug modejava.util.List<SolverComponent>
mainComponents
the list of components the solver must addint
MAX_NUMBER_OF_DATABASES
how many clausesDatabases can we have ? must be a power of 2int
MEMORY_POOL_MAX_SIZE
the maximum size of int[] to store in the memory poolint
MEMORY_POOL_STOCK_SIZE
number of int[] of each size in the memory poolint
rebase_threshold
threshold above which a rebase is performed for activity counterslong
RESTART_CONFLICT_THRESHOLD
initial threshold (number of conflicts needed) for restartsdouble
RESTART_THRESHOLD_INCREASE_RATE
factor by which restart threshold is increasedlong
seed
random seed, to be changed if we want to redo the same runlong
timeout
the default timeout, in seconds, for searches.int
trail_size
initial number of variables in the trailint
verbosity
controls default solver verbosity
-
Constructor Summary
Constructors Constructor Description Config()
constructor for config, that adds some default components.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
check()
check some properties of the configstatic Config
defaultConfig()
static access to the default configjava.lang.String
toString()
-
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, values
-
-
-
-
Field Detail
-
MAX_NUMBER_OF_DATABASES
public int MAX_NUMBER_OF_DATABASES
how many clausesDatabases can we have ? must be a power of 2
-
MEMORY_POOL_STOCK_SIZE
public int MEMORY_POOL_STOCK_SIZE
number of int[] of each size in the memory pool
-
MEMORY_POOL_MAX_SIZE
public int MEMORY_POOL_MAX_SIZE
the maximum size of int[] to store in the memory pool
-
rebase_threshold
public int rebase_threshold
threshold above which a rebase is performed for activity counters
-
bump_rate
public int bump_rate
the default bump rate. It is added to activity at each bump()
-
trail_size
public int trail_size
initial number of variables in the trail
-
verbosity
public int verbosity
controls default solver verbosity
-
timeout
public long timeout
the default timeout, in seconds, for searches.
-
debug
public boolean debug
switch for debug mode
-
seed
public long seed
random seed, to be changed if we want to redo the same run
-
RESTART_THRESHOLD_INCREASE_RATE
public double RESTART_THRESHOLD_INCREASE_RATE
factor by which restart threshold is increased
-
RESTART_CONFLICT_THRESHOLD
public long RESTART_CONFLICT_THRESHOLD
initial threshold (number of conflicts needed) for restarts
-
mainComponents
public java.util.List<SolverComponent> mainComponents
the list of components the solver must add
-
clausesDatabases
public java.util.List<AbstractClausesDatabase> clausesDatabases
the list of databases the solver must add
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.util.Properties
-
check
public boolean check()
check some properties of the config- Returns:
- true if the config passes check, false if there is a problem
-
defaultConfig
public static Config defaultConfig()
static access to the default config- Returns:
- default config
-
-