Detailed Description
Class for PolySCIP solver functions.
Definition at line 295 of file polyscip.h.
Class for PolySCIP solver functions. More...
#include <polyscip.h>
Public Types | |
enum | PolyscipStatus { PolyscipStatus::Unsolved, PolyscipStatus::ProblemRead, PolyscipStatus::LexOptPhase, PolyscipStatus::WeightSpacePhase, PolyscipStatus::TwoProjPhase, PolyscipStatus::Finished, PolyscipStatus::TimeLimitReached, PolyscipStatus::Error } |
using | ObjPair = std::pair< std::size_t, std::size_t > |
Pair of objectives indices. More... | |
Public Member Functions | |
Polyscip (int argc, const char *const *argv) | |
~Polyscip () | |
SCIP_RETCODE | readProblem () |
SCIP_RETCODE | computeNondomPoints () |
bool | writeResults () const |
void | writeResultsToFile () const |
void | printResults (std::ostream &os=std::cout) const |
void | printStatus (std::ostream &os=std::cout) const |
PolyscipStatus | getStatus () const |
std::size_t | numberOfBoundedResults () const |
std::size_t | numberofUnboundedResults () const |
bool | dominatedPointsFound () const |
ResultContainer::const_iterator | boundedCBegin () |
ResultContainer::const_iterator | boundedCEnd () |
Member Typedef Documentation
◆ ObjPair
using polyscip::Polyscip::ObjPair = std::pair<std::size_t, std::size_t> |
Pair of objectives indices.
Definition at line 312 of file polyscip.h.
Member Enumeration Documentation
◆ PolyscipStatus
|
strong |
Different statuses of PolySCIP solver
Definition at line 301 of file polyscip.h.
Constructor & Destructor Documentation
◆ Polyscip()
|
explicit |
Default constructor
- Parameters
-
argc Argument count argv Argument vector
Definition at line 414 of file polyscip.cpp.
References Error, polyscip::CmdLineArgs::getDelta(), polyscip::CmdLineArgs::getEpsilon(), polyscip::CmdLineArgs::getParameterFile(), polyscip::CmdLineArgs::getProblemFile(), polyscip::CmdLineArgs::getTimeLimit(), polyscip::CmdLineArgs::hasParameterFile(), polyscip::CmdLineArgs::hasTimeLimit(), ProblemRead, SCIP_OBJSENSE_MINIMIZE, SCIPcreate(), SCIPcreateClock(), SCIPincludeDefaultPlugins(), SCIPincludeObjReader(), SCIPreadParams(), and TRUE.
Referenced by computeNondomPoints().
◆ ~Polyscip()
polyscip::Polyscip::~Polyscip | ( | ) |
Member Function Documentation
◆ readProblem()
SCIP_RETCODE polyscip::Polyscip::readProblem | ( | ) |
Read multi-objective problem file
- Returns
- SCIP_OKAY if everything worked; otherwise a suitable error code is passed
Definition at line 1746 of file polyscip.cpp.
References polyscip::CmdLineArgs::beVerbose(), Error, polyscip::CmdLineArgs::getProblemFile(), polyscip::CmdLineArgs::onlyExtremal(), ProblemRead, SCIP_CALL, SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIPgetNOrigContVars(), SCIPgetNOrigVars(), SCIPgetObjProbData(), SCIPgetObjsense(), SCIPgetOrigVars(), SCIPreadProb(), SCIPsetObjsense(), SCIPvarGetProbindex(), and Unsolved.
Referenced by main().
◆ computeNondomPoints()
SCIP_RETCODE polyscip::Polyscip::computeNondomPoints | ( | ) |
Compute non-dominated points of given problem
- Attention
- readProblem() needs to be called before
- Returns
- SCIP_OKAY if everything worked; otherwise a suitable error code is passed
Definition at line 526 of file polyscip.cpp.
References polyscip::CmdLineArgs::beVerbose(), Error, FALSE, Finished, polyscip::CmdLineArgs::getDelta(), polyscip::CmdLineArgs::getEpsilon(), polyscip::RectangularBox::getInterval(), polyscip::NondomProjections::getLastProj(), polyscip::RectangularBox::isFeasible(), LexOptPhase, Polyscip(), ProblemRead, SCIP_Bool, SCIP_CALL, SCIP_CALL_ABORT, SCIP_OKAY, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_OPTIMAL, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_VARTYPE_CONTINUOUS, SCIPaddCons(), SCIPaddVar(), SCIPchgLhsLinear(), SCIPchgRhsLinear(), SCIPcreateConsBasicLinear(), SCIPcreateVarBasic(), SCIPdelCons(), SCIPdelVar(), SCIPfreeTransform(), SCIPgetObjProbData(), SCIPgetPrimalbound(), SCIPgetStatus(), SCIPinfinity(), SCIPisGE(), SCIPisTransformed(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPstartClock(), SCIPstopClock(), polyscip::RectangularBox::size(), TimeLimitReached, and TwoProjPhase.
Referenced by main().
◆ writeResults()
|
inline |
Indicates whether results shold be written to a file
- Returns
- true if results should be written to a file; otherwise false
Definition at line 344 of file polyscip.h.
References printStatus().
Referenced by main().
◆ writeResultsToFile()
void polyscip::Polyscip::writeResultsToFile | ( | ) | const |
Write results to file named 'solutions_name-of-problem-file.txt'
Definition at line 1828 of file polyscip.cpp.
References polyscip::CmdLineArgs::getProblemFile(), polyscip::CmdLineArgs::getWritePath(), and printResults().
Referenced by main().
◆ printResults()
void polyscip::Polyscip::printResults | ( | std::ostream & | os = std::cout | ) | const |
Print results
- Parameters
-
os Output stream to print to
Definition at line 1574 of file polyscip.cpp.
References polyscip::global::narrow_cast(), polyscip::CmdLineArgs::outputOutcomes(), polyscip::CmdLineArgs::outputSols(), polyscip::global::print(), SCIP_OBJSEN_MINIMIZE, SCIP_OBJSENSE_MAXIMIZE, SCIP_OKAY, SCIPgetNOrigVars(), SCIPgetObjProbData(), SCIPgetOrigVars(), SCIPlpiCreate(), SCIPlpiFree(), SCIPlpiInfinity(), SCIPlpiIsPrimalFeasible(), SCIPlpiIsPrimalInfeasible(), SCIPlpiLoadColLP(), and SCIPlpiSolvePrimal().
Referenced by main(), and writeResultsToFile().
◆ printStatus()
void polyscip::Polyscip::printStatus | ( | std::ostream & | os = std::cout | ) | const |
Print PolySCIP status
- Parameters
-
os Output stream to print to
Definition at line 492 of file polyscip.cpp.
References Error, Finished, LexOptPhase, ProblemRead, TimeLimitReached, TwoProjPhase, Unsolved, and WeightSpacePhase.
Referenced by main().
◆ getStatus()
Polyscip::PolyscipStatus polyscip::Polyscip::getStatus | ( | ) | const |
Get PolySCIP status
- Returns
- Current PolySCIP status
Definition at line 1262 of file polyscip.cpp.
Referenced by main().
◆ numberOfBoundedResults()
std::size_t polyscip::Polyscip::numberOfBoundedResults | ( | ) | const |
Get number of bounded results
- Returns
- Number of computed bounded results
Definition at line 1270 of file polyscip.cpp.
Referenced by main().
◆ numberofUnboundedResults()
std::size_t polyscip::Polyscip::numberofUnboundedResults | ( | ) | const |
Get number of unbounded results
- Returns
- Number of computed unbounded results
Definition at line 1278 of file polyscip.cpp.
References a, b, polyscip::CmdLineArgs::beVerbose(), eps, Error, fabs(), FALSE, Finished, polyscip::CmdLineArgs::getEpsilon(), polyscip::CmdLineArgs::getTimeLimit(), polyscip::CmdLineArgs::hasTimeLimit(), pow(), polyscip::global::print(), polyscip::CmdLineArgs::roundWeightedObjCoeff(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PARAMSETTING_DEFAULT, SCIP_PARAMSETTING_OFF, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_OPTIMAL, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_UNBOUNDED, SCIPchgVarObj(), SCIPcreateFiniteSolCopy(), SCIPfreeSol(), SCIPfreeTransform(), SCIPgetBestSol(), SCIPgetClockTime(), SCIPgetNOrigVars(), SCIPgetObjProbData(), SCIPgetOrigVars(), SCIPgetPrimalRayVal(), SCIPgetSolOrigObj(), SCIPgetSolVal(), SCIPgetStatus(), SCIPhasPrimalRay(), SCIPisTransformed(), SCIPisZero(), SCIPsetPresolving(), SCIPsetRealParam(), SCIPsolve(), SCIPvarGetName(), TimeLimitReached, TRUE, w, and WeightSpacePhase.
Referenced by main().
◆ dominatedPointsFound()
bool polyscip::Polyscip::dominatedPointsFound | ( | ) | const |
Indicates whether dominated results were computed
- Returns
- true if dominated bounded results were computed
Definition at line 1880 of file polyscip.cpp.
Referenced by main().
◆ boundedCBegin()
|
inline |
Get iterator to beginning of bounded results
- Returns
- Const_iterator to beginning of bounded results
Definition at line 391 of file polyscip.h.
◆ boundedCEnd()
|
inline |
Get iterator to past-the-end of bounded results
- Returns
- Const_iterator to past-the-end of bounded results
Definition at line 397 of file polyscip.h.