Dip  0.92.4
MCF_DecompApp.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the Decomp Solver Framework. //
3 // //
4 // Decomp is distributed under the Common Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Authors: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // Ted Ralphs, Lehigh University (ted@lehigh.edu) //
9 // Jiadong Wang, Lehigh University (jiw408@lehigh.edu) //
10 // //
11 // Copyright (C) 2002-2019, Lehigh University, Matthew Galati, and Ted Ralphs//
12 // All Rights Reserved. //
13 //===========================================================================//
14 
15 #ifndef MCF_DECOMPAPP_INCLUDED
16 #define MCF_DECOMPAPP_INCLUDED
17 
18 //===========================================================================//
19 #include "DecompApp.h"
20 
21 //===========================================================================//
22 #include "MCF_Instance.h"
23 #include "MCF_Param.h"
24 //===========================================================================//
25 
26 //===========================================================================//
37 //===========================================================================//
38 class MCF_DecompApp : public DecompApp {
39 private:
41  const string m_classTag;
42 
45 
48 
50  double* objective;
51 
53  vector<DecompConstraintSet*> m_models;
54 
57 
58 public:
63  void initializeApp();
64 
65  /* Create models. */
66  void createModels();
69  int commId);
71  int commId);
72 
73 public:
78  DecompApp (utilParam),
79  m_classTag ("MCF-APP"),
80  objective ( NULL ),
81  modelRelax ( NULL ),
82  modelCore ( NULL )
83  {
84  //---
85  //--- get application parameters
86  //---
87  m_appParam.getSettings(utilParam);
88 
89  if (m_appParam.LogLevel >= 1) {
91  }
92 
93  initializeApp();
94  }
95 
96  virtual ~MCF_DecompApp() {
100  };
101 };
102 
103 #endif
void UtilDeleteVectorPtr(vector< T * > &vectorPtr, typename vector< T * >::iterator first, typename vector< T * >::iterator last)
Definition: UtilMacros.h:288
void createModelCore(DecompConstraintSet *model)
Initialize application.
MCF_Param m_appParam
Application specific parameters.
Definition: MCF_DecompApp.h:44
void createModelRelaxSparse(DecompConstraintSet *model, int commId)
Initialize application.
const string m_classTag
Class id tag (for log / debugging).
Definition: MCF_DecompApp.h:41
int LogLevel
Definition: MCF_Param.h:34
#define UTIL_DELARR(x)
Definition: UtilMacros.h:29
void getSettings(UtilParameters &utilParam)
Definition: MCF_Param.h:40
std::ostream * m_osLog
Log file.
Definition: DecompApp.h:60
MCF_DecompApp(UtilParameters &utilParam)
Default constructor.
Definition: MCF_DecompApp.h:77
DecompConstraintSet * modelCore
Definition: MCF_DecompApp.h:56
MCF_Instance m_instance
MCF problem instance data.
Definition: MCF_DecompApp.h:47
void createModelRelax(DecompConstraintSet *model, int commId)
Initialize application.
double * objective
The model objective coefficients (original space).
Definition: MCF_DecompApp.h:50
DecompConstraintSet * modelRelax
Definition: MCF_DecompApp.h:55
#define UTIL_DELPTR(x)
Definition: UtilMacros.h:28
vector< DecompConstraintSet * > m_models
Model constraint systems.
Definition: MCF_DecompApp.h:53
void createModels()
Initialize application.
void dumpSettings(ostream *os=&cout)
Definition: MCF_Param.h:57
void initializeApp()
Initialize application.
virtual ~MCF_DecompApp()
Default constructor.
Definition: MCF_DecompApp.h:96
The main application class.
Definition: DecompApp.h:48