DecompAlgoD.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 #ifndef DECOMP_ALGOD_INCLUDED
00014 #define DECOMP_ALGOD_INCLUDED
00015 
00016 #include "DecompAlgoPC.h"
00017 
00018 class DecompApp;
00019 
00020 //?? this should probably be a base class for different stablization methods
00021 // --------------------------------------------------------------------- //
00022 //derive from DecompAlgo or DecompAlgoPC?? THINK
00023 class DecompAlgoD : public DecompAlgo {
00024 private:
00025    DecompAlgoD(const DecompAlgoD&);
00026    DecompAlgoD& operator=(const DecompAlgoD&);
00027 
00028 private:
00029    static const char* classTag;
00030    double*             m_xhatD;
00031    DecompCutList*      m_newCuts;
00032 
00033 public:
00034    void solveD(DecompCutList* newCuts) {
00035       m_newCuts = newCuts;
00036       //need to change parameters to price, no cut
00037       m_app->m_param.LimitTotalCutIters = 0;
00038       m_app->m_param.LimitRoundCutIters = 0;
00039       m_app->m_param.LimitTotalPriceIters = 1000;
00040       m_app->m_param.LimitRoundPriceIters = 1000;
00041       DecompAlgo::solve();
00042    }
00043 
00044    //inherited (from pure virtual) methods
00045    void createMasterProblem(DecompVarList& initVars);
00046 
00047    decompPhase phaseUpdate(const decompPhase   phase,
00048                            const decompStat    stat,
00049                            int&                n_newCuts,
00050                            int&                n_newVars,
00051                            int&                n_cutCalls,
00052                            int&                n_priceCalls);
00053    decompPhase phaseUpdate(const decompPhase   phase,
00054                            const decompStat    stat);
00055 
00056    //=PO
00057    void recomposeSolution(const double* solution,
00058                           double*        rsolution);
00059 
00060 
00061 public:
00062    //can pass this all in... to save time, and since we might
00063    //do francois idea of tightening P' as we go...
00064    //              DecompConstraintSet * m_modelRelax)
00065    DecompAlgoD(DecompApp*            app,
00066                double*               xhat,
00067                int                   numOrigCols) :
00068       DecompAlgo(DECOMP, app),
00069       m_newCuts(0) {
00070       //that would change them all
00071       //m_app->m_decompParam.CutIters = 0;
00072       m_xhatD = xhat;
00073       m_numOrigCols = numOrigCols;
00074    };
00075    ~DecompAlgoD() {};
00076 };
00077 
00078 #endif

Generated on 3 Jun 2015 for Dip-All by  doxygen 1.6.1