toysolver-0.0.6: Assorted decision procedures for SAT, Max-SAT, PB, MIP, etc

Portabilityportable
Stabilityprovisional
Maintainermasahiro.sakai@gmail.com
Safe HaskellNone

Text.LPFile

Description

Synopsis

Documentation

data LP Source

Problem

Instances

type Expr = [Term]Source

expressions

data Term Source

terms

Constructors

Term Rational [Var] 

Instances

data OptDir

The OptDir type represents optimization directions.

Constructors

OptMin

minimization

OptMax

maximization

type ObjectiveFunction = (Maybe Label, Expr)Source

objective function

type Bounds = (BoundExpr, BoundExpr)Source

type for representing lower/upper bound of variables

type Label = StringSource

label

type Var = StringSource

variable

data VarInfo Source

Constructors

VarInfo 

data BoundExpr Source

type for representing lower/upper bound of variables

Constructors

NegInf 
Finite Rational 
PosInf 

data RelOp Source

relational operators

Constructors

Le 
Ge 
Eql 

data SOSType Source

types of SOS (special ordered sets) constraints

Constructors

S1

Type 1 SOS constraint

S2

Type 2 SOS constraint

type SOS = (Maybe Label, SOSType, [(Var, Rational)])Source

SOS (special ordered sets) constraints

defaultBounds :: BoundsSource

default bounds

defaultLB :: BoundExprSource

default lower bound (0)

defaultUB :: BoundExprSource

default upper bound (+∞)

getVarInfo :: LP -> Var -> VarInfoSource

looking up attributes for a variable

getVarType :: LP -> Var -> VarTypeSource

looking up bounds for a variable

getBounds :: LP -> Var -> BoundsSource

looking up bounds for a variable

parseString :: SourceName -> String -> Either ParseError LPSource

Parse a string containing LP file data. The source name is only | used in error messages and may be the empty string.

parseFile :: FilePath -> IO (Either ParseError LP)Source

Parse a file containing LP file data.

render :: LP -> Maybe StringSource

Render a problem into a string.