Dip  0.92.4
DecompAlgoRC.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 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // //
9 // Copyright (C) 2002-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
10 // All Rights Reserved. //
11 //===========================================================================//
12 
13 /*-----------------------------------------------------------------------*/
14 /* Author: Matthew Galati (magh@lehigh.edu) */
15 /* */
16 /* (c) Copyright 2004 Lehigh University. All Rights Reserved. */
17 /* */
18 /* This software is licensed under the Common Public License. Please see */
19 /* accompanying file for terms. */
20 /*-----------------------------------------------------------------------*/
21 
22 #ifndef DECOMP_ALGORC_INCLUDED
23 #define DECOMP_ALGORC_INCLUDED
24 
25 #include "DecompAlgo.h"
26 
27 class DecompApp;
28 // --------------------------------------------------------------------- //
29 class DecompAlgoRC : public DecompAlgo {
30 private:
31  DecompAlgoRC(const DecompAlgoRC&);
33 
34 private:
35  static const char* m_classTag;
36 
37 private:
38  vector<double> m_u; //dual vector
39  double* m_rc; //reduced cost
40  double m_UB; //current best upper bound
41  double m_LB; //current best lower bound
42 
43  int m_cntSameLB;
44  int m_iter;
45  double m_step;
46  bool m_zeroSub;
47 
49  //double * m_shat;
50 
51 public:
52  //inherited (from pure virtual) methods
53  void createMasterProblem(DecompVarList& initVars);
55  const int maxInnerIter,
56  const int maxOuterIter);
57  //void addCutsToPool(const double * x,
58  // DecompCutList & newCuts,
59  // int & n_newCuts) {assert(0);};
60  int addCutsFromPool();
61  int generateVars(const decompStat stat,
62  DecompVarList& newVars,
63  double& mostNegReducedCost);
64 
65  bool isDone();
66 
67  const double* getRowPrice() const {
68  return &m_u[0];
69  }
70 
71 public:
73  : DecompAlgo(RELAX_AND_CUT, app),
74  m_u(),
75  m_rc(0),
76  m_UB(DecompInf),
77  m_LB(-DecompInf),
78  m_cntSameLB(0),
79  m_iter(0),
80  m_step(2.0), //(0, 2] param?
81  m_zeroSub(false),
82  m_shatVar(0)
83  //m_shat(0)
84  {};
87  };
88 };
89 
90 #endif
const double * getRowPrice() const
Definition: DecompAlgoRC.h:67
std::vector< double > m_u
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:39
double m_UB
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:42
#define UTIL_DELARR(x)
Definition: UtilMacros.h:29
DecompVar m_shatVar
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:50
decompPhase
DecompAlgoRC & operator=(const DecompAlgoRC &)
Disable copy constructors.
DecompAlgoRC(DecompApp *app)
Definition: DecompAlgoRC.h:72
int addCutsFromPool()
Run the initial phase for processing node.
DecompAlgoRC(const DecompAlgoRC &)
Disable copy constructors.
int generateVars(DecompVarList &newVars, double &mostNegReducedCost)
Run the initial phase for processing node.
decompStat
int m_iter
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:46
void createMasterProblem(DecompVarList &initVars)
Create the master problem (all algorithms must define this function).
double * m_rc
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:40
vector< double > m_u
Definition: DecompAlgoRC.h:38
double m_step
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:47
DecompStatus solutionUpdate(const DecompPhase phase, const int maxInnerIter, const int maxOuterIter)
Run the initial phase for processing node.
Base class for DECOMP algorithms.
Definition: DecompAlgo.h:62
double m_LB
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:43
bool m_zeroSub
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:48
int m_cntSameLB
Store the name of the class (for logging/debugging) - &quot;who am I?&quot;.
Definition: DecompAlgoRC.h:45
static const char * m_classTag
Definition: DecompAlgoRC.h:35
std::list< DecompVar * > DecompVarList
Definition: Decomp.h:91
The main application class.
Definition: DecompApp.h:48
DecompVar * m_shatVar
Definition: DecompAlgoRC.h:48