pub struct DualSimplexSolver { /* private fields */ }Expand description
Dual simplex solver for linear programming.
Implementations§
Source§impl DualSimplexSolver
impl DualSimplexSolver
Sourcepub fn solve(&mut self) -> DualSimplexResult
pub fn solve(&mut self) -> DualSimplexResult
Solve using dual simplex method.
Sourcepub fn get_solution(&self) -> FxHashMap<VarId, BigRational>
pub fn get_solution(&self) -> FxHashMap<VarId, BigRational>
Get current solution.
Sourcepub fn get_objective_value(&self) -> BigRational
pub fn get_objective_value(&self) -> BigRational
Get objective value.
Sourcepub fn stats(&self) -> &DualSimplexStats
pub fn stats(&self) -> &DualSimplexStats
Get statistics.
Sourcepub fn num_vars(&self) -> usize
pub fn num_vars(&self) -> usize
Return the number of decision variables (columns, excluding the RHS column).
Sourcepub fn add_constraint(&mut self, coeffs: Vec<BigRational>, rhs: BigRational)
pub fn add_constraint(&mut self, coeffs: Vec<BigRational>, rhs: BigRational)
Add constraint to tableau.
Sourcepub fn set_objective(&mut self, coeffs: Vec<BigRational>)
pub fn set_objective(&mut self, coeffs: Vec<BigRational>)
Set objective function.
Trait Implementations§
Source§impl Clone for DualSimplexSolver
impl Clone for DualSimplexSolver
Source§fn clone(&self) -> DualSimplexSolver
fn clone(&self) -> DualSimplexSolver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DualSimplexSolver
impl RefUnwindSafe for DualSimplexSolver
impl Send for DualSimplexSolver
impl Sync for DualSimplexSolver
impl Unpin for DualSimplexSolver
impl UnsafeUnpin for DualSimplexSolver
impl UnwindSafe for DualSimplexSolver
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