CYCAMORE
src/deploy_inst.h
Go to the documentation of this file.
1 #ifndef CYCAMORE_SRC_DEPLOY_INST_H_
2 #define CYCAMORE_SRC_DEPLOY_INST_H_
3 
4 #include <utility>
5 #include <set>
6 #include <map>
7 
8 #include "cyclus.h"
9 #include "cycamore_version.h"
10 
11 namespace cycamore {
12 
13 typedef std::map<int, std::vector<std::string> > BuildSched;
14 
15 // Builds and manages agents (facilities) according to a manually specified
16 // deployment schedule. Deployed agents are automatically decommissioned at
17 // the end of their lifetime. The user specifies a list of prototypes for
18 // each and corresponding build times, number to build, and (optionally)
19 // lifetimes. The same prototype can be specified multiple times with any
20 // combination of the same or different build times, build number, and
21 // lifetimes.
22 class DeployInst : public cyclus::Institution {
23  #pragma cyclus note { \
24  "doc": \
25  "Builds and manages agents (facilities) according to a manually" \
26  " specified deployment schedule. Deployed agents are automatically" \
27  " decommissioned at the end of their lifetime. The user specifies a" \
28  " list of prototypes for" \
29  " each and corresponding build times, number to build, and (optionally)" \
30  " lifetimes. The same prototype can be specified multiple times with" \
31  " any combination of the same or different build times, build number," \
32  " and lifetimes. " \
33  }
34  public:
35  DeployInst(cyclus::Context* ctx);
36 
37  virtual ~DeployInst();
38 
39  virtual std::string version() { return CYCAMORE_VERSION; }
40 
41  #pragma cyclus
42 
43  virtual void Build(cyclus::Agent* parent);
44 
45  virtual void EnterNotify();
46 
47  protected:
48  #pragma cyclus var { \
49  "doc": "Ordered list of prototypes to build.", \
50  "uitype": ("oneormore", "prototype"), \
51  "uilabel": "Prototypes to deploy", \
52  }
53  std::vector<std::string> prototypes;
54 
55  #pragma cyclus var { \
56  "doc": "Time step on which to deploy agents given in prototype list " \
57  "(same order).", \
58  "uilabel": "Deployment times", \
59  }
60  std::vector<int> build_times;
61 
62  #pragma cyclus var { \
63  "doc": "Number of each prototype given in prototype list that should be " \
64  "deployed (same order).", \
65  "uilabel": "Number to deploy", \
66  }
67  std::vector<int> n_build;
68 
69 
70 #pragma cyclus var { \
71  "doc": "Lifetimes for each prototype in prototype list (same order)." \
72  " These lifetimes override the lifetimes in the original prototype" \
73  " definition." \
74  " If unspecified, lifetimes from the original prototype definitions"\
75  " are used." \
76  " Although a new prototype is created in the Prototypes table for" \
77  " each lifetime with the suffix '_life_[lifetime]'," \
78  " all deployed agents themselves will have the same original" \
79  " prototype name (and so will the Agents tables).", \
80  "default": [], \
81  "uilabel": "Lifetimes" \
82  }
83  std::vector<int> lifetimes;
84 };
85 
86 } // namespace cycamore
87 
88 #endif // CYCAMORE_SRC_DEPLOY_INST_H_
virtual void Build(cyclus::Agent *parent)
std::vector< std::string > prototypes
cycamore::GrowthRegion string
virtual std::string version()
std::map< int, std::vector< std::string > > BuildSched