Google OR-Tools: ortools/linear_solver/xpress_interface.cc File Reference

#include <algorithm>
#include <clocale>
#include <fstream>
#include <istream>
#include <limits>
#include <memory>
#include <mutex>
#include <numeric>
#include <string>
#include "absl/strings/numbers.h"
#include "absl/strings/str_format.h"
#include "ortools/base/logging.h"
#include "ortools/base/timer.h"
#include "ortools/linear_solver/linear_solver.h"
#include "ortools/third_party_solvers/xpress_environment.h"

Go to the source code of this file.

Macros

#define XPRS_INTEGER   'I'
#define XPRS_CONTINUOUS   'C'
#define CHECK_STATUS(s)
#define XPRS_NAN   std::numeric_limits<double>::quiet_NaN()
#define setParamIfPossible_MACRO(target_map, setter, converter, type)

Functions

std::string operations_research::getSolverVersion (XPRSprob const &prob)
bool operations_research::readParameter (XPRSprob const &prob, std::string const &name, std::string const &value)
void operations_research::printError (const XPRSprob &mLp, int line)
void XPRS_CC operations_research::XpressIntSolCallbackImpl (XPRSprob cbprob, void *cbdata)
void XPRS_CC operations_research::optimizermsg (XPRSprob prob, void *data, const char *sMsg, int nLen, int nMsgLvl)
int operations_research::getnumcols (const XPRSprob &mLp)
int operations_research::getnumrows (const XPRSprob &mLp)
int operations_research::getitcnt (const XPRSprob &mLp)
int operations_research::getnodecnt (const XPRSprob &mLp)
int operations_research::setobjoffset (const XPRSprob &mLp, double value)
void operations_research::addhint (const XPRSprob &mLp, int length, const double solval[], const int colind[])
void operations_research::interruptXPRESS (XPRSprob &xprsProb, CUSTOM_INTERRUPT_REASON reason)
static int operations_research::MPSolverToXpressBasisStatus (MPSolver::BasisStatus mpsolver_basis_status)
static MPSolver::BasisStatus operations_research::XpressToMPSolverBasisStatus (int xpress_basis_status)
static std::map< std::string, int > & operations_research::getMapStringControls ()
static std::map< std::string, int > & operations_research::getMapDoubleControls ()
static std::map< std::string, int > & operations_research::getMapIntControls ()
static std::map< std::string, int > & operations_research::getMapInt64Controls ()
std::vector< int > operations_research::XpressBasisStatusesFrom (const std::vector< MPSolver::BasisStatus > &statuses)
template<class Container>
void operations_research::splitMyString (const std::string &str, Container &cont, char delim=' ')
bool operations_research::stringToCharPtr (const std::string &var, const char **out)

◆ CHECK_STATUS

#define CHECK_STATUS ( s)

Value:

do { \

int const status_ = s; \

CHECK_EQ(0, status_); \

} while (0)

Definition at line 39 of file xpress_interface.cc.

◆ setParamIfPossible_MACRO

#define setParamIfPossible_MACRO ( target_map,
setter,
converter,
type )

Value:

{ \

auto matchingParamIter = (target_map).find(paramAndValuePair.first); \

if (matchingParamIter != (target_map).end()) { \

type convertedValue; \

bool ret = converter(paramAndValuePair.second, &convertedValue); \

if (ret) { \

VLOG(1) << "Setting parameter " << paramAndValuePair.first \

<< " to value " << convertedValue << std::endl; \

} \

setter(mLp, matchingParamIter->second, convertedValue); \

continue; \

} \

}

Definition at line 2116 of file xpress_interface.cc.

◆ XPRS_CONTINUOUS

#define XPRS_CONTINUOUS   'C'

◆ XPRS_INTEGER

◆ XPRS_NAN

#define XPRS_NAN   std::numeric_limits<double>::quiet_NaN()