Dip  0.92.4
SDPUC_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 "SDPUC_Instance.h"
23 #include "SDPUC_Param.h"
24 //===========================================================================//
25 
26 //===========================================================================//
37 //===========================================================================//
38 class SDPUC_DecompApp : public DecompApp {
39 private:
41  const string m_classTag;
42 
45 
48 
50  double * m_objective;
51 
53  vector<DecompConstraintSet*> m_models;
54 
55 public:
59  void initializeApp();
60 
61  /* Create models. */
62  void createModels();
65  int commId);
67  int commId);
68  void createModelMasterOnlys(vector<int> & masterOnlyCols);
69 
70  /* Initialise solution */
72 
73  /* Get Instance */
75  /* Get Objective */
76  double * getObjective() {return m_objective;}
77 
78 public:
83  DecompApp (utilParam),
84  m_classTag ("SDPUC-APP"),
85  m_objective (NULL)
86  {
87  //---
88  //--- get application parameters
89  //---
90  m_appParam.getSettings(utilParam);
91  if(m_appParam.LogLevel >= 1)
93 
94  initializeApp();
95  }
96 
97  virtual ~SDPUC_DecompApp() {
100  };
101 };
102 
103 #endif
void createModelMasterOnlys(vector< int > &masterOnlyCols)
Initialize application.
void UtilDeleteVectorPtr(vector< T * > &vectorPtr, typename vector< T * >::iterator first, typename vector< T * >::iterator last)
Definition: UtilMacros.h:288
void createModelRelax(DecompConstraintSet *model, int commId)
Initialize application.
void dumpSettings(ostream *os=&cout)
Definition: SDPUC_Param.h:55
#define UTIL_DELARR(x)
Definition: UtilMacros.h:29
void getSettings(UtilParameters &utilParam)
Definition: SDPUC_Param.h:40
double * getObjective()
Initialize application.
void createModelCore(DecompConstraintSet *model)
Initialize application.
virtual ~SDPUC_DecompApp()
Default constructor.
void createModels()
Initialize application.
SDPUC_Instance m_instance
SDPUC problem instance data.
void createModelRelaxSparse(DecompConstraintSet *model, int commId)
Initialize application.
void initializeApp()
Initialize application.
const string m_classTag
Class id tag (for log / debugging).
SDPUC_Param m_appParam
Application specific parameters.
SDPUC_Instance & getInstance()
Initialize application.
vector< DecompConstraintSet * > m_models
Model constraint systems.
SDPUC_DecompApp(UtilParameters &utilParam)
Default constructor.
double * m_objective
The model objective coefficients (original space).
DecompSolution createInitialSolution()
Initialize application.
The main application class.
Definition: DecompApp.h:48