mt_cplex_cbk.h File Reference


Detailed Description

Definition in file mt_cplex_cbk.h.

#include "cplex.h"
#include "EGlib.h"
#include "mt_types.h"
#include "mt_cutpool.h"

Include dependency graph for mt_cplex_cbk.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#MTccbk_info_t set/get functions

#define MTcbkiSetCuts(__cbki, __val)   ((__cbki)->use_cuts=(__val))
#define MTcbkiSetCutsAtRoot(__cbki, __val)   ((__cbki)->root_only=(__val))
#define MTcbkiSetCutStyle(__cbki, __val)   ((__cbki)->cut_style=(__val))
#define MTcbkiSetMaxNodeCuts(__cbki, __val)   ((__cbki)->max_cuts=(size_t)(__val))
#define MTcbkiSetMaxRoundCuts(__cbki, __val)   ((__cbki)->max_cpr=(__val))
#define MTcbkiSetMaxRows(__cbki, __val)   ((__cbki)->max_rows=(__val))

Profiling information for the cuts

#define MTccbk_display_sumary(__fout)
 display summary information for the call-back calls
double MTccbk_discarded_ratio
 minimum ratio of discarded inequality
double MTccbk_discarded_violation
 maximum violation of discarded inequality
int MTccbk_fail_ratio
 Number of discarded cuts because high ratio.
int MTccbk_fail_tableau_btype
 Type of basic variable for tableau is not integer.
int MTccbk_fail_tableau_coeff
 Number of discarded cuts because tableaus has wrong coefficient for basic variable.
int MTccbk_fail_tableau_frac
 Number of discarded cuts because fraction is too small.
int MTccbk_fail_tableau_nbasic
 Number of discarded cuts because tableaus has wrong number of basic variables.
int MTccbk_fail_tableau_ratio
 display summary information for the call-back calls
int MTccbk_fail_violation
 Number of discarded cuts because low violation.

#MTgomory_ccbk_t set/get functions

#define MTccbkSetCutDominance(__cbdata, __val)   MTcutHeapSetDominance((&((__cbdata)->cuth)),__val)
#define MTccbkSetCuts(__cbdata, __val)   MTcbkiSetCuts((&((__cbdata)->info)),__val)
#define MTccbkSetCutsAtRoot(__cbdata, __val)   MTcbkiSetCutsAtRoot((&((__cbdata)->info)),__val)
#define MTccbkSetCutSel(__cbdata, __val)   MTcutHeapSetCS((&((__cbdata)->cuth)),__val)
#define MTccbkSetCutStyle(__cbdata, __val)   MTcbkiSetCutStyle((&((__cbdata)->info)),__val)
#define MTccbkSetMaxNodeCuts(__cbdata, __val)   MTcbkiSetMaxNodeCuts((&((__cbdata)->info)),__val)
#define MTccbkSetMaxRoundCuts(__cbdata, __val)
#define MTccbkSetMaxRows(__cbdata, __val)   MTcbkiSetMaxRows((&((__cbdata)->info)),__val)

Defines

#define MT_CCBK_MAX_RATIO   0x1p15
 Maximum allowed cut ratio. The cut ratio is defined as the ratio between the maximum absolute value and minimum absolute value for the non-zero coefficients. It is importatn because is a measure of the error inducing capabilities of the inequality.
#define MT_CCBK_MIN_FRAC   0x1p-12
 Minimum fractionality required for a tableau to be considered, i.e. if abs(x-round(x))< min_frac we discard the asociated tableau.
#define MT_CCBK_MIN_TABLEAU_RATIO   0x1p-12
 Minimum tableau row ratio. This is defined as minabsval/maxabsval for a tableau row. Tableau rows that have a ratio bellow the given threshold will not be considered at the moment of cut genweration.
#define MT_CCBK_MIN_VIO   0x1p-10
 Minimum violation for a cut to be added. Note that we scale the cut in such a way that the maximum absolute value of a non-zero coefficient is one.
