Scippy

SCIP

Solving Constraint Integer Programs

polyscip::Polyscip Class Reference

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

Different statuses of PolySCIP solver

Enumerator
Unsolved 

Initial status after calling public constructor.

ProblemRead 

Status after problem instance was read successfully.

LexOptPhase 

Status after lexicographic optimal results were computed.

WeightSpacePhase 

Status while results of weight space polyhedron are computed.

TwoProjPhase 

Status while computing 2-dimensional non-dominated projection results.

Finished 

Status if problem was solved successfully.

TimeLimitReached 

Status if given time limit was reached.

Error 

Status if an error occured.

Definition at line 301 of file polyscip.h.

Constructor & Destructor Documentation

◆ Polyscip()

◆ ~Polyscip()

polyscip::Polyscip::~Polyscip ( )

Destructor

Definition at line 481 of file polyscip.cpp.

References SCIPfree(), and SCIPfreeClock().

Member Function Documentation

◆ readProblem()

◆ computeNondomPoints()

◆ writeResults()

bool polyscip::Polyscip::writeResults ( ) const
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()

◆ printStatus()

void polyscip::Polyscip::printStatus ( std::ostream &  os = std::cout) const

Print PolySCIP status

Parameters
osOutput 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()

◆ 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()

ResultContainer::const_iterator polyscip::Polyscip::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()

ResultContainer::const_iterator polyscip::Polyscip::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.

References a, and b.