diff --git a/src/storage.cc b/src/storage.cc index 96487b44c..bbc306e76 100644 --- a/src/storage.cc +++ b/src/storage.cc @@ -182,8 +182,9 @@ void Storage::EnterNotify() { } buy_policy.Start(); + int package_id_ = context()->GetPackageByName(package)->id(); if (out_commods.size() == 1) { - sell_policy.Init(this, &stocks, std::string("stocks"), 1e+299, false, sell_quantity) + sell_policy.Init(this, &stocks, std::string("stocks"), 1e+299, false, sell_quantity, package_id_) .Set(out_commods.front()) .Start(); diff --git a/src/storage.h b/src/storage.h index 0e8f0c7b5..01186fdf4 100644 --- a/src/storage.h +++ b/src/storage.h @@ -58,6 +58,7 @@ namespace cycamore { /// buying_size_max is the maximum size of the buy request if buying_size_type is Uniform (required) or Normal (optional) /// buying_size_mean is the mean size of the buy request if buying_size_type is Normal /// buying_size_stddev is the standard deviation of the buy request if buying_size_type is Normal +/// package is the name of the package type to ship /// /// @section detailed Detailed Behavior /// @@ -429,6 +430,13 @@ class Storage "uilabel": "Cumulative Cap"} double cumulative_cap; + #pragma cyclus var {"default": "unpackaged", \ + "tooltip": "Output package", \ + "doc": "Outgoing material will be packaged when trading.", \ + "uitype": "package", \ + "uilabel": "Package"} + std::string package; + #pragma cyclus var {"tooltip":"Incoming material buffer"} cyclus::toolkit::ResBuf inventory;