|
|
delpi
0.0.1
DElta-complete LP solver
|
Global namespace for the delpi library. More...
Namespaces | |
| namespace | hash |
| Namespace containing all the hash functions and utilities. | |
| namespace | qsopt_ex |
| Namespace containing all the utility functions to interact with the QSopt_ex solver. | |
Classes | |
| class | ArgParser |
| Used to parse command line arguments and produce a corresponding Config object to be used throughout the execution. More... | |
| class | BufferLineSource |
| A class that provides a source for lines of text buffered in memory. More... | |
| struct | Column |
| Convenient structure representing a column in the LP solver. More... | |
| class | Config |
| Simple dataclass used to store the configuration of the program. More... | |
| class | DelpiAssertionException |
| Exception for assertion failures. More... | |
| class | DelpiException |
| Base class for all exceptions in delpi. More... | |
| class | DelpiInvalidArgumentException |
| Exception for invalid arguments. More... | |
| class | DelpiLpSolver |
| Linear programming solver using a custom implementation of the Simplex algorithm. More... | |
| class | DelpiLpSolverException |
| Exception in the LP solver. More... | |
| class | DelpiNotImplementedException |
| Exception for not yet implemented features. More... | |
| class | DelpiNotSupportedException |
| Exception for not supported features. More... | |
| class | DelpiOutOfRangeException |
| Exception for out of range errors. More... | |
| class | DelpiParserException |
| Exception for parser errors. More... | |
| class | DelpiUnreachableException |
| Exception for unreachable code. More... | |
| class | Driver |
| The Driver is the base class for all the parsers. More... | |
| class | Expression |
| Represents a symbolic form of an expression. More... | |
| class | ExpressionCell |
| Symbolic expression representing an addition between linear monomials. More... | |
| class | Formula |
| Symbolic formula used to represent a constraint in the LP problem. More... | |
| class | intrusive_ptr |
| Pointer to a generic object that supports intrusive reference counting. More... | |
| class | IterationStats |
| Dataclass collecting statistics about some operation or process. More... | |
| class | LineScanner |
| LineScanner takes care of parsing the MPS file line by line, keeping an internal state and invoking the correct method of the MpsDriver. More... | |
| class | LpSolver |
| Facade class that hides the underlying LP solver used by delpi. More... | |
| struct | LpStats |
| Collection of statistics for the LP solver. More... | |
| class | MappedFileSource |
| A memory-mapped file source for efficiently reading files line by line. More... | |
| class | OptionValue |
| Represents an optional value in dLinear. More... | |
| class | QsoptexLpSolver |
| Linear programming solver using QSopt_ex. More... | |
| struct | Row |
| Structure representing a row in the LP solver in the form of a linear combination of variables. More... | |
| class | SelfReferenceCountingObject |
| Utility class to be inherited from to obtain compatibility with the intrusive_ptr. More... | |
| struct | SolveConfiguration |
| class | SoplexLpSolver |
| Linear programming solver using SoPlex. More... | |
| class | Stats |
| Dataclass collecting statistics about some operation or process. More... | |
| class | Timer |
| Timer class using the a steady clock. More... | |
| class | TimerBase |
| Simple timer class to evaluate the performance of the software. More... | |
| class | TimerGuard |
| The TimeGuard wraps a timer object and pauses it when the guard object is destructed. More... | |
| struct | user_clock |
| Structure that will hold the user clock data. More... | |
| class | UserTimer |
| Timer class using the user_clock. More... | |
| class | Variable |
| Real symbolic variable. More... | |
| class | VariableMap |
| Map from variables to an arbitrary type T optimised for fast access at the cost of memory. More... | |
| class | VariableSet |
| Set of variables optimised for fast access at the cost of memory. More... | |
Concepts | |
| concept | MapFromTo |
| Check if the type T constitutes a map from type From to type To. | |
| concept | SelfReferenceCounter |
| Check if the type T is a self-reference counter type. | |
| concept | Iterable |
| Check if the type T is an iterable type. | |
| concept | SizedIterable |
| Check if the type T is an iterable type with a size() method. | |
| concept | TypedIterable |
| Check if the type T is an iterable type with elements of type U. | |
| concept | SizedTypedIterable |
| Check if the type T is an iterable type with elements of type U and a size() method. | |
| concept | IsAnyOf |
| Check if the type T is any of the types U. | |
| concept | IsNotAnyOf |
| Check if the type T is not any of the types U. | |
| concept | Arithmetic |
| Check if the type T supports the arithmetic operations +, -, *, /. | |
| concept | Numeric |
| Check if the type T supports the arithmetic operations +, -, *, / and the comparison operators <, >, <=, >=. | |
Enumerations | |
| enum class | LpResult { UNSOLVED , OPTIMAL , DELTA_OPTIMAL , UNBOUNDED , INFEASIBLE , ERROR } |
| Possible outcomes of the LP solver. More... | |
| enum class | LpRowSense { LT = 0 , EQ = 1 , LE = 2 , GE , GT , NQ , IN } |
| Sense of a linear programming row describing a constraint. More... | |
| enum class | FormulaKind { Eq , Neq , Gt , Geq , Lt , Leq } |
| Kinds of symbolic formulas. More... | |
Functions | |
| std::unique_ptr< Driver > | GetDriverInstance (LpSolver &lp_solver) |
| Get the correct driver instance based on the actual format set in the Config. | |
| LpResult | operator~ (LpResult result) |
| Relax the result of the theory solver (i.e. | |
| bool | IsFeasible (LpResult result) |
| Check if the result obtained by the LpSolver implies that the problem is feasible. | |
| int | ExitCode (LpResult result) |
| Convert the result in. | |
| LpRowSense | parseLpSense (char sense) |
| Parse the sense from a character. | |
| char | toChar (LpRowSense sense) |
| Convert the sense to a character. | |
| LpRowSense | operator! (LpRowSense sense) |
| Invert the sense with delta == 0. | |
| LpRowSense | operator- (LpRowSense sense) |
| Invert the sense with delta > 0. | |
| LpRowSense | operator~ (LpRowSense sense) |
| Relax the sense, assuming delta > 0.e More specifically, LT -> LE, GT -> GE. | |
| FormulaKind | operator- (FormulaKind kind) |
| FormulaKind that continues to match the satisfaction of the formula after both sides have been multiplied by -1. | |
| FormulaKind | operator! (FormulaKind kind) |
| FormulaKind that inverts the satisfaction of the formula. | |
| std::string | GetExtension (const std::string &name) |
| Get the extension of the file. | |
| std::vector< std::string > | SplitStringByWhitespace (const char *in) |
| Split a C-string by whitespace. | |
| std::vector< std::string > | GetFiles (const std::string &path, const std::string &extension="") |
| Get the files in a directory. | |
| template<class T, class... Args> | |
| T | Min (const T &a, const Args &... args) |
| Return the minimum of the given values. | |
| template<class T, class... Args> | |
| T | Max (const T &a, const Args &... args) |
| Return the maximum of the given values. | |
| bool | ichar_equals (const char a, const char b) noexcept |
| Check whether two characters are equal, ignoring case. | |
| bool | ieq (std::string_view a, std::string_view b) |
| Check whether two strings are the same, ignoring the case of the characters. | |
| std::string_view | nextToken (std::string_view &line) noexcept |
| Given a string, find the next word token contained within ignoring all whitespaces. | |
| std::string_view | peakNextToken (const std::string_view line) noexcept |
| Given a string, find the next word token contained within ignoring all whitespaces. | |
| std::string_view | trim (const std::string_view str) noexcept |
| Remove leading and trailing whitespace from a string. | |
Global namespace for the delpi library.
|
strong |
Kinds of symbolic formulas.
| Enumerator | |
|---|---|
| Eq | = |
| Neq | != |
| Gt | |
| Geq | >= |
| Lt | < |
| Leq | <= |
Definition at line 14 of file FormulaKind.h.
|
strong |
Possible outcomes of the LP solver.
Definition at line 14 of file LpResult.h.
|
strong |
Sense of a linear programming row describing a constraint.
If the sense is strict, it means that the variable cannot assume the right-hand-side value. When using delta complete solvers, strict senses can be relaxed to non-strict senses.
| Enumerator | |
|---|---|
| LT | Less than. |
| EQ | Equal to. |
| LE | Less than or equal to. |
| GE | Greater than or equal to. |
| GT | Greater than. |
| NQ | Not equal to. |
| IN | Inactive. |
Definition at line 20 of file LpRowSense.h.
| int delpi::ExitCode | ( | LpResult | result | ) |
Convert the result in.
| result | result used to produce the exit code |
Definition at line 53 of file LpResult.cpp.
Get the correct driver instance based on the actual format set in the Config.
| lp_solver | LP solver to populate |
Definition at line 34 of file parser.cpp.
| std::string delpi::GetExtension | ( | const std::string & | name | ) |
Get the extension of the file.
Extracts the extension from name, meaning the part of the file name after the last dot.
| name | name of the file |
Definition at line 18 of file filesystem.cpp.
| std::vector< std::string > delpi::GetFiles | ( | const std::string & | path, |
| const std::string & | extension = "" ) |
Get the files in a directory.
| path | path to the directory |
| extension | filter the selection to files that have a matching extension |
Definition at line 37 of file filesystem.cpp.
|
inlinenoexcept |
Check whether two characters are equal, ignoring case.
| a | first character |
| b | second character |
Definition at line 23 of file strings.hpp.
|
inline |
Check whether two strings are the same, ignoring the case of the characters.
| a | first string |
| b | second string |
Definition at line 34 of file strings.hpp.
| bool delpi::IsFeasible | ( | LpResult | result | ) |
Check if the result obtained by the LpSolver implies that the problem is feasible.
| result | result to check |
Definition at line 43 of file LpResult.cpp.
| T delpi::Max | ( | const T & | a, |
| const Args &... | args ) |
| T delpi::Min | ( | const T & | a, |
| const Args &... | args ) |
|
inlinenoexcept |
Given a string, find the next word token contained within ignoring all whitespaces.
Whitespace characters are defined according to the std::isspace standard function.
| line | string to check |
Definition at line 43 of file strings.hpp.
| FormulaKind delpi::operator! | ( | FormulaKind | kind | ) |
FormulaKind that inverts the satisfaction of the formula.
| kind | original formula kind |
Definition at line 28 of file FormulaKind.cpp.
| LpRowSense delpi::operator! | ( | LpRowSense | sense | ) |
Invert the sense with delta == 0.
More specifically, !LE == GT, !GE == LT, !EQ == NQ, !NQ == EQ, !IN == IN, !GT == LE, !LT == GE.
| sense | sense to invert |
Definition at line 59 of file LpRowSense.cpp.
| FormulaKind delpi::operator- | ( | FormulaKind | kind | ) |
FormulaKind that continues to match the satisfaction of the formula after both sides have been multiplied by -1.
| kind | original formula kind |
Definition at line 14 of file FormulaKind.cpp.
| LpRowSense delpi::operator- | ( | LpRowSense | sense | ) |
Invert the sense with delta > 0.
More specifically, -LE == GT, -GE == LE, -EQ == NQ, -NQ == EQ. Any other sense generates an assertion error
| sense | sense to invert |
Definition at line 80 of file LpRowSense.cpp.
Relax the result of the theory solver (i.e.
transform OPTIMAL to DELTA_OPTIMAL). All other results are left unchanged.
| result | result to relax |
Definition at line 33 of file LpResult.cpp.
| LpRowSense delpi::operator~ | ( | LpRowSense | sense | ) |
Relax the sense, assuming delta > 0.e More specifically, LT -> LE, GT -> GE.
The other senses remain unchanged.
| sense | sense to relax |
Definition at line 95 of file LpRowSense.cpp.
| LpRowSense delpi::parseLpSense | ( | char | sense | ) |
Parse the sense from a character.
| sense | character to parse |
Definition at line 14 of file LpRowSense.cpp.
|
inlinenoexcept |
Given a string, find the next word token contained within ignoring all whitespaces.
Whitespace characters are defined according to the std::isspace standard function.
| line | string to check |
Definition at line 68 of file strings.hpp.
| std::vector< std::string > delpi::SplitStringByWhitespace | ( | const char * | in | ) |
Split a C-string by whitespace.
Each word is returned as a separate string in a vector.
| in | input string to split |
Definition at line 24 of file filesystem.cpp.
| char delpi::toChar | ( | LpRowSense | sense | ) |
Convert the sense to a character.
| sense | sense to convert |
Definition at line 38 of file LpRowSense.cpp.
|
inlinenoexcept |
Remove leading and trailing whitespace from a string.
Whitespace characters are defined according to the std::isspace standard function.
| str | string to trim |
Definition at line 87 of file strings.hpp.