Package localsolver

Class LSInconsistency


  • public class LSInconsistency
    extends java.lang.Object
    Inconsistency core of the optimization model. Also known as Irreductible Inconsistent Subproblem.
    Since:
    6.0
    See Also:
    LSModel, LSExpression
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      LSExpression getCause​(int causeIndex)
      Gets the cause with the given index in this model.
      int getNbCauses()
      Gets the number of expressions responsible for the inconsistency of this model.
      int hashCode()  
      java.lang.String toString()
      Returns a string representation of this inconsistency core.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getNbCauses

        public int getNbCauses()
        Gets the number of expressions responsible for the inconsistency of this model. The sub problem reduced to these expressions and their operands (recursively) is inconsistent. This method returns 0 if the inconsistency of the problem could not be proven.
        Returns:
        Number of expressions.
      • getCause

        public LSExpression getCause​(int causeIndex)
        Gets the cause with the given index in this model. Only allowed in state LSState.Stopped.
        Parameters:
        causeIndex - A non negative integer strictly smaller than getNbCauses().
        Returns:
        The requested cause (LSExpression).
      • toString

        public java.lang.String toString()
        Returns a string representation of this inconsistency core.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representation.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object