RsBundle  Diff

Differences From Artifact [15ce9dfd36]:

  • File src/solver.rs — part of check-in [166a377203] at 2019-07-25 13:46:16 on branch trunk — firstorderproblem: pass the subproblem index to `extend_subgradient` (user: fifr size: 37355)

To Artifact [81a7f70f2c]:

  • File src/solver.rs — part of check-in [147bcf602c] at 2019-12-21 21:02:56 on branch release — Add `dyn` to trait object types (user: fifr size: 37371)

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
            }
            IterationLimit { limit } => write!(fmt, "The iteration limit of {} has been reached.", limit),
        }
    }
}

impl<E: Error> Error for SolverError<E> {
    fn cause(&self) -> Option<&Error> {
        match self {
            SolverError::Evaluation(err) => Some(err),
            SolverError::Update(err) => Some(err),
            SolverError::Master(err) => Some(err),
            _ => None,
        }
    }







|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
            }
            IterationLimit { limit } => write!(fmt, "The iteration limit of {} has been reached.", limit),
        }
    }
}

impl<E: Error> Error for SolverError<E> {
    fn cause(&self) -> Option<&dyn Error> {
        match self {
            SolverError::Evaluation(err) => Some(err),
            SolverError::Update(err) => Some(err),
            SolverError::Master(err) => Some(err),
            _ => None,
        }
    }
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
    /// The first order problem description.
    problem: P,

    /// The solver parameter.
    pub params: SolverParams,

    /// Termination predicate.
    pub terminator: Box<Terminator>,

    /// Weighter heuristic.
    pub weighter: Box<Weighter>,

    /// Lower and upper bounds of all variables.
    bounds: Vec<(Real, Real)>,

    /// Current center of stability.
    cur_y: DVector,








|


|







387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
    /// The first order problem description.
    problem: P,

    /// The solver parameter.
    pub params: SolverParams,

    /// Termination predicate.
    pub terminator: Box<dyn Terminator>,

    /// Weighter heuristic.
    pub weighter: Box<dyn Weighter>,

    /// Lower and upper bounds of all variables.
    bounds: Vec<(Real, Real)>,

    /// Current center of stability.
    cur_y: DVector,

459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
     * Time when the solution process started.
     *
     * This is actually the time of the last call to `Solver::init`.
     */
    start_time: Instant,

    /// The master problem.
    master: Box<MasterProblem<MinorantIndex = usize>>,

    /// The active minorant indices for each subproblem.
    minorants: Vec<Vec<MinorantInfo>>,

    /// The primals associated with each global minorant index.
    primals: Vec<Option<P::Primal>>,








|







459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
     * Time when the solution process started.
     *
     * This is actually the time of the last call to `Solver::init`.
     */
    start_time: Instant,

    /// The master problem.
    master: Box<dyn MasterProblem<MinorantIndex = usize>>,

    /// The active minorant indices for each subproblem.
    minorants: Vec<Vec<MinorantInfo>>,

    /// The primals associated with each global minorant index.
    primals: Vec<Option<P::Primal>>,