This page is for an old version of Hexaly Optimizer. We recommend that you update your version and read the documentation for the latest stable release.

LSInconsistency Class

class localsolver.LSInconsistency

Value type for the Inconsistency core of the optimization model. Also known as Irreductible Inconsistent Subproblem. Such a value is obtained with LSSolver.compute_inconsistency.

Summary

Methods
get_nb_causes Gets the number of expressions responsible for the inconsistency of this model.
get_cause Gets the cause with the given index in this model.
Special methods
__str__ Returns a string representation of this inconsistency core.

Instance methods

LSInconsistency.get_nb_causes()

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. :return: Number of expressions. :rtype: int

LSInconsistency.get_cause(pos)

Gets the cause with the given index in this model. :param pos: A non negative integer strictly smaller than getNbCauses(). :type val: int :return: The requested expression. :rtype: LSExpression

Special operators and methods

LSInconsistency.__str__()

Returns a string representation of this inconsistency core.

Returns:String representation of this inconsistency core.
Return type:str