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&);
32  DecompAlgoRC& operator=(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 
48  DecompVar* m_shatVar;
49  //double * m_shat;
50 
51 public:
52  //inherited (from pure virtual) methods
53  void createMasterProblem(DecompVarList& initVars);
54  decompStat solutionUpdate(const decompPhase phase,
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  {};
86  UTIL_DELARR(m_rc);
87  };
88 };
89 
90 #endif
#define UTIL_DELARR(x)
Definition: UtilMacros.h:29
const double * getRowPrice() const
Definition: DecompAlgoRC.h:67
std::list< DecompVar * > DecompVarList
Definition: Decomp.h:91
decompStat
DecompAlgoRC(DecompApp *app)
Definition: DecompAlgoRC.h:72
decompPhase
The main application class.
Definition: DecompApp.h:48
Base class for DECOMP algorithms.
Definition: DecompAlgo.h:62