Class LearnSignedClauses<E extends ExplanationForSignedClause>

  • All Implemented Interfaces:

    public class LearnSignedClauses<E extends ExplanationForSignedClause>
    extends Object
    implements Learn
    A learn implementation that is able to learn signed clause on failure. The implication graph is recorded during propagation and then aanlysed, with the constraint in conflict as input to learn a signed clause to add to the model.

    The algorithm is based on :

         "A Proof-Producing CSP Solver", M.Vesler and O.Strichman, AAI'10.

    Project: choco-solver.

    Charles Prud'homme
    • Constructor Detail

      • LearnSignedClauses

        public LearnSignedClauses​(Solver solver)
        Build a learned able to learn signed clauses on conflicts and solutions.
        solver - the solver to exploit
    • Method Detail

      • setExplanation

        public void setExplanation​(E explanation)
      • getExplanation

        public E getExplanation()
      • record

        public boolean record​(Solver solver)
        Description copied from interface: Learn
        Validate and record a new piece of knowledge, that is, the current position is a dead-end.
        Specified by:
        record in interface Learn
        true if something is learned (one or more clauses)
      • forget

        public void forget​(Solver solver)
        Description copied from interface: Learn
        Forget some pieces of knowledge.
        Specified by:
        forget in interface Learn
      • onSolution

        protected void onSolution()