DecompAlgoRC.h

Go to the documentation of this file.
00001 //===========================================================================//
00002 // This file is part of the Decomp Solver Framework.                         //
00003 //                                                                           //
00004 // Decomp is distributed under the Common Public License as part of the      //
00005 // COIN-OR repository (http://www.coin-or.org).                              //
00006 //                                                                           //
00007 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com)       //
00008 //                                                                           //
00009 // Copyright (C) 2002-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
00010 // All Rights Reserved.                                                      //
00011 //===========================================================================//
00012 
00013 /*-----------------------------------------------------------------------*/
00014 /* Author: Matthew Galati (magh@lehigh.edu)                              */
00015 /*                                                                       */
00016 /* (c) Copyright 2004 Lehigh University. All Rights Reserved.            */
00017 /*                                                                       */
00018 /* This software is licensed under the Common Public License. Please see */
00019 /* accompanying file for terms.                                          */
00020 /*-----------------------------------------------------------------------*/
00021 
00022 #ifndef DECOMP_ALGORC_INCLUDED
00023 #define DECOMP_ALGORC_INCLUDED
00024 
00025 #include "DecompAlgo.h"
00026 
00027 class DecompApp;
00028 // --------------------------------------------------------------------- //
00029 class DecompAlgoRC : public DecompAlgo {
00030 private:
00031    DecompAlgoRC(const DecompAlgoRC&);
00032    DecompAlgoRC& operator=(const DecompAlgoRC&);
00033 
00034 private:
00035    static const char* m_classTag;
00036 
00037 private:
00038    vector<double>   m_u;   //dual vector
00039    double*          m_rc;  //reduced cost
00040    double           m_UB;  //current best upper bound
00041    double           m_LB;  //current best lower bound
00042 
00043    int              m_cntSameLB;
00044    int              m_iter;
00045    double           m_step;
00046    bool             m_zeroSub;
00047 
00048    DecompVar*       m_shatVar;
00049    //double         * m_shat;
00050 
00051 public:
00052    //inherited (from pure virtual) methods
00053    void createMasterProblem(DecompVarList& initVars);
00054    decompStat solutionUpdate(const decompPhase phase,
00055                              const int         maxInnerIter,
00056                              const int         maxOuterIter);
00057    //void addCutsToPool(const double  *  x,
00058    //                   DecompCutList & newCuts,
00059    //                   int           & n_newCuts) {assert(0);};
00060    int addCutsFromPool();
00061    int generateVars(const decompStat   stat,
00062                     DecompVarList&     newVars,
00063                     double&            mostNegReducedCost);
00064 
00065    bool isDone();
00066 
00067    const double* getRowPrice() const {
00068       return &m_u[0];
00069    }
00070 
00071 public:
00072    DecompAlgoRC(DecompApp* app)
00073       : DecompAlgo(RELAX_AND_CUT, app),
00074         m_u(),
00075         m_rc(0),
00076         m_UB(DecompInf),
00077         m_LB(-DecompInf),
00078         m_cntSameLB(0),
00079         m_iter(0),
00080         m_step(2.0), //(0, 2] param?
00081         m_zeroSub(false),
00082         m_shatVar(0)
00083         //m_shat(0)
00084    {};
00085    ~DecompAlgoRC() {
00086       UTIL_DELARR(m_rc);
00087    };
00088 };
00089 
00090 #endif

Generated on 5 Apr 2015 for Dip-All by  doxygen 1.6.1