RsBundle  Diff

Differences From Artifact [c319ab1ba5]:

  • File src/solver/sync.rs — part of check-in [62c311d2a4] at 2019-07-30 07:40:07 on branch restructure — Move `parallel` to `solver::sync` (user: fifr size: 29782)

To Artifact [7e11f5b598]:

  • File src/solver/sync.rs — part of check-in [d5eed55bb2] at 2019-07-30 08:01:24 on branch restructure — Rearrange master problem module (user: fifr size: 29806) [more...]

33
34
35
36
37
38
39
40

41
42
43

44
45
46
47
48
49
50
33
34
35
36
37
38
39

40
41
42

43
44
45
46
47
48
49
50







-
+


-
+







use crate::terminator::{StandardTerminatable, StandardTerminator, Terminator};
use crate::weighter::{HKWeightable, HKWeighter, Weighter};

/// The default iteration limit.
pub const DEFAULT_ITERATION_LIMIT: usize = 10_000;

/// The default solver.
pub type DefaultSolver<P> = Solver<P, StandardTerminator, HKWeighter, crate::FullMasterBuilder>;
pub type DefaultSolver<P> = Solver<P, StandardTerminator, HKWeighter, crate::master::FullMasterBuilder>;

/// The minimal bundle solver.
pub type NoBundleSolver<P> = Solver<P, StandardTerminator, HKWeighter, crate::MinimalMasterBuilder>;
pub type NoBundleSolver<P> = Solver<P, StandardTerminator, HKWeighter, crate::master::MinimalMasterBuilder>;

/// Error raised by the parallel bundle [`Solver`].
#[derive(Debug)]
pub enum Error<E> {
    /// An error raised when creating a new master problem solver.
    BuildMaster(Box<dyn std::error::Error>),
    /// An error raised by the master problem process.
326
327
328
329
330
331
332
333

334
335
336
337
338
339
340
326
327
328
329
330
331
332

333
334
335
336
337
338
339
340







-
+







            .get_aggregated_primal(i)
            .map_err(|_| "get_aggregated_primal".to_string())
            .expect("Cannot get aggregated primal from master process")
    }
}

/// Implementation of a parallel bundle method.
pub struct Solver<P, T = StandardTerminator, W = HKWeighter, M = crate::FullMasterBuilder>
pub struct Solver<P, T = StandardTerminator, W = HKWeighter, M = crate::master::FullMasterBuilder>
where
    P: FirstOrderProblem,
    M: master::Builder,
{
    /// Parameters for the solver.
    pub params: Parameters,