RestartOptions

Struct RestartOptions 

Source
pub struct RestartOptions {
    pub sequence_generator_type: SequenceGeneratorType,
    pub base_interval: u64,
    pub min_num_conflicts_before_first_restart: u64,
    pub lbd_coef: f64,
    pub num_assigned_coef: f64,
    pub num_assigned_window: u64,
    pub geometric_coef: Option<f64>,
    pub no_restarts: bool,
}
Expand description

The options which are used by the solver to determine when a restart should occur.

An implementation of a restart strategy based on the specfication of Section 4 of [1] (for more information about the Glucose restart strategies see [2] and [3]). The idea is to restart when the the quality of the learned clauses (indicated by the LBD [4] which is the number of different decision levels present in a learned clause, lower is generally better) is poor. It takes this into account by keeping track of the overall average LBD and the short-term average LBD and comparing these with one another.

The strategy also takes into account that if a solver is “close” to finding a solution that it would be better to not restart at that moment and it can then decide to skip a restart.

It generalises the aforementioned Glucose restart strategy by using adjustable RestartOptions which allows the user to also specify Luby restarts (see [5]) and constant restarts (see Section 3 of [1]).

§Bibliography

[1] A. Biere and A. Fröhlich, ‘Evaluating CDCL restart schemes’, Proceedings of Pragmatics of SAT, pp. 1–17, 2015.

[2] G. Audemard and L. Simon, ‘Refining restarts strategies for SAT and UNSAT’, in Principles and Practice of Constraint Programming: 18th International Conference, CP 2012, Québec City, QC, Canada, October 8-12, 2012. Proceedings, 2012, pp. 118–126.

[3] G. Audemard and L. Simon, ‘Glucose 2.1: Aggressive, but reactive, clause database management, dynamic restarts (system description)’, in Pragmatics of SAT 2012 (POS’12), 2012.

[4] G. Audemard and L. Simon, ‘Predicting learnt clauses quality in modern SAT solvers’, in Twenty-first international joint conference on artificial intelligence, 2009.

[5] M. Luby, A. Sinclair, and D. Zuckerman, ‘Optimal speedup of Las Vegas algorithms’, Information Processing Letters, vol. 47, no. 4, pp. 173–180, 1993.

Fields§

§sequence_generator_type: SequenceGeneratorType

Decides the sequence based on which the restarts are performed. To be used in combination with RestartOptions::base_interval

§base_interval: u64

The base interval length is used as a multiplier to the restart sequence. For example, constant restarts with base interval 100 means a retart is triggered every 100 conflicts.

§min_num_conflicts_before_first_restart: u64

The minimum number of conflicts to be reached before the first restart is considered

§lbd_coef: f64

Used to determine if a restart should be forced. The state is “bad” if the current LBD value is much greater than the global LBD average A greater/lower value for lbd-coef means a less/more frequent restart policy

§num_assigned_coef: f64

Used to determine if a restart should be blocked. To be used in combination with RestartOptions::num_assigned_window. A restart is blocked if the number of assigned propositional variables is must greater than the average number of assigned variables in the recent past A greater/lower value for RestartOptions::num_assigned_coef means fewer/more blocked restarts

§num_assigned_window: u64

Used to determine the length of the recent past that should be considered when deciding on blocking restarts. The solver considers the last RestartOptions::num_assigned_window conflicts as the reference point for the number of assigned variables

§geometric_coef: Option<f64>

The coefficient in the geometric sequence x_i = x_{i-1} * geometric-coef where x_1 = RestartOptions::base_interval. Used only if RestartOptions::sequence_generator_type is assigned to SequenceGeneratorType::Geometric.

§no_restarts: bool

Determines whether restarts should be able to occur

Trait Implementations§

Source§

impl Clone for RestartOptions

Source§

fn clone(&self) -> RestartOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RestartOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for RestartOptions

Source§

fn default() -> RestartOptions

Returns the “default value” for a type. Read more
Source§

impl Copy for RestartOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

Source§

type Proj<U: 'src> = U

Source§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

Source§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

Source§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
Source§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
Source§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
Source§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
Source§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a MaybeRef.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> OrderedSeq<'_, T> for T
where T: Clone,