[−][src]Struct minilp::MpsFile
A linear programming problem parsed from an MPS file.
Fields
problem_name: String
Value of the NAME field.
variables: HashMap<String, Variable>
A mapping of a variable name to the corresponding Variable
.
problem: Problem
A parsed problem.
Implementations
impl MpsFile
[src]
pub fn parse<R: BufRead>(
input: R,
direction: OptimizationDirection
) -> Result<Self>
[src]
input: R,
direction: OptimizationDirection
) -> Result<Self>
Parses a linear programming problem from an MPS file.
This function supports the "free" MPS format, meaning that lines are tokenized based on whitespace, not based on position. Also, because MPS lacks any way to indicate the optimization direction, you have to supply it manually.
Errors
Apart from I/O errors coming from input
, this function will signal any syntax error
as std::io::Error
with the kind set to InvalidData
.
Unsupported features such as integer variables are reported similarly.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MpsFile
impl Send for MpsFile
impl Sync for MpsFile
impl Unpin for MpsFile
impl UnwindSafe for MpsFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,