|
Drools Planner distribution 6.0.0.Alpha9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<EnvironmentMode>
org.drools.planner.config.EnvironmentMode
public enum EnvironmentMode
A solver has a single Random instance. Some solver configurations use the Random instance a lot more than others. For example simulated annealing depends highly on random numbers, while tabu search only depends on it to deal with score ties. The environment mode influences the seed of that Random instance.
The environment mode also allows you to detect common bugs in your implementation.
Enum Constant Summary | |
---|---|
FAST_ASSERT
This mode turns on most assertions (such as DefaultDecider.assertUndoMoveIsUncorrupted )
to fail-fast on a bug in a Move implementation, in a score rule or something else. |
|
FULL_ASSERT
This mode does a few more assertions (such as DefaultDecider.assertMoveScoreIsUncorrupted )
than the FAST_ASSERT mode at a horrible performance cost. |
|
PRODUCTION
The production mode is the fastest and the most robust, but not reproducible. |
|
REPRODUCIBLE
The reproducible mode is the default mode because it is recommended during development. |
Method Summary | |
---|---|
static EnvironmentMode |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static EnvironmentMode[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final EnvironmentMode FULL_ASSERT
DefaultDecider.assertMoveScoreIsUncorrupted
)
than the FAST_ASSERT
mode at a horrible performance cost.
This mode is reproducible (see REPRODUCIBLE
mode).
This mode is horribly slow.
public static final EnvironmentMode FAST_ASSERT
DefaultDecider.assertUndoMoveIsUncorrupted
)
to fail-fast on a bug in a Move
implementation, in a score rule or something else.
This mode is reproducible (see REPRODUCIBLE
mode).
This mode is slow.
public static final EnvironmentMode REPRODUCIBLE
The reproducible mode is not much slower than the production mode.
In practice, this mode uses the default random seed, and it also disables certain concurrency optimizations (such as work stealing). TODO: JBRULES-681 Multi-threaded support which implement those concurrency optimizations
public static final EnvironmentMode PRODUCTION
Method Detail |
---|
public static EnvironmentMode[] values()
for (EnvironmentMode c : EnvironmentMode.values()) System.out.println(c);
public static EnvironmentMode valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
Drools Planner distribution 6.0.0.Alpha9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |