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, Lehigh University // 00008 // // 00009 // Copyright (C) 2002-2009, Lehigh University, Matthew Galati, and Ted Ralphs// 00010 // All Rights Reserved. // 00011 //===========================================================================// 00012 00013 #ifndef MCF_DECOMPAPP_INCLUDED 00014 #define MCF_DECOMPAPP_INCLUDED 00015 00016 //===========================================================================// 00017 #include "DecompApp.h" 00018 00019 //===========================================================================// 00020 #include "SDPUC_Instance.h" 00021 #include "SDPUC_Param.h" 00022 //===========================================================================// 00023 00024 //===========================================================================// 00035 //===========================================================================// 00036 class SDPUC_DecompApp : public DecompApp { 00037 private: 00039 const string m_classTag; 00040 00042 SDPUC_Param m_appParam; 00043 00045 SDPUC_Instance m_instance; 00046 00048 double * m_objective; 00049 00051 vector<DecompConstraintSet*> m_models; 00052 00053 public: 00057 void initializeApp(UtilParameters & utilParam); 00058 00059 /* Create models. */ 00060 void createModels(); 00061 void createModelCore(DecompConstraintSet * model); 00062 void createModelRelax(DecompConstraintSet * model, 00063 int commId); 00064 void createModelRelaxSparse(DecompConstraintSet * model, 00065 int commId); 00066 void createModelMasterOnlys(vector<int> & masterOnlyCols); 00067 00068 /* Initialise solution */ 00069 DecompSolution createInitialSolution(); 00070 00071 /* Get Instance */ 00072 SDPUC_Instance & getInstance() {return m_instance;} 00073 /* Get Objective */ 00074 double * getObjective() {return m_objective;} 00075 00076 public: 00080 SDPUC_DecompApp(UtilParameters & utilParam) : 00081 DecompApp (utilParam), 00082 m_classTag ("SDPUC-APP"), 00083 m_objective (NULL) 00084 { 00085 initializeApp(utilParam); 00086 } 00087 00088 virtual ~SDPUC_DecompApp() { 00089 UTIL_DELARR(m_objective); 00090 UtilDeleteVectorPtr(m_models); 00091 }; 00092 }; 00093 00094 #endif