pub struct RunOptions {
pub seed: Option<u32>,
pub var_order: VarOrder,
pub val_order: ValOrder,
pub randomise_order: bool,
pub preprocess: Propagation,
pub prop_node: Propagation,
pub node_limit: u64,
pub time_limit: Option<TimeLimit>,
}Expand description
Knobs for a single solve. Extend as needed — using a struct keeps the public call surface stable when we add more options.
Fields§
§seed: Option<u32>Seed for Minion’s random heuristics. None keeps Minion’s own
default (currently std::random_device{}(), i.e. non-deterministic).
Pass Some(s) to make a solve reproducible — tests that want to
diff two runs (e.g. “same prefix before the injection point”)
must set the same seed for both runs.
var_order: VarOrderVariable-ordering heuristic. Defaults to VarOrder::Static.
val_order: ValOrderValue-ordering heuristic. Defaults to ValOrder::Ascend.
randomise_order: boolShuffle the variable order and force a random value order, on top
of var_order/val_order. Mirrors -randomiseorder, and is what
exec mode’s -varorder random / -varorder sdf-random (etc.) set.
This is orthogonal to var_order: minion shuffles the search order
once, when the instance is built, and overwrites every value order
with VALORDER_RANDOM. Set seed too if you want it reproducible.
preprocess: PropagationOne-shot propagation level applied before search begins.
Default is None + no limit — no preprocessing beyond each
constraint’s own fullPropagate.
prop_node: PropagationPropagation level applied at every search node.
Default is GAC + no limit — each constraint runs its own
propagator. Stronger levels (SAC, SSAC) add global
propagation on top at every node; weaker levels (None) are
not meaningful here (a solver has to propagate something).
node_limit: u64Abort search after this many nodes have been explored. 0 (default)
means unlimited. Mirrors -nodelimit N.
A truncated run still returns normally; compare the reported Nodes
against the limit to tell “finished” from “gave up”.
time_limit: Option<TimeLimit>Abort search after this many seconds of wall-clock or CPU time.
None (default) means unlimited. is_cpu_time = true mirrors
-cpulimit; false mirrors -timelimit. C++ exec mode rejects
setting both; in this struct we accept whichever is non-None.
Unlike node_limit, a run that hits the time limit comes back as
RuntimeError::Timeout — no context, and so no statistics.
Trait Implementations§
Source§impl Clone for RunOptions
impl Clone for RunOptions
Source§fn clone(&self) -> RunOptions
fn clone(&self) -> RunOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RunOptions
Source§impl Debug for RunOptions
impl Debug for RunOptions
Auto Trait Implementations§
impl Freeze for RunOptions
impl RefUnwindSafe for RunOptions
impl Send for RunOptions
impl Sync for RunOptions
impl Unpin for RunOptions
impl UnsafeUnpin for RunOptions
impl UnwindSafe for RunOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes