Class HeuristicRestartModule

    • Field Detail

      • shouldRestart

        public boolean shouldRestart
      • conflictCount

        private long conflictCount
      • threshold

        private long threshold
      • THRESHOLD_INCREASE_RATE

        private double THRESHOLD_INCREASE_RATE
    • Constructor Detail

      • HeuristicRestartModule

        public HeuristicRestartModule()
    • Method Detail

      • onConflict

        public void onConflict​(MapClause clause,
                               int level)
        Description copied from interface: ConflictListener
        called when a conflict occurs
        Specified by:
        onConflict in interface ConflictListener
        Parameters:
        clause - the conflict (unsatisfiable) clause
        level - the level at which the conflict occurred
      • onBackjump

        public void onBackjump​(int oldLevel,
                               int newLevel)
        Description copied from interface: BackjumpListener
        Called when the solver backtracks. It will also be called when the solver restarts.

        components that want to be warned about backjumps should put themselves in Core.backjumpModules.

        Specified by:
        onBackjump in interface BackjumpListener
        Parameters:
        oldLevel - the level at which the solver was before backtracking
        newLevel - the level to which the solver backtracks
      • onRestart

        public void onRestart​(int oldLevel)
        Description copied from interface: BackjumpListener
        called when the solver restarts.

        components that want to be warned about restarts should put themselves in Core.restartModules.

        Specified by:
        onRestart in interface BackjumpListener
        Parameters:
        oldLevel - the level at which the solver was before restarting
      • initialize

        public void initialize​(Core core)
        Description copied from interface: SolverComponent
        initializes the component with the given solver. May be called only once. This method must register the component to the solver for the run.
        Specified by:
        initialize in interface SolverComponent
        Parameters:
        core - core component to initialize