{"action":"created","comment":{"url":"https://api.github.com/repos/cyclus/cycamore/pulls/comments/27427268","id":27427268,"diff_hunk":"@@ -233,81 +266,126 @@ class EnrichmentFacility : public cyclus::Facility {\n \n   inline double CurrentSwuCapacity() const { return current_swu_capacity; }\n \n+  inline void MaxEnrich(double enrichment) { max_enrich = enrichment; }\n+  \n+  inline double MaxEnrich() const { return max_enrich; }\n+\n   /// @brief this facility's initial conditions\n   inline void  InitialReserves(double qty) { initial_reserves = qty; }\n   inline double InitialReserves() const { return initial_reserves; }\n \n-  inline const cyclus::toolkit::ResourceBuff& Tails() const { return tails; } \n-  \n+  inline const cyclus::toolkit::ResBuf<cyclus::Material>& Tails() const {\n+    return tails;\n+  } \n+\n  private:\n   ///   @brief adds a material into the natural uranium inventory\n   ///   @throws if the material is not the same composition as the in_recipe\n   void AddMat_(cyclus::Material::Ptr mat);\n \n-  ///   @brief generates a request for this facility given its current state. The\n-  ///   quantity of the material will be equal to the remaining inventory size.\n+  ///   @brief generates a request for this facility given its current state.\n+  ///   Quantity of the material will be equal to remaining inventory size.\n   cyclus::Material::Ptr Request_();\n \n   ///  @brief Generates a material offer for a given request. The response\n-  ///  composition will be comprised only of U235 and U238 at their relative ratio\n-  ///  in the requested material. The response quantity will be the same as the\n-  ///  requested commodity.\n+  ///  composition will be comprised only of U235 and U238 at their relative\n+  ///  ratio in the requested material. The response quantity will be the\n+  ///  same as the requested commodity.\n   ///\n   ///  @param req the requested material being responded to\n   cyclus::Material::Ptr Offer_(cyclus::Material::Ptr req);\n \n   cyclus::Material::Ptr Enrich_(cyclus::Material::Ptr mat, double qty);\n \n-  ///   @brief records and enrichment with the cyclus::Recorder\n-  void RecordEnrichment_(double natural_u, double swu);\n+  ///  @brief calculates the feed assay based on the unenriched inventory\n+  double FeedAssay();\n \n-  #pragma cyclus var {\"tooltip\": \"input commodity\", \\\n-                      \"doc\": \"commodity that the enrichment facility accepts\", \\\n-                      \"uitype\": \"incommodity\"}\n+  ///  @brief records and enrichment with the cyclus::Recorder\n+  void RecordEnrichment_(double natural_u, double swu);\n+  \n+  #pragma cyclus var {\t\t\t\t\t\t\t\\\n+    \"tooltip\": \"input commodity\",\t\t\t\t\t\\\n+    \"doc\": \"commodity that the enrichment facility accepts\",\t\t\\\n+    \"uitype\": \"incommodity\" \\\n+  }\n   std::string in_commod;\n-  #pragma cyclus var {\"tooltip\": \"output commodity\", \\\n-                      \"doc\": \"commodity that the enrichment facility supplies\", \\\n-                      \"uitype\": \"outcommodity\"}\n+  #pragma cyclus var { \\\n+    \"tooltip\": \"output commodity\",\t\t\t\t\t\\\n+    \"doc\": \"commodity that the enrichment facility supplies\",\t\t\\\n+    \"uitype\": \"outcommodity\" \\\n+  }\n   std::string out_commod;\n-  #pragma cyclus var {\"tooltip\": \"input commodity recipe\", \\\n-                      \"doc\": \"recipe for enrichment facility's input commodity\", \\\n-                      \"uitype\": \"recipe\"}\n+  #pragma cyclus var { \\\n+    \"tooltip\": \"input commodity recipe\",\t\t\t\t\\\n+    \"doc\": \"recipe for enrichment facility input commodity\",\t\t\\\n+    \"uitype\": \"recipe\" \\\n+  }\n   std::string in_recipe;\n-\n-  #pragma cyclus var {\"default\": 0.03, \"tooltip\": \"tails assay\", \\\n-                      \"doc\": \"tails assay from the enrichment process\"}\n+  #pragma cyclus var { \\\n+    \"tooltip\": \"tails commodity\",\t\t\t\t\t\\\n+    \"doc\": \"tails commodity supplied by enrichment facility\",\t\t\\\n+    \"uitype\": \"outcommodity\" \\\n+  }\n+  std::string tails_commod;\n+  #pragma cyclus var { \\\n+    \"default\": 0.03, \"tooltip\": \"tails assay\",\t\t\t\t\\\n+    \"doc\": \"tails assay from the enrichment process\" \\\n+  }\n   double tails_assay;\n-  #pragma cyclus var {\"default\": 1e299, \"tooltip\": \"SWU capacity\", \\\n-                      \"doc\": \"separative work unit (SWU) capcity of \" \\\n-                             \"enrichment facility\"}\n+  #pragma cyclus var { \\\n+    \"default\": 1e299,\t\t\t\t\t       \\\n+    \"tooltip\": \"SWU capacity (kgSWU/month)\",\t\t\t       \\\n+    \"doc\": \"separative work unit (SWU) capacity of enrichment \" \\\n+           \"facility (kgSWU/month) \"\t\t       \\\n+  }\n   double swu_capacity;\n-  #pragma cyclus var {\"default\": 1e299, \"tooltip\": \"maximum inventory size\", \\\n-                      \"doc\": \"maximum inventory capacity of natural uranium in \" \\\n-                             \"the enrichment facility\"}\n+  #pragma cyclus var { \\\n+    \"default\": 1e299, \"tooltip\": \"max inventory size (kg)\",\t\t\\\n+    \"doc\": \"maximum total inventory of natural uranium in \"\t\t\\\n+           \"the enrichment facility (kg)\" \\\n+  }\n   double max_inv_size;\n-  #pragma cyclus var {\"default\": 0, \"tooltip\": \"initial uranium reserves\", \\\n-                      \"doc\": \"amount of natural uranium stored at the \" \\\n-                             \"enrichment facility at the beginning of the \" \\\n-                             \"simulation\"}\n+ \n+  #pragma cyclus var { \\\n+    \"default\": 1.0,\t\t\t\t\t\t\\\n+    \"tooltip\": \"maximum allowed enrichment fraction\",\t\t\\\n+    \"doc\": \"maximum allowed weight fraction of U235 in product\",\\\n+    \"schema\": '<optional>'\t\t\t\t     \t   \\\n+        '          <element name=\"max_enrich\">'\t\t\t   \\\n+        '              <data type=\"double\">'\t\t\t   \\\n+        '                  <param name=\"minInclusive\">0</param>'   \\\n+        '                  <param name=\"maxInclusive\">1</param>'   \\\n+        '              </data>'\t\t\t\t\t   \\\n+        '          </element>'\t\t\t\t\t   \\\n+        '      </optional>'\t\t\t\t\t   \\\n+  }\n+  double max_enrich;\n+\n+  #pragma cyclus var {\t\t\t\t\t\t\t\\\n+    \"default\": 0, \"tooltip\": \"initial uranium reserves (kg)\",\t\t\\\n+    \"doc\": \"amount of natural uranium stored at the enrichment \"       \\\n+           \"facility at the beginning of the simulation (kg)\"\t\t\\\n+  }\n   double initial_reserves;","path":"src/enrichment_facility.h","position":370,"original_position":370,"commit_id":"569a04b131824b05a92ced514354c940790c7fe1","original_commit_id":"569a04b131824b05a92ced514354c940790c7fe1","user":{"login":"rwcarlsen","id":1351242,"avatar_url":"https://avatars.githubusercontent.com/u/1351242?v=3","gravatar_id":"","url":"https://api.github.com/users/rwcarlsen","html_url":"https://github.com/rwcarlsen","followers_url":"https://api.github.com/users/rwcarlsen/followers","following_url":"https://api.github.com/users/rwcarlsen/following{/other_user}","gists_url":"https://api.github.com/users/rwcarlsen/gists{/gist_id}","starred_url":"https://api.github.com/users/rwcarlsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwcarlsen/subscriptions","organizations_url":"https://api.github.com/users/rwcarlsen/orgs","repos_url":"https://api.github.com/users/rwcarlsen/repos","events_url":"https://api.github.com/users/rwcarlsen/events{/privacy}","received_events_url":"https://api.github.com/users/rwcarlsen/received_events","type":"User","site_admin":false},"body":"`initial_feed`","created_at":"2015-03-30T20:15:22Z","updated_at":"2015-03-30T20:15:22Z","html_url":"https://github.com/cyclus/cycamore/pull/305#discussion_r27427268","pull_request_url":"https://api.github.com/repos/cyclus/cycamore/pulls/305","_links":{"self":{"href":"https://api.github.com/repos/cyclus/cycamore/pulls/comments/27427268"},"html":{"href":"https://github.com/cyclus/cycamore/pull/305#discussion_r27427268"},"pull_request":{"href":"https://api.github.com/repos/cyclus/cycamore/pulls/305"}}},"pull_request":{"url":"https://api.github.com/repos/cyclus/cycamore/pulls/305","id":30872168,"html_url":"https://github.com/cyclus/cycamore/pull/305","diff_url":"https://github.com/cyclus/cycamore/pull/305.diff","patch_url":"https://github.com/cyclus/cycamore/pull/305.patch","issue_url":"https://api.github.com/repos/cyclus/cycamore/issues/305","number":305,"state":"open","locked":false,"title":"New Cycamore Enrichment Facility","user":{"login":"mbmcgarry","id":8630709,"avatar_url":"https://avatars.githubusercontent.com/u/8630709?v=3","gravatar_id":"","url":"https://api.github.com/users/mbmcgarry","html_url":"https://github.com/mbmcgarry","followers_url":"https://api.github.com/users/mbmcgarry/followers","following_url":"https://api.github.com/users/mbmcgarry/following{/other_user}","gists_url":"https://api.github.com/users/mbmcgarry/gists{/gist_id}","starred_url":"https://api.github.com/users/mbmcgarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbmcgarry/subscriptions","organizations_url":"https://api.github.com/users/mbmcgarry/orgs","repos_url":"https://api.github.com/users/mbmcgarry/repos","events_url":"https://api.github.com/users/mbmcgarry/events{/privacy}","received_events_url":"https://api.github.com/users/mbmcgarry/received_events","type":"User","site_admin":false},"body":"This PR is dependent on cyclus/cyclus#1084 and cyclus/cyclus#1093","created_at":"2015-03-10T17:19:25Z","updated_at":"2015-03-30T20:15:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a02b37205efe2ca2d25320efcbf198207e3cc58","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cyclus/cycamore/pulls/305/commits","review_comments_url":"https://api.github.com/repos/cyclus/cycamore/pulls/305/comments","review_comment_url":"https://api.github.com/repos/cyclus/cycamore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cyclus/cycamore/issues/305/comments","statuses_url":"https://api.github.com/repos/cyclus/cycamore/statuses/569a04b131824b05a92ced514354c940790c7fe1","head":{"label":"mbmcgarry:new_EF","ref":"new_EF","sha":"569a04b131824b05a92ced514354c940790c7fe1","user":{"login":"mbmcgarry","id":8630709,"avatar_url":"https://avatars.githubusercontent.com/u/8630709?v=3","gravatar_id":"","url":"https://api.github.com/users/mbmcgarry","html_url":"https://github.com/mbmcgarry","followers_url":"https://api.github.com/users/mbmcgarry/followers","following_url":"https://api.github.com/users/mbmcgarry/following{/other_user}","gists_url":"https://api.github.com/users/mbmcgarry/gists{/gist_id}","starred_url":"https://api.github.com/users/mbmcgarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbmcgarry/subscriptions","organizations_url":"https://api.github.com/users/mbmcgarry/orgs","repos_url":"https://api.github.com/users/mbmcgarry/repos","events_url":"https://api.github.com/users/mbmcgarry/events{/privacy}","received_events_url":"https://api.github.com/users/mbmcgarry/received_events","type":"User","site_admin":false},"repo":{"id":24654040,"name":"cycamore","full_name":"mbmcgarry/cycamore","owner":{"login":"mbmcgarry","id":8630709,"avatar_url":"https://avatars.githubusercontent.com/u/8630709?v=3","gravatar_id":"","url":"https://api.github.com/users/mbmcgarry","html_url":"https://github.com/mbmcgarry","followers_url":"https://api.github.com/users/mbmcgarry/followers","following_url":"https://api.github.com/users/mbmcgarry/following{/other_user}","gists_url":"https://api.github.com/users/mbmcgarry/gists{/gist_id}","starred_url":"https://api.github.com/users/mbmcgarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbmcgarry/subscriptions","organizations_url":"https://api.github.com/users/mbmcgarry/orgs","repos_url":"https://api.github.com/users/mbmcgarry/repos","events_url":"https://api.github.com/users/mbmcgarry/events{/privacy}","received_events_url":"https://api.github.com/users/mbmcgarry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbmcgarry/cycamore","description":"The CYClus Additional Modules REpository","fork":true,"url":"https://api.github.com/repos/mbmcgarry/cycamore","forks_url":"https://api.github.com/repos/mbmcgarry/cycamore/forks","keys_url":"https://api.github.com/repos/mbmcgarry/cycamore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbmcgarry/cycamore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbmcgarry/cycamore/teams","hooks_url":"https://api.github.com/repos/mbmcgarry/cycamore/hooks","issue_events_url":"https://api.github.com/repos/mbmcgarry/cycamore/issues/events{/number}","events_url":"https://api.github.com/repos/mbmcgarry/cycamore/events","assignees_url":"https://api.github.com/repos/mbmcgarry/cycamore/assignees{/user}","branches_url":"https://api.github.com/repos/mbmcgarry/cycamore/branches{/branch}","tags_url":"https://api.github.com/repos/mbmcgarry/cycamore/tags","blobs_url":"https://api.github.com/repos/mbmcgarry/cycamore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbmcgarry/cycamore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbmcgarry/cycamore/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbmcgarry/cycamore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbmcgarry/cycamore/statuses/{sha}","languages_url":"https://api.github.com/repos/mbmcgarry/cycamore/languages","stargazers_url":"https://api.github.com/repos/mbmcgarry/cycamore/stargazers","contributors_url":"https://api.github.com/repos/mbmcgarry/cycamore/contributors","subscribers_url":"https://api.github.com/repos/mbmcgarry/cycamore/subscribers","subscription_url":"https://api.github.com/repos/mbmcgarry/cycamore/subscription","commits_url":"https://api.github.com/repos/mbmcgarry/cycamore/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbmcgarry/cycamore/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbmcgarry/cycamore/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbmcgarry/cycamore/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbmcgarry/cycamore/contents/{+path}","compare_url":"https://api.github.com/repos/mbmcgarry/cycamore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbmcgarry/cycamore/merges","archive_url":"https://api.github.com/repos/mbmcgarry/cycamore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbmcgarry/cycamore/downloads","issues_url":"https://api.github.com/repos/mbmcgarry/cycamore/issues{/number}","pulls_url":"https://api.github.com/repos/mbmcgarry/cycamore/pulls{/number}","milestones_url":"https://api.github.com/repos/mbmcgarry/cycamore/milestones{/number}","notifications_url":"https://api.github.com/repos/mbmcgarry/cycamore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbmcgarry/cycamore/labels{/name}","releases_url":"https://api.github.com/repos/mbmcgarry/cycamore/releases{/id}","created_at":"2014-09-30T20:20:25Z","updated_at":"2015-02-18T18:17:48Z","pushed_at":"2015-03-30T18:42:45Z","git_url":"git://github.com/mbmcgarry/cycamore.git","ssh_url":"git@github.com:mbmcgarry/cycamore.git","clone_url":"https://github.com/mbmcgarry/cycamore.git","svn_url":"https://github.com/mbmcgarry/cycamore","homepage":"","size":4908,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"cyclus:develop","ref":"develop","sha":"975714ecb861deaad99fb20405bbed31591388d7","user":{"login":"cyclus","id":1355686,"avatar_url":"https://avatars.githubusercontent.com/u/1355686?v=3","gravatar_id":"","url":"https://api.github.com/users/cyclus","html_url":"https://github.com/cyclus","followers_url":"https://api.github.com/users/cyclus/followers","following_url":"https://api.github.com/users/cyclus/following{/other_user}","gists_url":"https://api.github.com/users/cyclus/gists{/gist_id}","starred_url":"https://api.github.com/users/cyclus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyclus/subscriptions","organizations_url":"https://api.github.com/users/cyclus/orgs","repos_url":"https://api.github.com/users/cyclus/repos","events_url":"https://api.github.com/users/cyclus/events{/privacy}","received_events_url":"https://api.github.com/users/cyclus/received_events","type":"Organization","site_admin":false},"repo":{"id":4973784,"name":"cycamore","full_name":"cyclus/cycamore","owner":{"login":"cyclus","id":1355686,"avatar_url":"https://avatars.githubusercontent.com/u/1355686?v=3","gravatar_id":"","url":"https://api.github.com/users/cyclus","html_url":"https://github.com/cyclus","followers_url":"https://api.github.com/users/cyclus/followers","following_url":"https://api.github.com/users/cyclus/following{/other_user}","gists_url":"https://api.github.com/users/cyclus/gists{/gist_id}","starred_url":"https://api.github.com/users/cyclus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyclus/subscriptions","organizations_url":"https://api.github.com/users/cyclus/orgs","repos_url":"https://api.github.com/users/cyclus/repos","events_url":"https://api.github.com/users/cyclus/events{/privacy}","received_events_url":"https://api.github.com/users/cyclus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cyclus/cycamore","description":"The CYClus Additional Module REpository","fork":false,"url":"https://api.github.com/repos/cyclus/cycamore","forks_url":"https://api.github.com/repos/cyclus/cycamore/forks","keys_url":"https://api.github.com/repos/cyclus/cycamore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cyclus/cycamore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cyclus/cycamore/teams","hooks_url":"https://api.github.com/repos/cyclus/cycamore/hooks","issue_events_url":"https://api.github.com/repos/cyclus/cycamore/issues/events{/number}","events_url":"https://api.github.com/repos/cyclus/cycamore/events","assignees_url":"https://api.github.com/repos/cyclus/cycamore/assignees{/user}","branches_url":"https://api.github.com/repos/cyclus/cycamore/branches{/branch}","tags_url":"https://api.github.com/repos/cyclus/cycamore/tags","blobs_url":"https://api.github.com/repos/cyclus/cycamore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cyclus/cycamore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cyclus/cycamore/git/refs{/sha}","trees_url":"https://api.github.com/repos/cyclus/cycamore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cyclus/cycamore/statuses/{sha}","languages_url":"https://api.github.com/repos/cyclus/cycamore/languages","stargazers_url":"https://api.github.com/repos/cyclus/cycamore/stargazers","contributors_url":"https://api.github.com/repos/cyclus/cycamore/contributors","subscribers_url":"https://api.github.com/repos/cyclus/cycamore/subscribers","subscription_url":"https://api.github.com/repos/cyclus/cycamore/subscription","commits_url":"https://api.github.com/repos/cyclus/cycamore/commits{/sha}","git_commits_url":"https://api.github.com/repos/cyclus/cycamore/git/commits{/sha}","comments_url":"https://api.github.com/repos/cyclus/cycamore/comments{/number}","issue_comment_url":"https://api.github.com/repos/cyclus/cycamore/issues/comments{/number}","contents_url":"https://api.github.com/repos/cyclus/cycamore/contents/{+path}","compare_url":"https://api.github.com/repos/cyclus/cycamore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cyclus/cycamore/merges","archive_url":"https://api.github.com/repos/cyclus/cycamore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cyclus/cycamore/downloads","issues_url":"https://api.github.com/repos/cyclus/cycamore/issues{/number}","pulls_url":"https://api.github.com/repos/cyclus/cycamore/pulls{/number}","milestones_url":"https://api.github.com/repos/cyclus/cycamore/milestones{/number}","notifications_url":"https://api.github.com/repos/cyclus/cycamore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cyclus/cycamore/labels{/name}","releases_url":"https://api.github.com/repos/cyclus/cycamore/releases{/id}","created_at":"2012-07-10T12:41:38Z","updated_at":"2015-02-18T13:59:26Z","pushed_at":"2015-03-30T18:42:46Z","git_url":"git://github.com/cyclus/cycamore.git","ssh_url":"git@github.com:cyclus/cycamore.git","clone_url":"https://github.com/cyclus/cycamore.git","svn_url":"https://github.com/cyclus/cycamore","homepage":"","size":7812,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":23,"forks":17,"open_issues":23,"watchers":8,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cyclus/cycamore/pulls/305"},"html":{"href":"https://github.com/cyclus/cycamore/pull/305"},"issue":{"href":"https://api.github.com/repos/cyclus/cycamore/issues/305"},"comments":{"href":"https://api.github.com/repos/cyclus/cycamore/issues/305/comments"},"review_comments":{"href":"https://api.github.com/repos/cyclus/cycamore/pulls/305/comments"},"review_comment":{"href":"https://api.github.com/repos/cyclus/cycamore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cyclus/cycamore/pulls/305/commits"},"statuses":{"href":"https://api.github.com/repos/cyclus/cycamore/statuses/569a04b131824b05a92ced514354c940790c7fe1"}}}}