Skip to content

Commit 2cf9932

Browse files
committed
Removed some extra code from the header, simplified the purchasing behavior of the agent
1 parent 146155a commit 2cf9932

File tree

2 files changed

+10
-32
lines changed

2 files changed

+10
-32
lines changed

src/conversion.cc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,9 @@ std::set<RequestPortfolio<Material>::Ptr> Conversion::GetMatlRequests() {
103103
// Create request portfolio
104104
RequestPortfolio<Material>::Ptr port(new RequestPortfolio<Material>());
105105

106-
// Create material request
107-
Material::Ptr mat;
108-
if (inrecipe_name.empty()) {
109-
mat = cyclus::NewBlankMaterial(available_capacity);
110-
} else {
111-
mat = Material::CreateUntracked(available_capacity, context()->GetRecipe(inrecipe_name));
112-
}
106+
// Create material request with no recipe
107+
Material::Ptr mat = cyclus::NewBlankMaterial(available_capacity);
108+
113109

114110
// Add request for all commodities using default preference
115111
for (std::vector<std::string>::iterator it = incommods.begin();

src/conversion.h

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,6 @@ class Conversion
8787
}
8888
std::vector<std::string> incommods;
8989

90-
#pragma cyclus var { \
91-
"default": [], \
92-
"doc":"preferences for each of the given commodities, in the same order."\
93-
"Defauts to 1 if unspecified",\
94-
"uilabel":"In Commody Preferences", \
95-
"range": [None, [CY_NEAR_ZERO, CY_LARGE_DOUBLE]], \
96-
"uitype":["oneormore", "range"] \
97-
}
98-
std::vector<double> incommod_prefs;
99-
100-
#pragma cyclus var { \
101-
"default": "", \
102-
"tooltip": "requested composition", \
103-
"doc": "name of recipe to use for material requests, where the default " \
104-
"(empty string) is to accept everything", \
105-
"uilabel": "Input Recipe", \
106-
"uitype": "inrecipe" \
107-
}
108-
std::string inrecipe_name;
109-
11090
#pragma cyclus var { \
11191
"tooltip": "output commodity", \
11292
"doc": "Output commodity on which the conversion facility offers material.", \
@@ -115,14 +95,14 @@ class Conversion
11595
}
11696
std::string outcommod;
11797

118-
/// throughput per timestep
98+
/// Conversion throughput per timestep
11999
#pragma cyclus var { \
120100
"default": CY_LARGE_DOUBLE, \
121-
"tooltip": "conversion capacity", \
122-
"uilabel": "Maximum Throughput", \
101+
"tooltip": "conversion throughput per timestep", \
102+
"uilabel": "Maximum conversion throughput", \
123103
"uitype": "range", \
124104
"range": [0.0, CY_LARGE_DOUBLE], \
125-
"doc": "capacity the conversion facility can convert at each time step" \
105+
"doc": "throughput the facility can convert at each time step" \
126106
}
127107
double throughput;
128108

@@ -132,7 +112,9 @@ class Conversion
132112
"uilabel": "Maximum Storage of Input Buffer", \
133113
"uitype": "range", \
134114
"range": [0.0, CY_LARGE_DOUBLE], \
135-
"doc": "capacity the conversion facility can accept at each time step" \
115+
"doc": "Total capacity of the input buffer. The amount requested per " \
116+
"time step is the minimum the conversion throughput and this capacity " \
117+
"minus the amount of material in the input buffer." \
136118
}
137119
double input_capacity;
138120

0 commit comments

Comments
 (0)