Module logicng

Class GlucoseConfig.Builder

  • Enclosing class:
    GlucoseConfig

    public static class GlucoseConfig.Builder
    extends Object
    The builder for a Glucose configuration.
    • Method Detail

      • lbLBDMinimizingClause

        public GlucoseConfig.Builder lbLBDMinimizingClause​(int lbLBDMinimizingClause)
        Sets the minimal LBD required to minimize a clause to a given value. The default value is 6.
        Parameters:
        lbLBDMinimizingClause - the value (should be at least 3)
        Returns:
        the builder
      • lbLBDFrozenClause

        public GlucoseConfig.Builder lbLBDFrozenClause​(int lbLBDFrozenClause)
        Sets the value to protect clauses if their LBD decrease and is lower than it (for one turn). The default value is 30.
        Parameters:
        lbLBDFrozenClause - the value
        Returns:
        the builder
      • lbSizeMinimizingClause

        public GlucoseConfig.Builder lbSizeMinimizingClause​(int lbSizeMinimizingClause)
        Sets the minimal size required to minimize a clause to a given value. The default value is 30.
        Parameters:
        lbSizeMinimizingClause - the value (should be at least 3)
        Returns:
        the builder
      • firstReduceDB

        public GlucoseConfig.Builder firstReduceDB​(int firstReduceDB)
        Sets the number of conflicts before the first DB reduction to a given value. The default value is 2000.
        Parameters:
        firstReduceDB - the value
        Returns:
        the builder
      • specialIncReduceDB

        public GlucoseConfig.Builder specialIncReduceDB​(int specialIncReduceDB)
        Sets the special increment for the DB reduction to a given value. The default value is 1000.
        Parameters:
        specialIncReduceDB - the value
        Returns:
        the builder
      • incReduceDB

        public GlucoseConfig.Builder incReduceDB​(int incReduceDB)
        Sets the increment for the DB reduction to a given value. The default value is 300.
        Parameters:
        incReduceDB - the value
        Returns:
        the builder
      • factorK

        public GlucoseConfig.Builder factorK​(double factorK)
        Sets the constant used to force restart to a given value. The default value is 0.8.
        Parameters:
        factorK - the value (should be in the range 0..1)
        Returns:
        the builder
      • factorR

        public GlucoseConfig.Builder factorR​(double factorR)
        Sets the constant used to block restart to a given value. The default value is 1.4.
        Parameters:
        factorR - the value (should be in the range 1..5)
        Returns:
        the builder
      • sizeLBDQueue

        public GlucoseConfig.Builder sizeLBDQueue​(int sizeLBDQueue)
        Sets the size of moving average for LBD (restarts) to a given value. The default value is 50.
        Parameters:
        sizeLBDQueue - the value (should be at least 10)
        Returns:
        the builder
      • sizeTrailQueue

        public GlucoseConfig.Builder sizeTrailQueue​(int sizeTrailQueue)
        Sets the size of moving average for trail (block restarts) to a given value. The default value is 5000.
        Parameters:
        sizeTrailQueue - the value (should be at least 10)
        Returns:
        the builder
      • reduceOnSize

        public GlucoseConfig.Builder reduceOnSize​(boolean reduceOnSize)
        Turns on the size reduction during LBD computation like described in the XMinisat paper. The default value is false.
        Parameters:
        reduceOnSize - true if the size reduction is turned on, false otherwise
        Returns:
        the builder
      • reduceOnSizeSize

        public GlucoseConfig.Builder reduceOnSizeSize​(int reduceOnSizeSize)
        Sets the constant used during size reduction like described in the XMinisat paper to a given value. The default value is 12.
        Parameters:
        reduceOnSizeSize - the value
        Returns:
        the builder
      • maxVarDecay

        public GlucoseConfig.Builder maxVarDecay​(double maxVarDecay)
        Sets the maximal variable activity decay factor to a given value. The default value is 0.95.
        Parameters:
        maxVarDecay - the value (should be in the range 0..1)
        Returns:
        the builder
      • build

        public GlucoseConfig build()
        Builds the Glucose configuration.
        Returns:
        the configuration