Copyright | (c) Masahiro Sakai 2011-2014 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Extensions |
|
Mixed-Integer Programming Problems with some commmonly used extensions
Synopsis
- module Numeric.Optimization.MIP.Base
- readFile :: FileOptions -> FilePath -> IO (Problem Scientific)
- readLPFile :: FileOptions -> FilePath -> IO (Problem Scientific)
- readMPSFile :: FileOptions -> FilePath -> IO (Problem Scientific)
- parseLPString :: (Stream s, Token s ~ Char, IsString (Tokens s)) => FileOptions -> String -> s -> Either (ParseError s) (Problem Scientific)
- parseMPSString :: (Stream s, Token s ~ Char, IsString (Tokens s)) => FileOptions -> String -> s -> Either (ParseError s) (Problem Scientific)
- type ParseError s = ParseErrorBundle s Void
- writeFile :: FileOptions -> FilePath -> Problem Scientific -> IO ()
- writeLPFile :: FileOptions -> FilePath -> Problem Scientific -> IO ()
- writeMPSFile :: FileOptions -> FilePath -> Problem Scientific -> IO ()
- toLPString :: FileOptions -> Problem Scientific -> Either String Text
- toMPSString :: FileOptions -> Problem Scientific -> Either String Text
The MIP Problem/Solution types
File I/O
If this library is built with WithZlib
flag (enabled by default),
reading/writing gzipped file (.gz
) are also supported.
Reading problem files
readFile :: FileOptions -> FilePath -> IO (Problem Scientific) Source #
Parse LP or MPS file based on file extension.
readLPFile :: FileOptions -> FilePath -> IO (Problem Scientific) Source #
Parse a file containing LP file data.
readMPSFile :: FileOptions -> FilePath -> IO (Problem Scientific) Source #
Parse a file containing MPS file data.
parseLPString :: (Stream s, Token s ~ Char, IsString (Tokens s)) => FileOptions -> String -> s -> Either (ParseError s) (Problem Scientific) Source #
Parse a string containing LP file data.
parseMPSString :: (Stream s, Token s ~ Char, IsString (Tokens s)) => FileOptions -> String -> s -> Either (ParseError s) (Problem Scientific) Source #
Parse a string containing MPS file data.
type ParseError s = ParseErrorBundle s Void Source #
Error type for parsing.
The definition is slightly different based on the megaparsec
version.
Generating problem files
writeFile :: FileOptions -> FilePath -> Problem Scientific -> IO () Source #
Generate LP file or MPS file based on file extension.
writeLPFile :: FileOptions -> FilePath -> Problem Scientific -> IO () Source #
Generate LP file.
writeMPSFile :: FileOptions -> FilePath -> Problem Scientific -> IO () Source #
Generate MPS file.
toLPString :: FileOptions -> Problem Scientific -> Either String Text Source #
Generate a Text
containing LP file data.
toMPSString :: FileOptions -> Problem Scientific -> Either String Text Source #
Generate a Text
containing MPS file data.