pub struct BendersDecomposition {
pub c_first: Vec<f64>,
pub a_first: Vec<Vec<f64>>,
pub b_first: Vec<f64>,
pub scenarios: Vec<ScenarioData>,
pub max_iter: u32,
pub tolerance: f64,
}Fields§
§c_first: Vec<f64>§a_first: Vec<Vec<f64>>§b_first: Vec<f64>§scenarios: Vec<ScenarioData>§max_iter: u32§tolerance: f64Implementations§
Source§impl BendersDecomposition
impl BendersDecomposition
pub fn new( c_first: Vec<f64>, a_first: Vec<Vec<f64>>, b_first: Vec<f64>, scenarios: Vec<ScenarioData>, ) -> Self
Sourcepub fn solve_master(&self, cuts: &[(Vec<f64>, f64)]) -> LpResult
pub fn solve_master(&self, cuts: &[(Vec<f64>, f64)]) -> LpResult
Solve the master problem (first stage only, ignoring second stage).
Sourcepub fn second_stage_cost(&self, x: &[f64]) -> f64
pub fn second_stage_cost(&self, x: &[f64]) -> f64
Evaluate expected second-stage cost given first-stage solution x.
Trait Implementations§
Source§impl Clone for BendersDecomposition
impl Clone for BendersDecomposition
Source§fn clone(&self) -> BendersDecomposition
fn clone(&self) -> BendersDecomposition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BendersDecomposition
impl RefUnwindSafe for BendersDecomposition
impl Send for BendersDecomposition
impl Sync for BendersDecomposition
impl Unpin for BendersDecomposition
impl UnsafeUnpin for BendersDecomposition
impl UnwindSafe for BendersDecomposition
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
Mutably borrows from an owned value. Read more