#define MT_CCBK_USE_NAMES   1
 if se to one, use real variable names while displaying cut/tableau information
#define MT_CPLEX_SENSE   'G'
#define MTccbk_info_init(__cbinf)   memset(__cbinf,0,sizeof(MTccbk_info_t))
 initialize an MTccbk_info_t structure
#define MTcplexCHECKRVALG(__env, __rval, __where)
 internal debugging information for CPLEX
#define MTgomory_ccbk_clear(__cbdata)
 free any internally allocated memory inside an MTgomory_ccbk_t structure.
#define MTgomory_ccbk_init(__cbdata)
 initialize an MTgomory_ccbk_t structure.
#define MTgomory_ccbk_rsz(__cbdata, __nrowsz, __ncolsz, __ntbsz)
 if required (i.e. __nrowsz > nrowsz || __ncolsz > colsz || __ntbsz > tbsz) , resize an MTgomory_ccbk_t structure
#define MTlp_init(__lp)   memset((__lp),0,sizeof(MTlp_t))
 initialize an MTlp_t structure
#define MTns_ccbk_clear(__ns_ccbk)
 clear any internally allocated memory within an MTns_ccbk_t structure.
#define MTns_ccbk_display(__ns_ccbk)
 Display stats in the given MTns_ccbk_t structure.
#define MTns_ccbk_init(__ns_ccbk)
 initialize an MTns_ccbk_t structure
#define MTns_ccbk_rsz(__ns_ccbk, __ncsz, __nrsz)
 resize node-solve arrays
#define MTrowmatrix_init(__mt)   memset((__mt),0,sizeof(MTrowmatrix_t))
 Initialize an MTrowmatrix_t structure too an empty matrix.
#define MTsol_init(__sol)   memset(__sol,0,sizeof(MTsol_t))
 initialize a MTsol_t structure

Functions

void MTccbk_info_display (const MTccbk_info_t *const info, FILE *out)
 display callback info
int MTccbk_info_process (MTccbk_info_t *const info, CPXCENVptr env, void *cbdata, int wherefrom, int *const action)
 test if we should proceed with the cuting process, and update information
int MTcheckTabrow (const MTlp_t *const lp, const double *tableau, int *const status, double *const ratio, int *const etnz)
 given a tableau in extended notation, verify that it is indeed a numerically stable and correct tableau.
int MTcompressTabRow (const MTlp_t *const lp, const MTsol_t *const sol, double *rowval, int *rowind, double *const rhs, int *const nz)
 given a tableau row in extended format, store it as a compresed form, it include setting row to row - integer_part[row] and updating the rhs.
void MTcompute_f (const MTlp_t *const lp, const double *const tableau, const double *const x, const double *const slack, double *const f)
 compute ax = f for a tableau
int MTcompute_fractional_vars (const MTlp_t *const lp, const double *const x, int *const fracvars, int *const nfrac, const double minitgap)
 get the indices of fractional (structural) variables
int MTcompute_integer_vars (const MTlp_t *const lp, const double *const x, int *const intvars, int *const nint, const double intgap)
 get the indices of (almost) integer variables
int MTcplex_binv_to_tableau (const MTlp_t *const lp, const double *const binvrow, double *const tableau)
 given an LP desvription, and CPLEX binvrow, compute the actual tableau (including logicals, which are in position i+ncols of the tableau for the i-th logical/slack variable, but we force that the coefficient of equality logicals is zero)
void MTcplex_display_compress_tableau (FILE *file, const MTlp_t *const lp, const double *const matval, const int *const matind, const int nz)
 display a compress tableau into the given file
void MTcplex_display_tableau (FILE *file, const MTlp_t *const lp, const double *const tableau)
 display a tableau into the given file
int MTcplex_test_cut (const MTcut_t *const cut, const MTlp_t *const lp)
 test if a given cut is valid to the given cplex LP
void MTdisplay_lp (const MTlp_t *const lp, const MTsol_t *const sol, FILE *stream)
 display an LP to the given file
