1#ifndef CYCLUS_SRC_PACKAGE_H_
2#define CYCLUS_SRC_PACKAGE_H_
8#include <boost/shared_ptr.hpp>
21 typedef boost::shared_ptr<Package>
Ptr;
27 double fill_max = std::numeric_limits<double>::max(),
59 std::string
name()
const {
return name_; }
65 std::string
strategy()
const {
return strategy_; }
75 throw ValueError(
"Resource::Package() cannot package into more than " +
81 <<
"package into " <<
pkgs
82 <<
" items at once, is this intended? "
95 return (std::numeric_limits<int>::max() / 10);
110 double fill_max = std::numeric_limits<double>::max(),
113 static constexpr char unpackaged_name_[11] =
"unpackaged";
114 static Ptr unpackaged_;
119 std::string strategy_;
136 typedef boost::shared_ptr<TransportUnit>
Ptr;
142 int fill_max = std::numeric_limits<int>::max(),
154 std::string
name()
const {
return name_; }
174 int fill_max = std::numeric_limits<int>::max(),
177 static const int unrestricted_id_ = 1;
178 static constexpr char unrestricted_name_[13] =
"unrestricted";
179 static Ptr unrestricted_;
180 static int next_tranport_unit_id_;
186 std::string strategy_;
boost::shared_ptr< DoubleDistribution > Ptr
Package is a class that packages materials into discrete items in ways.
static void ExceedsSplitLimits(int pkgs, std::string ss_extra="")
static Ptr Create(std::string name, double fill_min=0, double fill_max=std::numeric_limits< double >::max(), std::string strategy="first")
static Ptr & unpackaged()
boost::shared_ptr< Package > Ptr
static std::string unpackaged_name()
std::vector< double > GetFillMass(double qty)
Returns optimal fill mass for a resource to be packaged, and number of packages that can be crated at...
std::string strategy() const
bool IsValidStrategy(std::string strategy)
TransportUnit is a class that can be used in conjunction with packages to restrict the amount of mate...
std::string strategy() const
static std::string unrestricted_name()
int GetTransportUnitFill(int qty)
Returns number of packages for each transport unit.
static int unrestricted_id()
boost::shared_ptr< TransportUnit > Ptr
int MaxShippablePackages(int pkgs)
Returns the max number of transport units that can be shipped from the available quantity.
static Ptr Create(std::string name, int fill_min=0, int fill_max=std::numeric_limits< int >::max(), std::string strategy="first")
create a new transport unit type.
static Ptr & unrestricted()
For values that are too big, too small, etc.
Code providing rudimentary logging capability for the Cyclus core.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
@ LEV_INFO1
Information helpful for simulation users and developers alike - least verbose.
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters