Skip to content

Commit

Permalink
Merge pull request #366 from mbmcgarry/check_vars
Browse files Browse the repository at this point in the history
Check vars
  • Loading branch information
gidden committed Jun 8, 2015
2 parents 60a8f92 + 9c94a3c commit b522152
Show file tree
Hide file tree
Showing 7 changed files with 253 additions and 211 deletions.
36 changes: 22 additions & 14 deletions src/deploy_inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ typedef std::map<int, std::vector<std::string> > BuildSched;
class DeployInst : public cyclus::Institution {
#pragma cyclus note { \
"doc": \
"Builds and manages agents (facilities) according to a manually specified" \
" deployment schedule. Deployed agents are automatically decommissioned at" \
" the end of their lifetime. The user specifies a list of prototypes for" \
"Builds and manages agents (facilities) according to a manually" \
" specified deployment schedule. Deployed agents are automatically" \
" decommissioned at the end of their lifetime. The user specifies a" \
" list of prototypes for" \
" each and corresponding build times, number to build, and (optionally)" \
" lifetimes. The same prototype can be specified multiple times with any" \
" combination of the same or different build times, build number, and" \
" lifetimes. " \
" lifetimes. The same prototype can be specified multiple times with" \
" any combination of the same or different build times, build number," \
" and lifetimes. " \
}
public:
DeployInst(cyclus::Context* ctx);
Expand All @@ -49,23 +50,30 @@ class DeployInst : public cyclus::Institution {
std::vector<std::string> prototypes;

#pragma cyclus var { \
"doc": "Time step on which to deploy agents given in prototype list (same order).", \
"uilabel": "Deployment times", \
"doc": "Time step on which to deploy agents given in prototype list " \
"(same order).", \
"uilabel": "Deployment times", \
}
std::vector<int> build_times;

#pragma cyclus var { \
"doc": "Number of each prototype given in prototype list that should be deployed (same order).", \
"doc": "Number of each prototype given in prototype list that should be " \
"deployed (same order).", \
"uilabel": "Number to deploy", \
}
std::vector<int> n_build;

#pragma cyclus var { \

#pragma cyclus var { \
"doc": "Lifetimes for each prototype in prototype list (same order)." \
" These lifetimes override the lifetimes in the original prototype definition." \
" If unspecified, lifetimes from the original prototype definitions are used." \
" Although a new prototype is created in the Prototypes table for each lifetime with the suffix '_life_[lifetime]'," \
" all deployed agents themselves will have the same original prototype name (and so will the Agents tables).", \
" These lifetimes override the lifetimes in the original prototype" \
" definition." \
" If unspecified, lifetimes from the original prototype definitions"\
" are used." \
" Although a new prototype is created in the Prototypes table for" \
" each lifetime with the suffix '_life_[lifetime]'," \
" all deployed agents themselves will have the same original" \
" prototype name (and so will the Agents tables).", \
"default": [], \
"uilabel": "Lifetimes" \
}
Expand Down
55 changes: 31 additions & 24 deletions src/enrichment.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,42 +267,47 @@ class Enrichment : public cyclus::Facility {
"uitype": "incommodity" \
}
std::string feed_commod;
#pragma cyclus var { \
"tooltip": "product commodity", \
"doc": "product commodity that the enrichment facility generates", \
"uilabel": "Product Commodity", \
"uitype": "outcommodity" \
}
std::string product_commod;

#pragma cyclus var { \
"tooltip": "feed recipe", \
"doc": "recipe for enrichment facility feed commodity", \
"uilabel": "Feed Recipe", \
"uitype": "recipe" \
}
std::string feed_recipe;

#pragma cyclus var { \
"tooltip": "product commodity", \
"doc": "product commodity that the enrichment facility generates", \
"uilabel": "Product Commodity", \
"uitype": "outcommodity" \
}
std::string product_commod;

#pragma cyclus var { \
"tooltip": "tails commodity", \
"doc": "tails commodity supplied by enrichment facility", \
"uilabel": "Tails Commodity", \
"uitype": "outcommodity" \
}
std::string tails_commod;
#pragma cyclus var { \

#pragma cyclus var { \
"default": 0.003, "tooltip": "tails assay", \
"uilabel": "Tails Assay", \
"doc": "tails assay from the enrichment process", \
}
double tails_assay;
#pragma cyclus var { \
"default": 1e299, \
"tooltip": "SWU capacity (kgSWU/month)", \
"uilabel": "SWU Capacity", \
"doc": "separative work unit (SWU) capacity of enrichment " \
"facility (kgSWU/month) " \

#pragma cyclus var { \
"default": 0, "tooltip": "initial uranium reserves (kg)", \
"uilabel": "Initial Feed Inventory", \
"doc": "amount of natural uranium stored at the enrichment " \
"facility at the beginning of the simulation (kg)" \
}
double swu_capacity;
#pragma cyclus var { \
double initial_feed;

#pragma cyclus var { \
"default": 1e299, "tooltip": "max inventory of feed material (kg)", \
"uilabel": "Maximum Feed Inventory", \
"doc": "maximum total inventory of natural uranium in " \
Expand All @@ -326,23 +331,25 @@ class Enrichment : public cyclus::Facility {
}
double max_enrich;

#pragma cyclus var { \
"default": 0, "tooltip": "initial uranium reserves (kg)", \
"uilabel": "Initial Feed Inventory", \
"doc": "amount of natural uranium stored at the enrichment " \
"facility at the beginning of the simulation (kg)" \
}
double initial_feed;
#pragma cyclus var { \
"default": 1, \
"userlevel": 10, \
"tooltip": "order material requests by U235 content", \
"tooltip": "Rank Material Requests by U235 Content", \
"uilabel": "Prefer feed with higher U235 content", \
"doc": "turn on preference ordering for input material " \
"so that EF chooses higher U235 content first" \
}
bool order_prefs;

#pragma cyclus var { \
"default": 1e299, \
"tooltip": "SWU capacity (kgSWU/month)", \
"uilabel": "SWU Capacity", \
"doc": "separative work unit (SWU) capacity of enrichment " \
"facility (kgSWU/timestep) " \
}
double swu_capacity;

double current_swu_capacity;

#pragma cyclus var { 'capacity': 'max_feed_inventory' }
Expand Down
44 changes: 22 additions & 22 deletions src/fuel_fab.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,20 @@ class FuelFab : public cyclus::Facility {
"uilabel": "Filler Stream Commodities", \
"uitype": ["oneormore", "incommodity"], \
}
std::vector<std::string> fill_commods;
#pragma cyclus var { \
"doc": "Name of recipe to be used in filler material stream requests.", \
"uilabel": "Filler Stream Recipe", \
"uitype": "recipe", \
}
std::string fill_recipe;
std::vector<std::string> fill_commods;
#pragma cyclus var { \
"default": [], \
"uilabel": "Filler Stream Preferences", \
"doc": "Filler stream commodity request preferences for each of the given filler commodities (same order)." \
" If unspecified, default is to use 1.0 for all preferences.", \
}
std::vector<double> fill_commod_prefs;
#pragma cyclus var { \
"doc": "Name of recipe to be used in filler material stream requests.", \
"uilabel": "Filler Stream Recipe", \
"uitype": "recipe", \
}
std::string fill_recipe;
#pragma cyclus var { \
"doc": "Size of filler material stream inventory.", \
"uilabel": "Filler Stream Inventory Capacity", \
Expand All @@ -172,7 +172,7 @@ class FuelFab : public cyclus::Facility {
"doc": "Name for recipe to be used in fissile stream requests." \
" Empty string results in use of an empty dummy recipe.", \
"uitype": "recipe", \
"uilabel": "Fissile Stream Recipes", \
"uilabel": "Fissile Stream Recipe", \
"default": "", \
}
std::string fiss_recipe;
Expand All @@ -193,6 +193,12 @@ class FuelFab : public cyclus::Facility {
"uitype": "incommodity", \
}
std::string topup_commod;
#pragma cyclus var { \
"doc": "Top-up material stream request preference.", \
"uilabel": "Top-up Stream Preference", \
"default": 0, \
}
double topup_pref;
#pragma cyclus var { \
"doc": "Name of recipe to be used in top-up material stream requests." \
" This MUST be set if 'topup_size > 0'.", \
Expand All @@ -201,12 +207,6 @@ class FuelFab : public cyclus::Facility {
"default": "", \
}
std::string topup_recipe;
#pragma cyclus var { \
"doc": "Top-up material stream request preference.", \
"uilabel": "Top-up Stream Preference", \
"default": 0, \
}
double topup_pref;
#pragma cyclus var { \
"doc": "Size of top-up material stream inventory.", \
"uilabel": "Top-up Stream Inventory Capacity", \
Expand All @@ -217,14 +217,6 @@ class FuelFab : public cyclus::Facility {
#pragma cyclus var {"capacity": "topup_size"}
cyclus::toolkit::ResBuf<cyclus::Material> topup;

#pragma cyclus var { \
"uilabel": "Spectrum type", \
"categorical": ['fission_spectrum_ave','thermal'], \
"doc": "The type of cross-sections to use for composition property calculation." \
" Use 'fission_spectrum_ave' for fast reactor compositions or 'thermal' for thermal reactors.", \
}
std::string spectrum;

#pragma cyclus var { \
"doc": "Commodity on which to offer/supply mixed fuel material.", \
"uilabel": "Output Commodity", \
Expand All @@ -239,6 +231,14 @@ class FuelFab : public cyclus::Facility {
}
double throughput;

#pragma cyclus var { \
"uilabel": "Spectrum type", \
"categorical": ['fission_spectrum_ave','thermal'], \
"doc": "The type of cross-sections to use for composition property calculation." \
" Use 'fission_spectrum_ave' for fast reactor compositions or 'thermal' for thermal reactors.", \
}
std::string spectrum;

// intra-time-step state - no need to be a state var
// map<request, inventory name>
std::map<cyclus::Request<cyclus::Material>*, std::string> req_inventories_;
Expand Down
Loading

0 comments on commit b522152

Please sign in to comment.