Dip  0.92.4
MILPBlock_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 MILPBLOCK_DECOMPAPP_INCLUDED
16 #define MILPBLOCK_DECOMPAPP_INCLUDED
17 
18 //===========================================================================//
19 #include "DecompApp.h"
20 #include "MILPBlock_Param.h"
21 //===========================================================================//
22 #include "CoinMpsIO.hpp"
23 //===========================================================================//
24 
32 //===========================================================================//
34 private:
36  const string m_classTag;
37 
40 
43 
45  double * m_objective;
46 
49  map<int, DecompConstraintSet*> m_modelR;
50 
52  map<int, vector<int> > m_blocks;
53 
54 private:
55 
56  /* @name Inherited (from virtual) methods. */
57 
59  virtual int generateInitVars(DecompVarList & initVars);
60 
64  void initializeApp();
65 
67  void createModels();
68  DecompConstraintSet * createModelPart(const int nRowsPart,
69  const int * rowsPart);
71  const int nRowsPart,
72  const int * rowsPart);
74  const int nRowsPart,
75  const int * rowsPart);
76  void createModelMasterOnlys(vector<int> & masterOnlyCols);
77  void readInitSolutionFile(DecompVarList & initVars);
78 
79 
81  void readBlockFile();
82 
84  void findActiveColumns(const vector<int> & rowsPart,
85  set<int> & activeColsSet);
86 
87 public:
91  const string getInstanceName(){
92  return m_appParam.Instance;
93  }
94 
95 public:
98  DecompApp (utilParam),
99  m_classTag ("MILPB-APP"),
100  m_objective(NULL)
101  {
102  m_appParam.getSettings(utilParam);
103 
104  if (m_appParam.LogLevel >= 1) {
106  }
107 
108  initializeApp(); //can there be a default?
109  }
110 
115  }
116 };
117 
118 #endif
DecompConstraintSet * createModelPart(const int nRowsPart, const int *rowsPart)
Initialize application.
const string getInstanceName()
User access methods.
void createModels()
Create model parts.
void findActiveColumns(const vector< int > &rowsPart, set< int > &activeColsSet)
Find the active columns for some block.
#define UTIL_DELARR(x)
Definition: UtilMacros.h:29
virtual int generateInitVars(DecompVarList &initVars)
Generate init columns.
CoinMpsIO m_mpsIO
MPS object for reading MILPBlock instances.
void readBlockFile()
Read block file.
map< int, vector< int > > m_blocks
Definition of blocks (by rows).
void createModelPartSparse(DecompConstraintSet *model, const int nRowsPart, const int *rowsPart)
Initialize application.
map< int, DecompConstraintSet * > m_modelR
void getSettings(UtilParameters &utilParam)
void initializeApp()
Initialize application.
MILPBlock_DecompApp(UtilParameters &utilParam)
void dumpSettings(ostream *os=&cout)
MILPBlock_Param m_appParam
Application specific parameters.
const string m_classTag
Class id tag (for log / debugging).
#define UTIL_DELPTR(x)
Definition: UtilMacros.h:28
void createModelMasterOnlys(vector< int > &masterOnlyCols)
Initialize application.
double * m_objective
The model objective coefficients (original space).
void readInitSolutionFile(DecompVarList &initVars)
Initialize application.
DecompConstraintSet * m_modelC
The model constraint systems used for different algos.
std::list< DecompVar * > DecompVarList
Definition: Decomp.h:91
void UtilDeleteMapPtr(std::map< S, T * > &mapPtr, typename std::map< S, T * >::iterator first, typename std::map< S, T * >::iterator last)
Definition: UtilMacros.h:651
MPS IO Interface.
Definition: CoinMpsIO.hpp:401
The main application class.
Definition: DecompApp.h:48