Class OpenWboSolver

  • All Implemented Interfaces:
    net.sf.tweety.logics.commons.analysis.BeliefSetConsistencyTester<PlFormula>, net.sf.tweety.logics.commons.analysis.ConsistencyTester<net.sf.tweety.commons.BeliefSet<PlFormula,​?>>, net.sf.tweety.logics.commons.analysis.ConsistencyWitnessProvider<PlBeliefSet,​PlFormula>

    public class OpenWboSolver
    extends MaxSatSolver
    Provides an interface to the open-wbo MaxSAT solver, see https://github.com/sat-group/open-wbo. Tested with open-wbo 2.1
    Author:
    Matthias Thimm
    • Constructor Detail

      • OpenWboSolver

        public OpenWboSolver​(String binaryLocation)
        Creates a new solver based on the open-wbo executable given as a parameter.
        Parameters:
        binaryLocation - the path to the executable.
    • Method Detail

      • getWitness

        public net.sf.tweety.commons.Interpretation<PlBeliefSet,​PlFormula> getWitness​(Collection<PlFormula> hardConstraints,
                                                                                            Map<PlFormula,​Integer> softConstraints)
        Description copied from class: MaxSatSolver
        Returns an interpretation with maximal weight on the soft constraints (or null if the hard constraints are not satisfiable)
        Specified by:
        getWitness in class MaxSatSolver
        Parameters:
        hardConstraints - a set of propositional formulas
        softConstraints - a map mapping clauses to weights (if there is a formula, which is not a clause, i.e. a disjunction of literals), an exception is thrown.
        Returns:
        an interpretation with maximal weight on the soft constraints (or null if the hard constraints are not satisfiable)