Skip to content

Commit

Permalink
Merge pull request #341 from gonuke/1.3.0-rc2-labels
Browse files Browse the repository at this point in the history
Add more UI support to Cycamore archetypes
  • Loading branch information
mbmcgarry committed May 8, 2015
2 parents 4f0f16e + 9d3ed0b commit 226e46a
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 9 deletions.
10 changes: 7 additions & 3 deletions src/deploy_inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,30 @@ class DeployInst : public cyclus::Institution {
#pragma cyclus var { \
"doc": "Ordered list of prototypes to build.", \
"uitype": ("oneormore", "prototype"), \
"uilabel": "Prototypes to deploy", \
}
std::vector<std::string> prototypes;

#pragma cyclus var { \
"doc": "Time step on which to build agents given in prototypes (same order).", \
"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 in prototypes var to build (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 { \
"doc": "Lifetimes for each prototype in protos (same order)." \
"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).", \
"default": [], \
"uilabel": "Lifetimes" \
}
std::vector<int> lifetimes;
};
Expand Down
16 changes: 13 additions & 3 deletions src/enrichment_facility.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,50 +263,58 @@ class Enrichment : public cyclus::Facility {
#pragma cyclus var { \
"tooltip": "feed commodity", \
"doc": "feed commodity that the enrichment facility accepts", \
"uilabel": "Feed Commodity", \
"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": "tails commodity", \
"doc": "tails commodity supplied by enrichment facility", \
"uilabel": "Tails Commodity", \
"uitype": "outcommodity" \
}
std::string tails_commod;
#pragma cyclus var { \
"default": 0.03, "tooltip": "tails assay", \
"doc": "tails assay from the enrichment process" \
"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) " \
"facility (kgSWU/month) " \
}
double swu_capacity;
#pragma cyclus var { \
"default": 1e299, "tooltip": "max inventory of feed material (kg)", \
"uilabel": "Maximum Feed Inventory", \
"doc": "maximum total inventory of natural uranium in " \
"the enrichment facility (kg)" \
"the enrichment facility (kg)" \
}
double max_feed_inventory;

#pragma cyclus var { \
"default": 1.0, \
"tooltip": "maximum allowed enrichment fraction", \
"doc": "maximum allowed weight fraction of U235 in product",\
"uilabel": "Maximum Allowed Enrichment", \
"schema": '<optional>' \
' <element name="max_enrich">' \
' <data type="double">' \
Expand All @@ -320,6 +328,7 @@ class Enrichment : public cyclus::Facility {

#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)" \
}
Expand All @@ -328,6 +337,7 @@ class Enrichment : public cyclus::Facility {
"default": 1, \
"userlevel": 10, \
"tooltip": "order 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" \
}
Expand Down
16 changes: 16 additions & 0 deletions src/fuel_fab.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,25 @@ class FuelFab : public cyclus::Facility {
private:
#pragma cyclus var { \
"doc": "Commodity on which to request material for filler stream.", \
"uilabel": "Filler Stream Commodity", \
"uitype": "incommodity", \
}
std::string fill_commod;
#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": "Filler material stream request preference.", \
"uilabel": "Filler Stream Preference", \
"default": 0, \
}
double fill_pref;
#pragma cyclus var { \
"doc": "Size of filler material stream inventory.", \
"uilabel": "Filler Stream Inventory Capacity", \
"units": "kg", \
}
double fill_size;
Expand All @@ -152,11 +156,13 @@ class FuelFab : public cyclus::Facility {

#pragma cyclus var { \
"doc": "Ordered list of commodities on which to requesting fissile stream material.", \
"uilabel": "Fissile Stream Commodities", \
"uitype": ["oneormore", "incommodity"], \
}
std::vector<std::string> fiss_commods;
#pragma cyclus var { \
"default": [], \
"uilabel": "Fissile Stream Preferences", \
"doc": "Fissile stream commodity request preferences for each of the given fissile commodities (same order)." \
" If unspecified, default is to use zero for all preferences.", \
}
Expand All @@ -165,11 +171,13 @@ 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", \
"default": "", \
}
std::string fiss_recipe;
#pragma cyclus var { \
"doc": "Size of fissile material stream inventory.", \
"uilabel": "Fissile Stream Inventory Capacity", \
"units": "kg", \
}
double fiss_size;
Expand All @@ -179,24 +187,28 @@ class FuelFab : public cyclus::Facility {
#pragma cyclus var { \
"doc": "Commodity on which to request material for top-up stream." \
" This MUST be set if 'topup_size > 0'.", \
"uilabel": "Top-up Stream Commodity", \
"default": "", \
"uitype": "incommodity", \
}
std::string topup_commod;
#pragma cyclus var { \
"doc": "Name of recipe to be used in top-up material stream requests." \
" This MUST be set if 'topup_size > 0'.", \
"uilabel": "Top-up Stream Recipe", \
"uitype": "recipe", \
"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", \
"units": "kg", \
"default": 0, \
}
Expand All @@ -205,19 +217,23 @@ class FuelFab : public cyclus::Facility {
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", \
"uitype": "outcommodity", \
}
std::string outcommod;

#pragma cyclus var { \
"doc": "Maximum number of kg of fuel material that can be supplied per time step.", \
"uilabel": "Maximum Throughput", \
"units": "kg", \
}
double throughput;
Expand Down
6 changes: 5 additions & 1 deletion src/growth_region.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,24 @@ class GrowthRegion : public cyclus::Region {
#pragma cyclus var {"tooltip": "commodity in demand", \
"doc": "name of the commodity experiencing a " \
"growth in demand", \
"uitype": "commodity"}
"uilabel": "Growth Commodity", \
}
std::string commodity_name;

#pragma cyclus var {"tooltip": "demand type", \
"uilabel": "Demand Growth Function Form", \
"doc": "mathematical description of demand growth " \
"(i.e., linear, exponential, piecewise)"}
std::vector<std::string> demand_types;

#pragma cyclus var {"tooltip": "demand parameters", \
"uilabel": "Demand Growth Function Parameters", \
"doc": "parameters that define the behavior of the " \
"demand type function"}
std::vector<std::string> demand_params;

#pragma cyclus var {"tooltip": "demand times", \
"uilabel": "Demand Growth Piecewise Function Times", \
"doc": "vector describing the length of times " \
"regarding the piecewise demand type"}
std::vector<int> demand_times;
Expand Down
1 change: 1 addition & 0 deletions src/manager_inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class ManagerInst

#pragma cyclus var {"tooltip": "facility prototypes", \
"doc": "a facility to be managed by the institution", \
"uilabel": "Prototype List", \
"uitype": ["none", "prototype"]}
std::vector<std::string> prototypes;
};
Expand Down
Loading

0 comments on commit 226e46a

Please sign in to comment.