Dip  0.92.4
DecompAlgoC.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 #ifndef DECOMP_ALGOC_INCLUDED
15 #define DECOMP_ALGOC_INCLUDED
16 
17 #include "DecompAlgo.h"
18 
19 class DecompApp;
20 // --------------------------------------------------------------------- //
21 class DecompAlgoC : public DecompAlgo {
22 private:
23  DecompAlgoC(const DecompAlgoC&);
25 
26 private:
27  static const char* m_classTag;
28 
29 public:
30  //inherited (from pure virtual) methods
31  void createMasterProblem(DecompVarList& initVars);
32  void recomposeSolution(const double* solution,
33  double* rsolution);
35  printf("\ncut generateInitVars do nothing");
36  return 0;
37  }
38 
39  int generateVars(const decompStat stat,
40  DecompVarList& newVars,
41  double& mostNegReducedCost) {
42  assert(0);
43  return 0;
44  }
46  const decompStat stat);
47 #if 0
49  const int maxInnerIter,
50  const int maxOuterIter);
51 
53  const decompStat stat,
54  int& n_newCuts,
55  int& n_newVars,
56  int& n_cutCalls,
57  int& n_priceCalls);
58 #endif
59 
60  //from virtual
61  int branch(int branchedOnIndex,
62  double branchedOnValue);
63 
64 public:
65  //THINK: really DecompAlgoC should override param PriceIter = 0
66  //because if user accidently does not do this, will cause errors
68  : DecompAlgo(CUT, app) {};
70 };
71 
72 #endif
void phaseUpdate(DecompPhase &phase, DecompStatus &status)
Update of the phase for process loop.
DecompAlgoC & operator=(const DecompAlgoC &)
Disable copy constructors.
static const char * m_classTag
Definition: DecompAlgoC.h:27
void createMasterProblem(DecompVarList &initVars)
Create the master problem (all algorithms must define this function).
int generateInitVars(DecompVarList &initVars)
Generate initial variables for master problem (PC/DC/RC).
Definition: DecompAlgoC.h:34
int generateVars(const decompStat stat, DecompVarList &newVars, double &mostNegReducedCost)
Definition: DecompAlgoC.h:39
DecompAlgoC(const DecompAlgoC &)
Disable copy constructors.
decompPhase
void recomposeSolution(const double *solution, double *rsolution)
Compose solution in x-space from current space.
Class for DECOMP algorithm Cutting Plane Method.
Definition: DecompAlgoC.h:33
decompStat
DecompAlgoC(DecompApp *app)
Definition: DecompAlgoC.h:67
virtual DecompStatus solutionUpdate(const DecompPhase phase, const bool resolve=true, const int maxInnerIter=COIN_INT_MAX, const int maxOuterIter=COIN_INT_MAX)
Update of the solution vectors (primal and/or dual).
int branch(int branchedOnIndex, double branchedOnValue)
Base class for DECOMP algorithms.
Definition: DecompAlgo.h:62
std::list< DecompVar * > DecompVarList
Definition: Decomp.h:91
The main application class.
Definition: DecompApp.h:48
Definition: Decomp.h:124