mt_T2.h

Go to the documentation of this file.
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_T2_H__
00025 #define __MT_T2_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 compute the best cuts found using T2 sets as a base, where
00037  * \f[
00038 T2_n=\left\{x\in\mathbb{R}^n:
00039 \begin{matrix}
00040 R1:&-x_1 & \leq 0\\
00041 R2:& x_1-x_2 & \leq 1\\
00042 R3:& x_1+x_2-x_3 & \leq 2\\
00043 \vdots & \vdots & \vdots\\
00044 Rn:& x_1+\ldots+x_{n-1}-x_n&\leq n-1\\
00045 R(n+1):& x_1+\ldots+x_{n-1}+x_n&\leq n\\
00046 \end{matrix}\right\} \f], and where we try all possible 
00047  * \f$n!2^n\f$ reorientation of the axis and permutation of the rows.
00048  * Note that we assume that all variables are continuous, and that the tableau
00049  * represent the (vectorial) equation 
00050  * \f[\vec{x} = \vec{f}+\frac12\vec{1} +\sum\limits_{i\in I}s_i\vec{r_i}, \f]
00051  * where \f$\displaystyle\vec{x}\in\mathbb{Z}^m\f$,
00052  * \f$\displaystyle\vec{f}\in\left]-\frac12,\frac12\right[^m\f$, 
00053  * \f$\displaystyle\vec{r_i}\in\mathbb{R}^m,\forall i\in I\f$,
00054  * \f$s\displaystyle _i\in\mathbb{R}_+,\forall i\in I\f$; and where \f$\displaystyle m=\f$ nrows and
00055  * \f$\displaystyle |I|=\f$ ncols. 
00056  * @param tb tableau description to use.
00057  * @param lp description of the current node LP.
00058  * @param f fractional values asociated with the tableau.
00059  * @param work array of length at least ncols+1 to be used as working space.
00060  * @param cuth cutheap to store the best cuts found in the process
00061  * @param extcut array of length ncols to store extended cut while processing
00062  * @param cut_style if 0, produce cut for cuts derived with exactly tb->nrows 
00063  * rows, if 1, also try with smaller values up to 2.
00064  * @return zero on success, non-zero otherwise.
00065  * */
00066 int MTt2Cut(const MTrowmatrix_t*const tb, 
00067             MTlp_t*const lp, 
00068             MTcutHeap_t*const cuth,
00069             const double*const f,
00070             double*const extcut,
00071             double*const work,
00072             const int cut_style);
00073 /* ========================================================================= */
00074 /** @brief Interface for the CPLEX-callback for the #MTt2Cut function.
00075  * @param env as returned by CPXopenCPLEX function.
00076  * @param cbdata A pointer passed from the optimization routine to the
00077  * user-written callback that identifies the problem being optimized. The only 
00078  * purpose of this pointer is to pass it to the callback information routines.
00079  * @param wherefrom An integer value indicating where in the optimization this
00080  * function was called. It has the value CPX_CALLBACK_MIP_CUT.
00081  * @param cbhandle A pointer to user private data.
00082  * @param useraction_p A pointer to an integer indicating the action for ILOG
00083  * CPLEX to take at the completion
00084  * of the user callback. The table summarizes possible actions.
00085  * - 0 CPX_CALLBACK_DEFAULT Use cuts as added
00086  * - 1 CPX_CALLBACK_FAIL Exit optimization
00087  * - 2 CPX_CALLBACK_SET Use cuts as added
00088  * */
00089 int MTt2_ccbk(CPXCENVptr env,
00090               void*cbdata,
00091               int wherefrom,
00092               void*cbhandle,
00093               int*useraction_p);
00094 /** @} */
00095 /* end of mt_T2.h */
00096 /* ========================================================================= */
00097 #endif
00098 

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