[−][src]Struct ddo::core::implementation::solver::sequential::SequentialSolver
This is the structure implementing an single-threaded MDD solver.
Example Usage
let problem = MockProblem; let relaxation = MockRelax; let mdd = mdd_builder_ref(&problem, relaxation).build(); // the solver is created using an mdd. let mut solver = SequentialSolver::new(mdd); // val is the optimal value of the objective function, // sol is the sequence of decision yielding that optimal value (if sol exists, `sol != None`) let (val, sol) = solver.maximize();
Methods
impl<T, DD> SequentialSolver<T, DD> where
T: Hash + Eq + Clone,
DD: MDD<T>,
[src]
T: Hash + Eq + Clone,
DD: MDD<T>,
pub fn new(mdd: DD) -> Self
[src]
This creates a solver that will find the best solution in the problem
described by the given mdd
(mdd is not expanded yet). This solver will
return the optimal solution from what would be an exact expansion of mdd
.
pub fn with_verbosity(mdd: DD, verbosity: u8) -> Self
[src]
This creates a solver that will find the best solution in the problem
described by the given mdd
(mdd is not expanded yet) and configure that
solver to be more or less verbose.
Return value
This solver will return the optimal solution from what would be an exact
expansion of mdd
.
Verbosity
So far, there are three levels of verbosity:
- 0 which prints nothing
- 1 which only prints the final statistics when the problem is solved
- 2 which prints progress information every 100 explored nodes.
pub fn customized(mdd: DD, verbosity: u8) -> Self
[src]
This constructor lets you specify all the configurable elements of this
solver as parameters. So far, the functionality of this constructor is
exactly the same as that of with_verbosity
. The latter is considered
clearer, and thus you are encouraged to use that one.
This constructor creates a solver that will find the best solution in the
problem described by the given mdd
(mdd is not expanded yet) and
configure that solver to be more or less verbose.
Return value
This solver will return the optimal solution from what would be an exact
expansion of mdd
.
Verbosity
So far, there are three levels of verbosity:
- 0 which prints nothing
- 1 which only prints the final statistics when the problem is solved
- 2 which prints progress information every 100 explored nodes.
Trait Implementations
Auto Trait Implementations
impl<T, DD> RefUnwindSafe for SequentialSolver<T, DD> where
DD: RefUnwindSafe,
T: RefUnwindSafe,
DD: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, DD> Send for SequentialSolver<T, DD> where
DD: Send,
T: Send,
DD: Send,
T: Send,
impl<T, DD> Sync for SequentialSolver<T, DD> where
DD: Sync,
T: Sync,
DD: Sync,
T: Sync,
impl<T, DD> Unpin for SequentialSolver<T, DD> where
DD: Unpin,
T: Unpin,
DD: Unpin,
T: Unpin,
impl<T, DD> UnwindSafe for SequentialSolver<T, DD> where
DD: UnwindSafe,
T: UnwindSafe,
DD: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,