|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
choco.kernel.solver.Configuration
public class Configuration
User : cprudhom
Mail : cprudhom(a)emn.fr
Date : 21 avr. 2010br/>
Since : Choco 2.1.1
Nested Class Summary | |
---|---|
static interface |
Configuration.Default
Annotation to define a default value for a field. |
Field Summary | |
---|---|
static String |
BOTTOM_UP
Goal: Apply a bottom-up search algorithm (optimization). |
static String |
CARD_REASONNING
Goal: Enable card reasonning: decide if redundant constraints are automatically added to the model to reason on cardinalities on sets as well as kernel and enveloppe. |
static String |
CEQ_ORDER
Goal: constraint priority order for propagation engine Type: int Default value: 1234567 * Restriction: |CEQ_ORDER| = 7, CEQ_ORDER = {1,2,3,4,5,6,7} |
static String |
HORIZON_UPPER_BOUND
Goal: Type: int Default value: 21474836 ( choco.Choco.MAX_UPPER_BOUND ) |
static String |
INIT_DESTRUCTIVE_LOWER_BOUND
Goal: Compute a destructive lower bound before starting the search (optimization). |
static String |
INIT_DLB_SHAVING
Goal: Apply shaving while computing the destructive lower bound. |
static String |
INIT_SHAVE_ONLY_DECISIONS
Goal: perform shaving only on decision vars. |
static String |
INIT_SHAVING
Goal: Enforce the use of shaving before starting the search. |
static String |
NOGOOD_RECORDING_FROM_RESTART
Goal: Enable nogood recording from restart. |
static String |
RANDOM_SEED
Goal: Initial seed to generate streams of pseudorandom numbers Type: int Default value: 0 |
static String |
RATION_HOLE
Goal: The ratio of holes within domains to which decision are performed to switch from BC to AC Type: double Default value: 0.7f |
static String |
REAL_PRECISION
Goal: Precision of the search for problem involving real variables Type: double Default value: 1.0e-6 |
static String |
REAL_REDUCTION
Goal: Minimal width reduction between two propagations, for problem involving real variables Type: double Default value: 0.99 |
static String |
RECOMPUTATION_GAP
Goal: Tells the strategy wether or not use recomputation. |
static String |
RESOLUTION_POLICY
Goal: Resolution policy: satisfaction or optimization (minimization or maximization). |
static String |
RESTART_AFTER_SOLUTION
Goal: do restart from root node after each solution. |
static String |
RESTART_BASE
Goal: initial number of fails limiting the first search. |
static String |
RESTART_GEOM_GROW
Goal: geometrical factor for restart strategy Type: double Default value: 1.2 |
static String |
RESTART_GEOMETRICAL
Goal: To enable geometrical restart. |
static String |
RESTART_LIMIT
Goal: Restart limit type. |
static String |
RESTART_LIMIT_BOUND
Goal: Restart limit bound. |
static String |
RESTART_LUBY
Goal: To enable luby restart. |
static String |
RESTART_LUBY_GROW
Goal: geometrical factor for restart strategy Type: int Default value: 2 |
static String |
RESTART_POLICY_LIMIT
Goal: Restart Policy limit type. |
static String |
RESTORE_BEST_SOLUTION
Goal: Type: boolean Default value: true |
static String |
SEARCH_LIMIT
Goal: Search limit type. |
static String |
SEARCH_LIMIT_BOUND
Goal: Search limit bound. |
static String |
SOLUTION_POOL_CAPACITY
Goal: Solution pool capacity, number of solutions to store within the solutions' pool. |
static String |
STOP_AT_FIRST_SOLUTION
Goal: Search for all solutions of a problem. |
protected static String |
VALUE_FALSE
|
protected static String |
VALUE_OFF
|
protected static String |
VALUE_TRUE
|
static String |
VEQ_ORDER
Goal: variable priority order for propagation engine Type: int Default value: 1234567 Restriction: |VEQ_ORDER| = 7, VEQ_ORDER = {1,2,3,4,5,6,7} |
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
Configuration()
Creates an empty property list with loaded default values. |
|
Configuration(Properties defaults)
Creates an empty property list with the specified defaults. |
Method Summary | ||
---|---|---|
String |
loadDefault(String key)
Load the default value of keys defined in @Default annotation |
|
void |
putBoolean(String key,
boolean value)
Maps the specified key to the specified
value in this hashtable. |
|
void |
putDouble(String key,
double value)
Maps the specified key to the specified
value in this hashtable. |
|
void |
putEnum(String key,
Enum value)
Maps the specified key to the specified
value in this hashtable. |
|
void |
putFalse(String key)
|
|
void |
putFile(String key,
File value)
Maps the specified key to the specified
value in this hashtable. |
|
void |
putInt(String key,
int value)
Maps the specified key to the specified
value in this hashtable. |
|
void |
putLong(String key,
long value)
Maps the specified key to the specified
value in this hashtable. |
|
void |
putTrue(String key)
|
|
boolean |
readBoolean(String key)
Returns the value to which the specified key is mapped. |
|
boolean |
readBoolean(String key,
boolean defaultValue)
Returns the value to which the specified key is mapped, if exists. |
|
double |
readDouble(String key)
Returns the value to which the specified key is mapped. |
|
double |
readDouble(String key,
double defaultValue)
Returns the value to which the specified key is mapped, if exists. |
|
|
readEnum(String key,
Class clazz)
Returns the value to which the specified key is mapped. |
|
|
readEnum(String key,
T defaultValue)
Returns the value to which the specified key is mapped, if exists. |
|
File |
readFile(String key)
Returns the value to which the specified key is mapped. |
|
File |
readFile(String key,
File defaultValue)
Returns the value to which the specified key is mapped, if exists. |
|
int |
readInt(String key)
Returns the value to which the specified key is mapped. |
|
int |
readInt(String key,
int defaultValue)
Returns the value to which the specified key is mapped, if exists. |
|
long |
readLong(String key)
Returns the value to which the specified key is mapped. |
|
long |
readLong(String key,
long defaultValue)
Returns the value to which the specified key is mapped, if exists. |
|
String |
readString(String key)
Returns the value to which the specified key is mapped. |
|
String |
readString(String key,
String defaultValue)
Returns the value to which the specified key is mapped, if exists. |
|
void |
setDefault()
Set default configuration. |
|
void |
storeDefault(File file,
String comments)
|
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String VALUE_TRUE
protected static final String VALUE_FALSE
protected static final String VALUE_OFF
public static final String STOP_AT_FIRST_SOLUTION
public static final String RESOLUTION_POLICY
public static final String RESTART_AFTER_SOLUTION
public static final String RESTART_LUBY
public static final String RESTART_GEOMETRICAL
public static final String RESTART_BASE
public static final String RESTART_LUBY_GROW
public static final String RESTART_GEOM_GROW
public static final String RESTART_POLICY_LIMIT
public static final String NOGOOD_RECORDING_FROM_RESTART
public static final String RECOMPUTATION_GAP
public static final String CARD_REASONNING
public static final String RANDOM_SEED
public static final String SEARCH_LIMIT
public static final String SEARCH_LIMIT_BOUND
Integer.MAX_VALUE
)
public static final String RESTART_LIMIT
public static final String RESTART_LIMIT_BOUND
Integer.MAX_VALUE
)
public static final String INIT_SHAVING
public static final String INIT_DESTRUCTIVE_LOWER_BOUND
public static final String INIT_DLB_SHAVING
public static final String INIT_SHAVE_ONLY_DECISIONS
public static final String BOTTOM_UP
public static final String HORIZON_UPPER_BOUND
choco.Choco.MAX_UPPER_BOUND
)
public static final String SOLUTION_POOL_CAPACITY
public static final String RESTORE_BEST_SOLUTION
public static final String REAL_PRECISION
public static final String REAL_REDUCTION
public static final String RATION_HOLE
public static final String VEQ_ORDER
public static final String CEQ_ORDER
Constructor Detail |
---|
public Configuration()
public Configuration(Properties defaults)
defaults
- the defaults.Method Detail |
---|
public void setDefault()
public String loadDefault(String key)
IllegalAccessException
- if the specified object is not an
instance of the class or interface declaring the underlyingpublic boolean readBoolean(String key)
key
- the key whose associated value is to be returned
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as a boolean.public boolean readBoolean(String key, boolean defaultValue)
key
- the key whose associated value is to be returneddefaultValue
- value to return the key does not exist in the configuration
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as an integer.public int readInt(String key)
key
- the key whose associated value is to be returned
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as an integer.public int readInt(String key, int defaultValue)
key
- the key whose associated value is to be returneddefaultValue
- value to return the key does not exist in the configuration
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as an integer.public File readFile(String key)
key
- the key whose associated value is to be returned
NullPointerException
- if the specified key is nullpublic File readFile(String key, File defaultValue)
key
- the key whose associated value is to be returneddefaultValue
- value to return the key does not exist in the configuration
NullPointerException
- if the specified key is nullpublic long readLong(String key)
key
- the key whose associated value is to be returned
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as a long.public long readLong(String key, long defaultValue)
key
- the key whose associated value is to be returneddefaultValue
- value to return the key does not exist in the configuration
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as a long.public double readDouble(String key)
key
- the key whose associated value is to be returned
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as a double.public double readDouble(String key, double defaultValue)
key
- the key whose associated value is to be returneddefaultValue
- value to return the key does not exist in the configuration
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as an integer.public String readString(String key)
key
- the key whose associated value is to be returned
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as an integer.public String readString(String key, String defaultValue)
key
- the key whose associated value is to be returneddefaultValue
- value to return the key does not exist in the configuration
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as an integer.public <T extends Enum<T>> T readEnum(String key, Class clazz)
key
- the key whose associated value is to be returnedclazz
- the class of the enum expected
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as a boolean.public <T extends Enum<T>> T readEnum(String key, T defaultValue)
key
- the key whose associated value is to be returnedclazz
- the class of the enum expecteddefaultValue
- value to return the key does not exist in the configuration
NullPointerException
- if the specified key is null
NumberFormatException
- if the value cannot be parsed
as a boolean.public void putInt(String key, int value)
key
to the specified
value
in this hashtable. Neither the key nor the
value can be null
. *
key
- the hashtable keyvalue
- the value
NullPointerException
- if the key or value is
null
public void putLong(String key, long value)
key
to the specified
value
in this hashtable. Neither the key nor the
value can be null
. *
key
- the hashtable keyvalue
- the value
NullPointerException
- if the key or value is
null
public void putDouble(String key, double value)
key
to the specified
value
in this hashtable. Neither the key nor the
value can be null
. *
key
- the hashtable keyvalue
- the value
NullPointerException
- if the key or value is
null
public void putTrue(String key)
public void putFalse(String key)
public void putBoolean(String key, boolean value)
key
to the specified
value
in this hashtable. Neither the key nor the
value can be null
. *
key
- the hashtable keyvalue
- the value
NullPointerException
- if the key or value is
null
public void putEnum(String key, Enum value)
key
to the specified
value
in this hashtable. Neither the key nor the
value can be null
. *
key
- the hashtable keyvalue
- the value
NullPointerException
- if the key or value is
null
public void putFile(String key, File value)
key
to the specified
value
in this hashtable. Neither the key nor the
value can be null
. *
key
- the hashtable keyvalue
- the value
NullPointerException
- if the key or value is
null
public void storeDefault(File file, String comments) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |