Package org.optaplanner.core.api.solver
Enum SolverStatus
- java.lang.Object
-
- java.lang.Enum<SolverStatus>
-
- org.optaplanner.core.api.solver.SolverStatus
-
- All Implemented Interfaces:
Serializable
,Comparable<SolverStatus>
public enum SolverStatus extends Enum<SolverStatus>
The status ofproblem
submitted to theSolverManager
. Retrieve this status withSolverManager.getSolverStatus(Object)
orSolverJob.getSolverStatus()
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NOT_SOLVING
The problem's solving has terminated or the problem was never submitted to theSolverManager
.SOLVING_ACTIVE
A solver thread started solving the problem, but hasn't finished yet.SOLVING_SCHEDULED
No solver thread started solving this problem yet, but sooner or later a solver thread will solve it.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SolverStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static SolverStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SOLVING_SCHEDULED
public static final SolverStatus SOLVING_SCHEDULED
No solver thread started solving this problem yet, but sooner or later a solver thread will solve it.For example, submitting 7 problems to a
SolverManager
with aSolverManagerConfig.getParallelSolverCount()
of 4, puts 3 into this state for non-trivial amount of time.Transitions into
SOLVING_ACTIVE
(orNOT_SOLVING
if it isterminated early
, before it starts).
-
SOLVING_ACTIVE
public static final SolverStatus SOLVING_ACTIVE
A solver thread started solving the problem, but hasn't finished yet.If CPU resource are scarce and that solver thread is waiting for CPU time, the state doesn't change, it's still considered solving active.
Transitions into
NOT_SOLVING
when terminated.
-
NOT_SOLVING
public static final SolverStatus NOT_SOLVING
The problem's solving has terminated or the problem was never submitted to theSolverManager
.SolverManager.getSolverStatus(Object)
cannot tell the difference, butSolverJob.getSolverStatus()
can.
-
-
Method Detail
-
values
public static SolverStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SolverStatus c : SolverStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SolverStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-