Common CLP Tasks in the Samples

Below is a listing of a number of common CLP tasks, such as loading a problem from an MPS file, matched with a list of each Sample file which illustrates the performance of a given task.

Table 4.4. Contents of the Samples directory

CLP Task(s) Method(s) Sample(s)
Read problem from MPS file

int readMps(const char *filename)

defaults.cpp, driver.cpp, minimum.cpp
Solve by primal method

int primal()

Choose pivot rule

void setPrimalColumnPivotAlgorithm(ClpPrimalColumnPivot &choice)
void setDualRowPivotAlgorithm(ClpDualRowPivot &choice)

Get/set infeasibility cost

void setInfeasibilityCost(double value)
void setInfeasibilityCost(double value)

Get string/"double"/integer information

bool getStrParam(ClpStrParam key, std::string &value) const
bool getDblParam(ClpDblParam key, double &value) const
bool  getIntParam (ClpIntParam key, int &value) const 

Set maximum number of iterations

void setMaximumIterations(int value)

Check solution status

int status() const
bool isAbandoned() const
bool isProvenOptimal() const
bool isProvenPrimalInfeasible() const
bool isProvenDualInfeasible() const
bool isPrimalObjectiveLimitReached() const
bool isDualObjectiveLimitReached() const
bool isIterationLimitReached() const