Struct SharedState

Source
pub struct SharedState<ColumnType, BranchFilter, C, DualStore>
where DualStore: UserDualStore, BranchFilter: Clone + IBranchFilter, C: Compare<Branch<BranchFilter, DualStore>> + Clone,
{ pub best: RwLock<(f64, Vec<(f64, ColumnId)>)>, pub open_branches: BlockingQueue<BranchFilter, C, DualStore>, pub column_pool: RwLock<ColumnPool<ColumnType, BranchFilter>>, pub last_integer_at_cp_size: AtomicUsize, pub ui_sender: UISender, pub start_time: Instant, pub duration_root_node: Mutex<Option<Duration>>, pub obj_root_node: Mutex<Option<f64>>, pub duration_lds_root_node: Mutex<Option<Duration>>, pub time_limit: Option<Instant>, pub phase: RwLock<Phase>, }
Expand description

Struct storing information about branch and price progress That is shared among all workers.

Contains open branches, bound and progress information

Fields§

§best: RwLock<(f64, Vec<(f64, ColumnId)>)>§open_branches: BlockingQueue<BranchFilter, C, DualStore>§column_pool: RwLock<ColumnPool<ColumnType, BranchFilter>>§last_integer_at_cp_size: AtomicUsize§ui_sender: UISender§start_time: Instant§duration_root_node: Mutex<Option<Duration>>§obj_root_node: Mutex<Option<f64>>§duration_lds_root_node: Mutex<Option<Duration>>§time_limit: Option<Instant>§phase: RwLock<Phase>

Implementations§

Source§

impl<ColumnType, BranchFilter: Clone + IBranchFilter, C: Compare<Branch<BranchFilter, DualStore>> + Clone, DualStore: UserDualStore> SharedState<ColumnType, BranchFilter, C, DualStore>

Source

pub fn new( column_pool: ColumnPool<ColumnType, BranchFilter>, ui: &UI, timelimit: Option<Instant>, open_branches: BlockingQueue<BranchFilter, C, DualStore>, ) -> Self

Auto Trait Implementations§

§

impl<ColumnType, BranchFilter, C, DualStore> !Freeze for SharedState<ColumnType, BranchFilter, C, DualStore>

§

impl<ColumnType, BranchFilter, C, DualStore> RefUnwindSafe for SharedState<ColumnType, BranchFilter, C, DualStore>
where C: RefUnwindSafe,

§

impl<ColumnType, BranchFilter, C, DualStore> Send for SharedState<ColumnType, BranchFilter, C, DualStore>
where C: Send, BranchFilter: Send, ColumnType: Send, DualStore: Send,

§

impl<ColumnType, BranchFilter, C, DualStore> Sync for SharedState<ColumnType, BranchFilter, C, DualStore>
where C: Sync + Send, BranchFilter: Send + Sync, ColumnType: Send + Sync, DualStore: Send,

§

impl<ColumnType, BranchFilter, C, DualStore> Unpin for SharedState<ColumnType, BranchFilter, C, DualStore>
where C: Unpin, BranchFilter: Unpin, ColumnType: Unpin, DualStore: Unpin,

§

impl<ColumnType, BranchFilter, C, DualStore> UnwindSafe for SharedState<ColumnType, BranchFilter, C, DualStore>
where C: 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> 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, 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