|
graph_analysis
|
#include <ScipSolver.hpp>


Public Types | |
| typedef shared_ptr< ScipSolver > | Ptr |
Public Types inherited from graph_analysis::algorithms::LPSolver | |
| enum | Status { STATUS_UNKNOWN, STATUS_OPTIMAL, STATUS_INFEASIBLE, STATUS_UNBOUNDED, INVALID_PROBLEM_DEFINITION, NO_SOLUTION_FOUND, SOLUTION_FOUND } |
| enum | Type { UNKNOWN_LP_SOLVER, CBC_SOLVER, CLP_SOLVER, GLPK_SOLVER, SCIP_SOLVER, SOPLEX_SOLVER, GLPK_SOLVER_EMBEDDED, SCIP_SOLVER_EMBEDDED, SOPLEX_SOLVER_EMBEDDED, LP_SOLVER_TYPE_END } |
| enum | ProblemFormat { UNKNOWN_PROBLEM_FORMAT = 0, CPLEX, GLPK, MPS, LP_PROBLEM_FORMAT_END } |
| enum | SolutionType { UNKNOWN_SOLUTION_TYPE = 0, BASIC_SOLUTION, IPT_SOLUTION, MIP_SOLUTION, LP_SOLUTION_TYPE_END } |
| Solution types: basic, IPT = interior point, MIP = mixed integer. More... | |
| typedef shared_ptr< LPSolver > | Ptr |
Public Member Functions | |
| ScipSolver () | |
| virtual | ~ScipSolver () |
| void | debugSolution (bool enable) |
| LPSolver::Type | getSolverType () const override |
| void | doLoadProblem (const std::string &filename, LPSolver::ProblemFormat format=CPLEX) override |
| void | saveProblem (const std::string &filename, LPSolver::ProblemFormat format=CPLEX) const override |
| void | loadSolution (const std::string &filename, LPSolver::SolutionType format=BASIC_SOLUTION) override |
| void | saveSolution (const std::string &filename, LPSolver::SolutionType format=BASIC_SOLUTION) const override |
| double | getObjectiveValue () const override |
| double | getVariableValue (const std::string &varName) const |
| double | getVariableValueByColumnIdx (uint32_t idx) const override |
| Status | run () override |
| Status | getStatus () const |
| Status | run (const std::string &problem, LPSolver::ProblemFormat problemFormat=CPLEX, bool useCaching=false) override |
Public Member Functions inherited from graph_analysis::algorithms::LPSolver | |
| LPSolver () | |
| virtual | ~LPSolver () |
| bool | loadProblem (const std::string &filename, ProblemFormat format=CPLEX) |
| std::string | saveProblemToTempfile (LPSolver::ProblemFormat format=CPLEX) const |
| std::string | saveSolutionToTempfile (LPSolver::SolutionType format=BASIC_SOLUTION) const |
| std::string | getVariableNameByColumnIdx (uint32_t idx) const |
| uint32_t | getColumnIdxByVariableName (const std::string &varName) const |
| const std::string & | getProblemFile () const |
| LPSolver::ProblemFormat | getProblemFileFormat () const |
| const std::string & | getSolutionFile () const |
| LPSolver::SolutionType | getSolutionFileFormat () const |
| virtual std::vector< size_t > | infeasibleConstraints () const |
| void | setSolutionCacheSize (size_t size) |
| size_t | getSolutionCacheSize () const |
| void | resetSolutionCache () |
Additional Inherited Members | |
Static Public Member Functions inherited from graph_analysis::algorithms::LPSolver | |
| static LPSolver::Ptr | getInstance (LPSolver::Type solverType) |
| static ProblemFormat | getProblemFormatFromFileExtension (const std::string &extension) |
| static std::string | getTempFilename (const std::string &suffix=".lp") |
Static Public Attributes inherited from graph_analysis::algorithms::LPSolver | |
| static std::map< Status, std::string > | StatusTxt |
| static std::map< Type, std::string > | TypeTxt |
| static std::map< ProblemFormat, std::string > | ProblemFormatTxt |
| static std::map< LPSolver::ProblemFormat, std::vector< std::string > > | ProblemFormatExtensions |
Protected Types inherited from graph_analysis::algorithms::LPSolver | |
| typedef std::map< std::string, KnownSolution > | KnownSolutions |
Protected Member Functions inherited from graph_analysis::algorithms::LPSolver | |
| Status | loadKnownSolution (const std::string &problemFilename) |
| void | registerSolution (const std::string &problemFilename, const std::string &solutionFilename, Status status, SolutionType type) |
| const LPSolver::KnownSolutions::mapped_type & | getRegisteredSolution (const std::string &problemFilename) const |
Protected Attributes inherited from graph_analysis::algorithms::LPSolver | |
| std::string | mProblemFile |
| LPSolver::ProblemFormat | mProblemFileFormat |
| std::string | mSolutionFile |
| LPSolver::SolutionType | mSolutionFileFormat |
| size_t | mSolutionCacheSize |
Static Protected Attributes inherited from graph_analysis::algorithms::LPSolver | |
| static KnownSolutions | msKnownSolutions |
| typedef shared_ptr<ScipSolver> graph_analysis::algorithms::lp::embedded::ScipSolver::Ptr |
| graph_analysis::algorithms::lp::embedded::ScipSolver::ScipSolver | ( | ) |
|
virtual |
| void graph_analysis::algorithms::lp::embedded::ScipSolver::debugSolution | ( | bool | enable | ) |
|
overridevirtual |
Implements graph_analysis::algorithms::LPSolver.
|
overridevirtual |
Retrieve the current objective value of the solution
Implements graph_analysis::algorithms::LPSolver.
|
inlineoverridevirtual |
Implements graph_analysis::algorithms::LPSolver.
| LPSolver::Status graph_analysis::algorithms::lp::embedded::ScipSolver::getStatus | ( | ) | const |
| double graph_analysis::algorithms::lp::embedded::ScipSolver::getVariableValue | ( | const std::string & | varName | ) | const |
|
overridevirtual |
Get the variable value by the column index
| idx | column index |
Reimplemented from graph_analysis::algorithms::LPSolver.
|
overridevirtual |
Load a solution based
| filename | filename of the solution file |
| format | format of the solution |
Implements graph_analysis::algorithms::LPSolver.
|
overridevirtual |
Run the solver (after loadProblem) has been called
Implements graph_analysis::algorithms::LPSolver.
|
overridevirtual |
Run the solver with a given problem file
| problemFilename | filename of the problem to solve |
| problemFormat | format of the problem to solver |
| useCaching | To use caching of problem and respective solutions set to True, otherwise False |
Implements graph_analysis::algorithms::LPSolver.
|
overridevirtual |
Save the problem to file
| filename | filename of the problem file |
| format | format of the the problem |
Implements graph_analysis::algorithms::LPSolver.
|
overridevirtual |
Save the solution to file
| filename | filename of the solution file |
| format | format of the the solution |
Implements graph_analysis::algorithms::LPSolver.
1.8.13