Package org.ojalgo.optimisation
Enum Class Optimisation.State
- All Implemented Interfaces:
Serializable
,Comparable<Optimisation.State>
,Constable
,Optimisation
- Enclosing interface:
Optimisation
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.ojalgo.optimisation.Optimisation
Optimisation.Constraint, Optimisation.ConstraintType, Optimisation.Integration<M extends Optimisation.Model,
S extends Optimisation.Solver>, Optimisation.Model, Optimisation.Objective, Optimisation.Options, Optimisation.ProblemStructure, Optimisation.Result, Optimisation.Sense, Optimisation.Solver, Optimisation.State -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionApproximate and/or Intermediate solution - Iteration point Probably infeasible, but still "good"Unique (and optimal) solution - there is no other solution that is equal or betterUnexpected failure or exceptionSolved - a solution that complies with all constraintsNo solution that complies with all constraints exists (found).The problem/model is infeasible, unbounded or otherwise invalid.Optimal solution - there is no betterThere's an infinite number of feasible solutions and no bound on the objective function value.New/changed problemModel entities and solver components (matrices) are valid -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
absValue()
boolean
boolean
boolean
FAILED, INVALID, INFEASIBLE or UNBOUNDEDboolean
boolean
boolean
VALID, APPROXIMATE, FEASIBLE, OPTIMAL or DISTINCTboolean
UNEXPLOREDboolean
isValid()
static Optimisation.State
Returns the enum constant of this class with the specified name.static Optimisation.State[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
APPROXIMATE
Approximate and/or Intermediate solution - Iteration point Probably infeasible, but still "good" -
DISTINCT
Unique (and optimal) solution - there is no other solution that is equal or better -
FAILED
Unexpected failure or exception -
FEASIBLE
Solved - a solution that complies with all constraints -
INFEASIBLE
No solution that complies with all constraints exists (found).In practise this often means "infeasible or unbounded". The key thing is that with this state the returned solution is not (known to be) feasible.
-
INVALID
The problem/model is infeasible, unbounded or otherwise invalid. -
OPTIMAL
Optimal solution - there is no better -
UNBOUNDED
There's an infinite number of feasible solutions and no bound on the objective function value.Note that using this state indicator implies a feasible solution! This is not in line with how many other optimisation tools interpret "unbounded".
If a feasible solution has not been found, the correct state indicator to use is
INFEASIBLE
or possiblyINVALID
, invalid input: '{@link /*missing*/}' #FAILED} orAPPROXIMATE
.If a problem is concluded to be unbounded but a feasible solution has been found, it may still be preferable to us
FEASIBLE
rather thanUNBOUNDED
.There is, unfortunately, no way to convey that a problem is proven to be unbounded without a feasible solution.
-
UNEXPLORED
New/changed problem -
VALID
Model entities and solver components (matrices) are valid
-
-
Field Details
-
myValue
private final int myValue
-
-
Constructor Details
-
State
private State(int aValue)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
isApproximate
public boolean isApproximate() -
isDistinct
public boolean isDistinct() -
isFailure
public boolean isFailure()FAILED, INVALID, INFEASIBLE or UNBOUNDED -
isFeasible
public boolean isFeasible() -
isOptimal
public boolean isOptimal() -
isSuccess
public boolean isSuccess()VALID, APPROXIMATE, FEASIBLE, OPTIMAL or DISTINCT -
isUnexplored
public boolean isUnexplored()UNEXPLORED -
isValid
public boolean isValid() -
absValue
private int absValue()
-