|
||||||||||
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 | |
---|---|
DEBUG
The debug 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. |
|
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. |
|
TRACE
The trace mode does a few more assertions (such as DefaultDecider.assertMoveScoreIsUncorrupted )
than the DEBUG mode at a horrible performance cost. |
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 TRACE
DefaultDecider.assertMoveScoreIsUncorrupted
)
than the DEBUG
mode at a horrible performance cost.
The trace mode is reproducible (see REPRODUCIBLE
mode).
The trace mode is horribly slow.
public static final EnvironmentMode DEBUG
DefaultDecider.assertUndoMoveIsUncorrupted
)
to fail-fast on a bug in a Move
implementation, in a score rule or something else.
The debug mode is reproducible (see REPRODUCIBLE
mode).
The debug 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |