dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
dlinear::mps Namespace Reference

Namespace for the MPS parser of the dlinear library. More...

Classes

class  MpsDriver
 The MpsDriver class brings together all components. More...
 
class  MpsScanner
 MpsScanner is a derived class to add some extra function to the scanner class. More...
 

Enumerations

enum class  BoundType
 Bound type. More...
 
enum class  Sense { L , E , G , N }
 Sense of a constraint row. More...
 

Functions

BoundType ParseBoundType (const std::string &bound_type)
 Parse a bound type from a string.
 
BoundType ParseBoundType (const char bound_type[])
 Parse a bound type from a C-string.
 
Sense ParseSense (const std::string &sense)
 Parse a sense from a string.
 
Sense ParseSense (const char sense[])
 Parse a sense from a C-style string.
 
Sense ParseSense (char sense)
 Parse a sense from a character.
 

Detailed Description

Namespace for the MPS parser of the dlinear library.

Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License
Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License Bound type.

The bound type is used to specify the type of a variable bound. It is indicated in the MPS file format. The supported values are 'LO', 'LI', 'UP', 'UI', 'FX', 'FR', 'MI', 'PL', or 'BV'. They represent, respectively, lower bound, lower bound integer, upper bound, upper bound integer, fixed bound (lower and upper bound are equal), free bound (lower and upper bound are -/+ infinity), minus infinity (lower bound is -infinity), plus infinity (upper bound is +infinity), or binary variable (either 0 or 1).

Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License Driver for the parsing and execution of mps files.

The driver puts in communication the parser and the scanner. In the end, it produces a context that can be used to solve the problem.

Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License MPS parser for the dlinear library.
Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License Sense of a constraint row.

The sense indicates the type or relation a contraint row has with respect to its right-hand side. The supported values are 'L', 'E', 'G', or 'N'. They represent, respectively, less than, equal to, greater than, or no constraint, usually applied to the objective function.

Enumeration Type Documentation

◆ BoundType

enum class dlinear::mps::BoundType
strong

Bound type.

The bound type is used to specify the type of a variable bound. The bound type is used in the MPS file format.

Definition at line 27 of file BoundType.h.

◆ Sense

enum class dlinear::mps::Sense
strong

Sense of a constraint row.

Enumerator

Less or equal to.

Equal to.

Greater or equal to.

No sense, used for the objective function.

Definition at line 23 of file Sense.h.

Function Documentation

◆ ParseBoundType() [1/2]

BoundType dlinear::mps::ParseBoundType ( const char bound_type[])

Parse a bound type from a C-string.

The string must be one of the following:

  • "LO"
  • "LI"
  • "UP"
  • "UI"
  • "FX"
  • "FR"
  • "MI"
  • "PL"
  • "BV

Any leading or trailing spaces are ignored. The input is case-insensitive.

Precondition
The input must be exactly 2 characters long.
Parameters
bound_typeC-string representation of the bound type
Returns
corresponding bound type

Definition at line 17 of file BoundType.cpp.

◆ ParseBoundType() [2/2]

BoundType dlinear::mps::ParseBoundType ( const std::string & bound_type)

Parse a bound type from a string.

The string must be one of the following:

  • "LO"
  • "LI"
  • "UP"
  • "UI"
  • "FX"
  • "FR"
  • "MI"
  • "PL"
  • "BV"

Any leading or trailing spaces are ignored. The input is case-insensitive.

Parameters
bound_typestring representation of the bound type
Returns
corresponding bound type

Definition at line 15 of file BoundType.cpp.

◆ ParseSense() [1/3]

Sense dlinear::mps::ParseSense ( char sense)

Parse a sense from a character.

The character must be one of the following:

  • 'L'
  • 'E'
  • 'G'
  • 'N'

The input is case-insensitive.

Parameters
sensecharacter representation of the sense
Returns
corresponding sense

Definition at line 24 of file Sense.cpp.

◆ ParseSense() [2/3]

Sense dlinear::mps::ParseSense ( const char sense[])

Parse a sense from a C-style string.

The string must be one of the following:

  • "L"
  • "E"
  • "G"
  • "N"

Any leading or trailing spaces are ignored. The input is case-insensitive.

Parameters
senseC-style string representation of the sense
Returns
corresponding sense

Definition at line 20 of file Sense.cpp.

◆ ParseSense() [3/3]

Sense dlinear::mps::ParseSense ( const std::string & sense)

Parse a sense from a string.

The string must be one of the following:

  • "L"
  • "E"
  • "G"
  • "N"

Any leading or trailing spaces are ignored. The input is case-insensitive.

Parameters
sensestring representation of the sense
Returns
corresponding sense

Definition at line 16 of file Sense.cpp.