int MTget_best_k_integer_tableau_rows (const MTlp_t *const lp, const MTsol_t *const sol, const int max_tableau, CPXCENVptr env, CPXLPptr CPXlp, MTrowmatrix_t *const tb, double *const f)
 Get the best K tableau (asociated to integer basic variables), note that we check for wrongly computed tableau. Note that we compute Z = f + 0.5+Ax, where A is the tableau and f the fractional value (displaced by 1/2), moreover, all basic variables have zero coefficient in the resulting tableau, and all variables are complemented to their bounds.
int MTget_best_k_tableau_rows (const MTlp_t *const lp, const MTsol_t *const sol, const int max_tableau, CPXCENVptr env, CPXLPptr CPXlp, MTrowmatrix_t *const tb, double *const f)
 Get the best K tableau (asociated to fractional variables), note that we check for wrongly computed tableau. Note that we compute Z = f + 0.5+Ax, where A is the tableau and f the fractional value (displaced by 1/2), moreover, all basic variables have zero coefficient in the resulting tableau, and all variables are complemented to their bounds.
int MTget_sol (const MTlp_t *const lp, CPXCENVptr env, CPXLPptr CPXlp, void *cbdata, int wherefrom, MTsol_t *const sol)
 obtain a solution to the current node LP
int MTgomory_ccbk (CPXCENVptr env, void *cbdata, int wherefrom, void *cbhandle, int *useraction_p)
 Interface for the CPLEX-callback for the MTgomoryCut function.
void MTlp_clear (MTlp_t *const MTlp)
 free any internally allocated memory inside an MTlp_t structure.
int MTlp_load_problem (CPXCENVptr env, MTlp_t *const lp, CPXLPptr CPXlp, void *cbdata, int wherefrom)
 Given an LP problem pointer, load it into an (initialized) MTlp_t structure.
int MTnode_solve (CPXCENVptr env, void *cbdata, int wherefrom, void *cbhandle, int *useraction_p)
 simple node solve callback, we use it to count primal degenerancy, i.e. the number of variables with zero reduced cost, this should indicate posibility of doing nested objective funcions to avoid primal degenerancy
int MTraw_to_complemented_cut (const MTlp_t *const lp, const MTsol_t *const sol, double *const extended, MTcut_t *const cut)
 transform an extened non-complemented cut to a compresed and complemented form. We assume the extended cut is of the form ax >= 1. Note that we expect no coefficient for basic variables in the cut, moreover, the rhs of the inequality is assumed to be 1 (in raw format).
int MTraw_to_uncomplemented_cut (const MTlp_t *const lp, const double *const extended, const int nactive, const int *const active, MTcut_t *const cut, int *const status)
 transform an extened non-complemented cut to a compresed for. We assume the extended cut is of the form ax >= 1.m Note that we expect no coefficient for basic variables in the cut.
int MTread_cplex_options (CPXENVptr env, FILE *inputfile)
 read optionfile and set parameter to CPLEX
void MTrowmatrix_clear (MTrowmatrix_t *const MTrm)
 free any internally allocated memory inside an MTrowmatrix_t structure.
void MTrowmatrix_rsz (MTrowmatrix_t *const MTrm, const int MTrsz, const int MTnsz)
 resize a MTrowmatrix_t structure
void MTsol_clear (MTsol_t *const MTsol)
 clear any internal memory asociated with an MTsol_t structure
void MTsol_rsz (MTsol_t *const MTsol, const int cnz, const int rnz)
 resize a solution structure
int MTuncomplemented_to_complemented_cut (const MTlp_t *const lp, const MTsol_t *const sol, MTcut_t *const cut)
 transform an uncomplemented cut to a complemented form. Note that we expect no coefficient for basic variables in the cut.

Variables

char __mt_cplex_errbuf [4096]
 internal error string for cplex


Generated on Mon Oct 26 09:16:37 2009 for MTgomory by  doxygen 1.4.6