Enum Optimisation.State

    • Enum Constant Detail

      • APPROXIMATE

        public static final Optimisation.State APPROXIMATE
        Approximate and/or Intermediate solution - Iteration point Probably infeasible, but still "good"
      • DISTINCT

        public static final Optimisation.State DISTINCT
        Unique (and optimal) solution - there is no other solution that is equal or better
      • FEASIBLE

        public static final Optimisation.State FEASIBLE
        Solved - a solution that complies with all constraints
      • INFEASIBLE

        public static final Optimisation.State 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

        public static final Optimisation.State INVALID
        The problem/model is infeasible, unbounded or otherwise invalid.
      • OPTIMAL

        public static final Optimisation.State OPTIMAL
        Optimal solution - there is no better
      • UNBOUNDED

        public static final Optimisation.State 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 possibly INVALID, #FAILED} or APPROXIMATE.

        If a problem is concluded to be unbounded but a feasible solution has been found, it may still be preferable to us FEASIBLE rather than UNBOUNDED.

        There is, unfortunately, no way to convey that a problem is proven to be unbounded without a feasible solution.

      • VALID

        public static final Optimisation.State VALID
        Model entities and solver components (matrices) are valid
    • Field Detail

      • myValue

        private final int myValue
    • Constructor Detail

      • State

        private State​(int aValue)
    • Method Detail

      • values

        public static Optimisation.State[] 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 (Optimisation.State c : Optimisation.State.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Optimisation.State valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - 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()