mt_gomory.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 
00025 /** @defgroup MTgomory Multiple Tableau Gomory Cuts
00026  *
00027  * This code present an implementation of some of the ideas on generating cuts
00028  * from multiple tableau rows at once. It has a basic cut-separation code, and
00029  * a cut-callback implementation for CPLEX */
00030 
00031 /* ========================================================================= */
00032 /** @mainpage MTgomory Home Page
00033  *
00034  * @section Introduction
00035 <P>The bleding edge of this code can be found at <A HREF=https://conexo.dii.uchile.cl/SVN/COding/trunk/MTgomory TARGET=_top>this direction</A>.</P>
00036 <P>A stable version can be found at <A HREF=https://conexo.dii.uchile.cl/SOurce/MTgomory.tar.bz2 TARGET=_top>this direction</A>.</P>
00037  */
00038 
00039 /* ========================================================================= */
00040 /** @file 
00041  * @ingroup MTgomory */
00042 /** @addtogroup MTgomory */
00043 /** @{ */
00044 #ifndef __MT_GOMORY_H__
00045 #define __MT_GOMORY_H__
00046 
00047 /* ========================================================================= */
00048 /** @brief Version String of the program */
00049 extern const char MTversion[1024];
00050 
00051 /* ========================================================================= */
00052 /** @brief Given a set of tableau rows in column format, return the asociated
00053  * multi-tableau gomory cut.
00054  * Note that we assume that all variables are continuous, and that the tableau
00055  * represent the (vectorial) equation 
00056  * \f[\vec{x} = \vec{f}+\frac12\vec{1} +\sum\limits_{i\in I}s_i\vec{r_i}, \f]
00057  * where \f$\displaystyle\vec{x}\in\mathbb{Z}^m\f$,
00058  * \f$\displaystyle\vec{f}\in\left]-\frac12,\frac12\right[^m\f$, 
00059  * \f$\displaystyle\vec{r_i}\in\mathbb{R}^m,\forall i\in I\f$,
00060  * \f$s\displaystyle _i\in\mathbb{R}_+,\forall i\in I\f$; and where \f$\displaystyle m=\f$ nrows and
00061  * \f$\displaystyle |I|=\f$ ncols. 
00062  * The returned constraint is \f$\displaystyle \sum\limits_{i\in I}s_ib_i\geq 1\f$ where
00063  * \f$ \displaystyle b_i=\f$ cutval[i], \f$\displaystyle \forall i\in I\f$. And
00064  * where the set used to cut is \f$\displaystyle L=\left\{x:c\sigma x\leq c_o
00065  * ,\forall\sigma\in\mathrm{diag}\left(\{-1,1\}^{m}\right)\right\}\f$ and \f$\displaystyle
00066  * c=\f$ base, \f$\displaystyle c_o = \frac12\sum\limits_{i=1}^mc_i\f$, where we assume that \f$c_i\neq 0\forall i=1,\ldots,m\f$.
00067  * Finally, note that \f$\displaystyle b_i=\max\limits_{\sigma:c\sigma r_i>0}\left\{\frac{c\sigma r_i}{c_o-c\sigma f}\right\}\f$.
00068  * @param nrows number of rows in the tableau description
00069  * @param ncols number of variables in the tableau description
00070  * @param rowval array of values of the tableau.
00071  * @param rowind array of column-indices for the corresponding value in rowval.
00072  * @param rowbeg array of length nrows+1 storing the position in which position
00073  * of rowval the j-th row non-zero coefficient beggins, and in position
00074  * nrows it is stored the number of non-zeros in the description.
00075  * @param f fractional value asociated to the tableau.
00076  * @param cutval array of length ncols storing the coefficient for each
00077  * variable in the cut (the array is assumed to have length at least ncols).
00078  * @param base array of length nrows, where each part coefficient is assumed to
00079  * be non-zero.
00080  * @param work array of length at least ncols+1 to be used as working space.
00081  * @return zero on succes, non-zero otherwise.
00082  * */
00083 int MTgomoryCut(const int nrows, 
00084                 const int ncols,
00085                 const double*const rowval,
00086                 const int*const rowind,
00087                 const int*const rowbeg,
00088                 const double*const f,
00089                 const double*const base,
00090                 double*const cutval,
00091                 double*const work);
00092 
00093 /* ========================================================================= */
00094 /** @brief verbose level for the module */
00095 #define MT_VERB_LVL 100
00096 
00097 /* ========================================================================= */
00098 /** @brief debug level for the module */
00099 #define MT_DEBUG_LVL 100
00100 
00101 /* ========================================================================= */
00102 /** @brief tolerance level for zero, i.e. all absolute values bellow 
00103  * #MT_ZERO_TOL are considered as zero. */
00104 #define MT_ZERO_TOL 0x1p-20
00105 
00106 /* ========================================================================= */
00107 /** @} */
00108 /* end of mt_gomory.h */
00109 #endif

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