00001 /* MTgomory "multi tableau gomory cut" provides an implementation for gomory 00002 * cuts derived from multiple tableau rows in the spirit of the work of 00003 * Andersen et al (IPCO 2007), Cornuejols (es presented in George Nemhauser 00004 * Birthday Conference in Atlanta 2007) and Gomory (presented in the same 00005 * conference). 00006 * 00007 * Copyright (C) 2007 Daniel Espinoza. 00008 * 00009 * This library is free software; you can redistribute it and/or modify it 00010 * under the terms of the GNU Lesser General Public License as published by the 00011 * Free Software Foundation; either version 2.1 of the License, or (at your 00012 * option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, but 00015 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00016 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00017 * License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public License 00020 * along with this library; if not, write to the Free Software Foundation, 00021 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00022 * */ 00023 /* ========================================================================= */ 00024 #ifndef __MT_SL_H__ 00025 #define __MT_SL_H__ 00026 #include "EGlib.h" 00027 #include "mt_gomory.h" 00028 #include "mt_cplex_cbk.h" 00029 #include "mt_cutpool.h" 00030 #include "mt_tableau.h" 00031 /** @file 00032 * @ingroup MTgomory */ 00033 /** @addtogroup MTgomory */ 00034 /** @{ */ 00035 /* ========================================================================= */ 00036 /** @brief The idea of these cuts is to use some ideas from the paper ``On the 00037 * relative strengt of split, triangle and cuadrilateral cuts'' from Cornuejols 00038 * et. al. The main point is that splits are bad (compared against triangles or 00039 * quadrilaterals) whenever we have (an almost) integer part in \f$f_i\f$ for 00040 * some coordiante \f$i\f$, and a wide base, this can be seen on the following 00041 * figure: 00042 * \f$ 00043 * \hspace*{\textwidth} 00044 * \vspace*{2in} 00045 * x_1 = 1 00046 \psset{arrows=->,fillstyle=solid,fillcolor=black,linecolor=black} 00047 \begin{pspicture}(0,0)(5,3) 00048 \multido{\i=0+1}{6}{{ \pscircle(\i,0){1mm} }} 00049 \multido{\i=0+1}{6}{{ \pscircle(\i,1){1mm} }} 00050 \multido{\i=0+1}{6}{{ \pscircle(\i,2){1mm} }} 00051 \multido{\i=0+1}{6}{{ \pscircle(\i,3){1mm} }} 00052 \rput(2.5,2){$f$} 00053 \psline(2.5,2)(0,.5)\nbput{$r_1$} 00054 \psline(2.5,2)(4,1)\nbput{$r_2$} 00055 \psline[arrows=|-|](1,1)(4,1)\nbput{M} 00056 \end{pspicture} 00057 \f$ 00058 * @param data calback data, we assume that the solution and lp has already 00059 * been loaded into the structure. 00060 * @param env CPLEX environment 00061 * @param lp CPLEX lp pointer to the current LP 00062 * @return zero on success, non-zero otherwise. 00063 * */ 00064 int MTslCut( 00065 MTgomory_ccbk_t*const data, 00066 CPXCENVptr env, 00067 CPXLPptr lp); 00068 /* ========================================================================= */ 00069 /** @brief Interface for the CPLEX-callback for the #MTt1Cut function. 00070 * @param env as returned by CPXopenCPLEX function. 00071 * @param cbdata A pointer passed from the optimization routine to the 00072 * user-written callback that identifies the problem being optimized. The only 00073 * purpose of this pointer is to pass it to the callback information routines. 00074 * @param wherefrom An integer value indicating where in the optimization this 00075 * function was called. It has the value CPX_CALLBACK_MIP_CUT. 00076 * @param cbhandle A pointer to user private data. 00077 * @param useraction_p A pointer to an integer indicating the action for ILOG 00078 * CPLEX to take at the completion 00079 * of the user callback. The table summarizes possible actions. 00080 * - 0 CPX_CALLBACK_DEFAULT Use cuts as added 00081 * - 1 CPX_CALLBACK_FAIL Exit optimization 00082 * - 2 CPX_CALLBACK_SET Use cuts as added 00083 * */ 00084 int MTsl_ccbk(CPXCENVptr env, 00085 void*cbdata, 00086 int wherefrom, 00087 void*cbhandle, 00088 int*useraction_p); 00089 /** @} */ 00090 /* end of mt_SL.h */ 00091 /* ========================================================================= */ 00092 #endif 00093