Struct Branch

Source
pub struct Branch<BranchFilter, DualStore>
where BranchFilter: IBranchFilter, DualStore: UserDualStore,
{ pub id: u32, pub parent: u32, pub depth: u32, pub old_obj_bound: f64, pub old_obj_heuristic: bool, pub old_obj_dual_center: Option<(f64, DualStore)>, pub filters: Vec<BranchFilter>, pub allow_heuristic_pricing: bool, pub special: Option<SpecialType<BranchFilter>>, }
Expand description

Primary struct for branch in branching tree Holds all information about its state

Fields§

§id: u32§parent: u32§depth: u32§old_obj_bound: f64§old_obj_heuristic: bool§old_obj_dual_center: Option<(f64, DualStore)>§filters: Vec<BranchFilter>§allow_heuristic_pricing: bool§special: Option<SpecialType<BranchFilter>>

Implementations§

Source§

impl<BranchFilter, DualStore> Branch<BranchFilter, DualStore>
where BranchFilter: IBranchFilter, DualStore: UserDualStore,

Source

pub fn default() -> Self

Returns the initial root node, initialized with default values

Source

pub fn create_lds_root() -> Self

Returns a root node for limited discrepancy search

Source

pub fn create_integer(&self, local: bool) -> Self

transforms the current node into a copy that will be solved as integer linear program. Can be used to get better primal bounds

local setting influences whether existing branches should apply or (local=false) all branching constraints are removed

Source

pub fn upgrade_to_non_heuristic_pricing(&self) -> Self

Takes a heuristic pricing branching node and returns a normal branching node

Source

pub fn create_lds_zero_child( &self, parent_obj: f64, filters_of_one_child: &[BranchFilter], parent_partial: bool, parent_dual_center: Option<(f64, DualStore)>, ) -> Self

Given a current lds branching node, create the zero branch that expands the taboo list

Source

pub fn create_lds_one_child( &self, parent_obj: f64, filter: Vec<BranchFilter>, parent_partial: bool, parent_dual_center: Option<(f64, DualStore)>, ) -> Self

Given a current lds branching node, create the branch forcing a column

Source

pub fn create_child( &self, parent_obj: f64, filter: Vec<BranchFilter>, parent_partial: bool, parent_dual_center: Option<(f64, DualStore)>, ) -> Self

Given a branching node, create a child node with additional branching filter applied

Trait Implementations§

Source§

impl<BranchFilter, DualStore> Clone for Branch<BranchFilter, DualStore>
where BranchFilter: IBranchFilter + Clone, DualStore: UserDualStore + Clone,

Source§

fn clone(&self) -> Branch<BranchFilter, DualStore>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<BranchingFilter: IBranchFilter, DualStorage: UserDualStore> Compare<Branch<BranchingFilter, DualStorage>> for BranchComparator<BranchingFilter, DualStorage>

Source§

fn compare( &self, l: &Branch<BranchingFilter, DualStorage>, r: &Branch<BranchingFilter, DualStorage>, ) -> Ordering

Compares two values, returning Less, Equal, or Greater if l is less than, equal to, or greater than r, respectively.
Source§

fn compares_lt(&self, l: &L, r: &R) -> bool

Checks if l is less than r.
Source§

fn compares_le(&self, l: &L, r: &R) -> bool

Checks if l is less than or equal to r.
Source§

fn compares_ge(&self, l: &L, r: &R) -> bool

Checks if l is greater than or equal to r.
Source§

fn compares_gt(&self, l: &L, r: &R) -> bool

Checks if l is greater than r.
Source§

fn compares_eq(&self, l: &L, r: &R) -> bool

Checks if l is equal to r.
Source§

fn compares_ne(&self, l: &L, r: &R) -> bool

Checks if l is not equal to r.
Source§

fn borrowing(self) -> Borrowing<Self, L, R>
where Self: Sized,

Borrows the comparator’s parameters before comparing them. Read more
Source§

fn rev(self) -> Rev<Self>
where Self: Sized,

Reverses the ordering of the comparator. Read more
Source§

fn swap(self) -> Swap<Self>
where Self: Sized,

Swaps the comparator’s parameters, maintaining the underlying ordering. Read more
Source§

fn then<D>(self, then: D) -> Then<Self, D>
where D: Compare<L, R>, Self: Sized,

Lexicographically combines the comparator with another. Read more
Source§

impl<BranchFilter, DualStore> Debug for Branch<BranchFilter, DualStore>
where BranchFilter: IBranchFilter + Debug, DualStore: UserDualStore + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<BranchFilter, DualStore> Freeze for Branch<BranchFilter, DualStore>
where DualStore: Freeze,

§

impl<BranchFilter, DualStore> RefUnwindSafe for Branch<BranchFilter, DualStore>
where DualStore: RefUnwindSafe, BranchFilter: RefUnwindSafe,

§

impl<BranchFilter, DualStore> Send for Branch<BranchFilter, DualStore>
where DualStore: Send, BranchFilter: Send,

§

impl<BranchFilter, DualStore> Sync for Branch<BranchFilter, DualStore>
where DualStore: Sync, BranchFilter: Sync,

§

impl<BranchFilter, DualStore> Unpin for Branch<BranchFilter, DualStore>
where DualStore: Unpin, BranchFilter: Unpin,

§

impl<BranchFilter, DualStore> UnwindSafe for Branch<BranchFilter, DualStore>
where DualStore: UnwindSafe, BranchFilter: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V