Class QuickConflictExplainer

  • All Implemented Interfaces:
    ConflictExplainer

    public class QuickConflictExplainer
    extends Object
    implements ConflictExplainer
    Algorithm to find a minimal conflict for an over-constrained CSP

    This implementation is based on the following paper. Junker, Ulrich. (2004). DefaultConflictExplainer: Preferred explanations and relaxations for over-constrained problems. AAAI. 167 - 172.

    • Constructor Detail

      • QuickConflictExplainer

        public QuickConflictExplainer()
    • Method Detail

      • getMinimalConflict

        public Optional<InternalExplanation> getMinimalConflict​(ChocoModel model,
                                                                int[] background,
                                                                int[] relaxable)
        Finds a preferred explanation for an over-constrained CSP
        Specified by:
        getMinimalConflict in interface ConflictExplainer
        Parameters:
        model - CSP which included backgrounds and constraints
        background - consistent set of constraints that cannot be relaxed
        relaxable - inconsistent constraints that can be relaxed
        Returns:
        null if there is no conflict an empty array if a preferred explanation could not be obtained background if background is inconsistent otherwise, a subset of relaxable constraints