pub struct Subproblem {
pub model: Option<Model>,
pub state: Box<dyn State>,
pub variables: Variables,
pub constraints: Constraints,
}Expand description
A subproblem that contains a solver model and is associated to a single node in the computing graph
Fields§
§model: Option<Model>§state: Box<dyn State>§variables: Variables§constraints: ConstraintsImplementations§
Source§impl Subproblem
impl Subproblem
pub fn new( system: &System, state_choice: &str, load_stochastic_process: &Box<dyn StochasticProcess>, inflow_stochastic_process: &Box<dyn StochasticProcess>, ) -> Self
pub fn update_with_current_trajectory( &mut self, realizations: Vec<&Realization>, )
pub fn update_with_current_realization(&mut self, realization: &Realization)
pub fn compute_new_cut( &self, forward_trajectory: &[&Realization], branching_realizations: &Vec<Realization>, risk_measure: &Box<dyn RiskMeasure>, ) -> CutStatePair
pub fn add_cut_and_evaluate_cut_selection( &mut self, cut_state_pair: CutStatePair, future_cost_function: Arc<Mutex<FutureCostFunction>>, )
pub fn realize_uncertainties( &mut self, noises: &SampledBranchingNoises, load_stochastic_process: &Box<dyn StochasticProcess>, inflow_stochastic_process: &Box<dyn StochasticProcess>, realization_container: &mut Realization, ) -> Result<(), String>
Trait Implementations§
Source§impl Clone for Subproblem
impl Clone for Subproblem
Source§fn clone(&self) -> Subproblem
fn clone(&self) -> Subproblem
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 Subproblem
impl !RefUnwindSafe for Subproblem
impl Send for Subproblem
impl Sync for Subproblem
impl Unpin for Subproblem
impl !UnwindSafe for Subproblem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more