Module logicng

Class LinearSU


  • public class LinearSU
    extends MaxSAT
    Linear search solver with Boolean Multilevel Optimization (BMO)
    Since:
    1.0
    Version:
    2.1.0
    • Constructor Detail

      • LinearSU

        public LinearSU()
        Constructs a new solver with default values.
      • LinearSU

        public LinearSU​(MaxSATConfig config)
        Constructs a new solver with a given configuration.
        Parameters:
        config - the configuration
    • Method Detail

      • search

        public MaxSAT.MaxSATResult search()
        Description copied from class: MaxSAT
        The main MaxSAT solving method.
        Specified by:
        search in class MaxSAT
        Returns:
        the result of the solving process
      • rebuildSolver

        protected MiniSatStyleSolver rebuildSolver​(int minWeight)
        Rebuilds a SAT solver with the current MaxSAT formula.
        Parameters:
        minWeight - the minimal weight
        Returns:
        the rebuilt solver
      • rebuildBMO

        protected MiniSatStyleSolver rebuildBMO​(LNGVector<LNGIntVector> functions,
                                                LNGIntVector rhs,
                                                int currentWeight)
        Rebuilds a SAT solver with the current MaxSAT formula
        Parameters:
        functions - the functions
        rhs - the right-hand side
        currentWeight - the current weight
        Returns:
        the rebuilt solver
      • initRelaxation

        protected void initRelaxation()
        Initializes the relaxation variables by adding a fresh variable to the 'relaxationVars' of each soft clause.