PIPS-NLP
sTreeCallbacks.h
Go to the documentation of this file.
1 /* PIPS-IPM *
2  * Author: Cosmin G. Petra *
3  * (C) 2012 Argonne National Laboratory. See Copyright Notification. */
4 
5 #ifndef STOCH_TREE_CALLBACKS
6 #define STOCH_TREE_CALLBACKS
7 
8 #include "sTree.h"
9 #include "StochInputTree.h"
10 
16 class sTreeCallbacks : public sTree
17 {
18  public:
20  sTreeCallbacks(const std::vector<StochInputTree::StochInputNode*> &localscens);
23 
24  StochSymMatrix* createQ() const;
25  StochVector* createc() const;
26 
27  StochVector* createxlow() const;
28  StochVector* createixlow() const;
29  StochVector* createxupp() const;
30  StochVector* createixupp() const;
31 
32 
33  StochGenMatrix* createA() const;
34  StochVector* createb() const;
35 
36 
37  StochGenMatrix* createC() const;
38  StochVector* createclow() const;
39  StochVector* createiclow() const;
40  StochVector* createcupp() const;
41  StochVector* createicupp() const;
42 
43  StochVector* createCeqBody() const ;
44  StochVector* createCineqBody() const ;
45  StochVector* createBarrGrad() const ;
46 
47  int nx() const;
48  int my() const;
49  int mz() const;
50  int id() const;
51 
52  void computeGlobalSizes();
53  public:
54  int NNZA,NNZQ,NNZB,NNZC,NNZD; //global nnz
55  void loadLocalSizes();
56  protected:
59  // in POOLSCEN case, only root node has non-null data
61  std::vector<StochInputTree::StochInputNode*> scens;
62  StochInputTree::StochInputNode* fakedata; //convenient struct for holding n,my,mz etc
63  // holds stoch trees for each of the scenarios that are combined at this node
64  // this is just a convenience to reuse the create* and newVector* functions
65  std::vector<sTreeCallbacks*> real_children;
66 };
67 
68 
69 #endif
~sTreeCallbacks()
Definition: sTreeCallbacks.C:21
int NNZB
Definition: sTreeCallbacks.h:54
int my() const
Definition: sTreeCallbacks.C:347
int NNZD
Definition: sTreeCallbacks.h:54
Definition: sTree.h:17
StochInputTree * tree
Definition: sTreeCallbacks.h:60
StochVector * createicupp() const
Definition: sTreeCallbacks.C:622
int NNZC
Definition: sTreeCallbacks.h:54
StochInputTree::StochInputNode * data
Definition: sTreeCallbacks.h:58
StochVector * createCineqBody() const
int nx() const
Definition: sTreeCallbacks.C:342
int mz() const
Definition: sTreeCallbacks.C:352
StochVector * createixupp() const
Definition: sTreeCallbacks.C:511
StochVector * createclow() const
Definition: sTreeCallbacks.C:540
StochGenMatrix * createA() const
Definition: sTreeCallbacks.C:194
StochSymMatrix * createQ() const
Definition: sTreeCallbacks.C:148
StochVector * createCeqBody() const
StochVector * createc() const
Definition: sTreeCallbacks.C:362
std::vector< StochInputTree::StochInputNode * > scens
Definition: sTreeCallbacks.h:61
StochVector * createb() const
Definition: sTreeCallbacks.C:402
StochVector * createcupp() const
Definition: sTreeCallbacks.C:594
Definition: sTreeCallbacks.h:16
sTreeCallbacks()
Definition: sTreeCallbacks.C:29
StochVector * createxupp() const
Definition: sTreeCallbacks.C:484
void computeGlobalSizes()
Definition: sTreeCallbacks.C:83
int NNZA
Definition: sTreeCallbacks.h:54
StochVector * createxlow() const
Definition: sTreeCallbacks.C:430
int id() const
Definition: sTreeCallbacks.C:357
Definition: StochGenMatrix.h:21
StochVector * createixlow() const
Definition: sTreeCallbacks.C:457
StochVector * createBarrGrad() const
int NNZQ
Definition: sTreeCallbacks.h:54
std::vector< sTreeCallbacks * > real_children
Definition: sTreeCallbacks.h:65
Definition: StochVector.h:19
Definition: StochInputTree.h:30
StochVector * createiclow() const
Definition: sTreeCallbacks.C:567
StochGenMatrix * createC() const
Definition: sTreeCallbacks.C:269
void loadLocalSizes()
Definition: sTreeCallbacks.C:77
Definition: StochInputTree.h:37
StochInputTree::StochInputNode * fakedata
Definition: sTreeCallbacks.h:62
Definition: StochSymMatrix.h:20