Camargue
Namespaces | Classes | Enumerations | Functions | Variables
CMR::LP Namespace Reference

Manners related to LP relaxations and solver interfaces. More...

Namespaces

 CutAge
 Constants related to ages of cuts.
 

Classes

class  ActiveTour
 Information about the active tour in a CoreLP. More...
 
struct  Basis
 Row and column basic statuses corresponding to some LP solution. More...
 
class  CoreLP
 Class for storing the core lp associated to a TSP instance and pivoting. More...
 
class  CPXparamGuard
 A scope guard for making temporary changes to a CPLEX parameter. More...
 
struct  DualGroup
 Class template for storing dual LP solutions. More...
 
struct  Estimate
 Struct for storing info from branching estimates. More...
 
struct  NDpivotHandle
 Handle for data during a non-degenerate pivot callback. More...
 
class  Relaxation
 Class for storing an lp relaxation via interface to an lp solver. More...
 
struct  SparseRow
 Simple struct representing sparse matrix row for passing to LP solver. More...
 

Typedefs

CPLEX Parameter guards.

Limited versions of util::ScopeGuard used to make temporary changes to CPLEX env parameters.

Their destructor reverts the parameter, aborting the program if an error occurs (because destructors cannot throw).

template<typename numtype >
using CPXgetType = int(*)(CPXCENVptr, int, numtype *)
 Template alias for signature of CPXgetintparam, CPXgetdblparam, etc.
 
template<typename numtype >
using CPXsetType = int(*)(CPXENVptr, int, numtype)
 Template alias for signature of CPXsetintparam, CPXsetdblparam, etc.
 
using CPXintParamGuard = CPXparamGuard< int,&CPXgetintparam,&CPXsetintparam >
 Integer parameter guard.
 
using CPXdblParamGuard = CPXparamGuard< double,&CPXgetdblparam,&CPXsetdblparam >
 Double parameter guard.
 
using CPXlongParamGuard = CPXparamGuard< CPXLONG,&CPXgetlongparam,&CPXsetlongparam >
 CPXLONG parameter guard.
 

Enumerations

enum  PivType { PivType::Frac, PivType::Subtour, PivType::Tour, PivType::FathomedTour }
 Enum class for categorizing lp solutions. More...
 
enum  SolStat { SolStat::Optimal, SolStat::Infeas, SolStat::Abort }
 Enum class for categorizing solution statuses. More...
 
enum  BStat { AtLower = 0, Basic = 1, AtUpper = 2, FreeSuper = 3 }
 Variable basis statuses. More...
 

Functions

std::ostream & operator<< (std::ostream &os, SolStat stat)
 
bool is_tour_piv (PivType P)
 
std::ostream & operator<< (std::ostream &os, Estimate::Stat estat)
 
std::ostream & operator<< (std::ostream &os, PivType piv)
 
template<typename cplex_query >
std::vector< double > info_vec (cplex_query F, const char *Fname, const CPXENVptr cplex_env, const CPXLPptr cplex_lp, int begin, int end)
 Template for getting a ranged result vector from CPLEX. More...
 
template<typename cplex_query , typename vectype >
void set_info_vec (cplex_query F, const char *Fname, const CPXENVptr cplex_env, const CPXLPptr cplex_lp, vector< vectype > &info_vec, int begin, int end)
 Like info_vec, but modifies a vector rather than returning one.
 
template<typename info_type >
void get_callback_info (CPXCENVptr cpx_env, void *cbdata, int wherefrom, int which_info, info_type *result_p, const char *query_description)
 Gets callback info of a particular type from a user-written callback. More...
 
Optimization callback implementations.

These are optimization callbacks that implement certain Relaxation methods.

Variables

constexpr double CPXzero = 1E-10
 
constexpr double CPXint_tol = 0.0001
 

Detailed Description

Manners related to LP relaxations and solver interfaces.

Enumeration Type Documentation

Variable basis statuses.

Enumerator
AtLower 

Non-basic and at lower bound.

Basic 

Basic variable.

AtUpper 

Non-basic and at upper bound.

FreeSuper 

Free variable.

enum CMR::LP::PivType
strong

Enum class for categorizing lp solutions.

Enumerator
Frac 

Fractional solution.

Subtour 

Integral subtour.

Tour 

A new or augmented tour.

FathomedTour 

A tour with a dual feasible basis in the current lp.

enum CMR::LP::SolStat
strong

Enum class for categorizing solution statuses.

Enumerator
Optimal 

Optimal solution.

Infeas 

Model proved infeasible.

Abort 

Solution aborted due to external limit.

Function Documentation

template<typename info_type >
void CMR::LP::get_callback_info ( CPXCENVptr  cpx_env,
void *  cbdata,
int  wherefrom,
int  which_info,
info_type *  result_p,
const char *  query_description 
)

Gets callback info of a particular type from a user-written callback.

Template Parameters
info_typethe data type of the info to be returned. See CPXgetcallbackinfo documentation for more info.
template<typename cplex_query >
std::vector<double> CMR::LP::info_vec ( cplex_query  F,
const char *  Fname,
const CPXENVptr  cplex_env,
const CPXLPptr  cplex_lp,
int  begin,
int  end 
)

Template for getting a ranged result vector from CPLEX.

Template Parameters
cplex_querythe function type of the query.
Parameters
Fthe function to call.
Fnamethe function name, if an error message needs to be printed.
Returns
a vector obtained by calling F to obtain info for the range begin to end.