[][src]Struct minilp::MpsFile

pub struct MpsFile {
    pub problem_name: String,
    pub variables: HashMap<String, Variable>,
    pub problem: Problem,
}

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]

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

impl Clone for MpsFile[src]

impl Debug for MpsFile[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.