CYCLUS
|
TransportUnit is a class that can be used in conjunction with packages to restrict the amount of material that can be traded between facilities.
Unlike Packages, TransportUnits are not a property of resources. They are simply applied at the response to request for bids phase and then the trade execution to determine whether the available number of packages is allowable given the TransportUnit parameters. Default is unrestricted Strategy "first" simply fill transport units one by one to max fill Strategy "equal" tries to fill all transport units with the Strategy "hybrid" is iterative, recursively filling transport units with the max fill until the remaining quantity can be filled with the at least the min fill. This is the most efficient strategy
#include <package.h>
Public Types | |
typedef boost::shared_ptr< TransportUnit > | Ptr |
Public Member Functions | |
int | fill_max () const |
int | fill_min () const |
int | GetTransportUnitFill (int qty) |
int | MaxShippablePackages (int pkgs) |
std::string | name () const |
std::string | strategy () const |
Static Public Member Functions | |
static Ptr | Create (std::string name, int fill_min=0, int fill_max=std::numeric_limits< int >::max(), std::string strategy="first") |
static Ptr & | unrestricted () |
static int | unrestricted_id () |
static std::string | unrestricted_name () |
typedef boost::shared_ptr<TransportUnit> cyclus::TransportUnit::Ptr |
|
static |
create a new transport unit type.
Should be called by the context only (see Context::AddTransportUnit), unless you want an untracked transport unit type (which you probably don't)
Definition at line 117 of file package.cc.
Returns number of packages for each transport unit.
same number of packages
Definition at line 138 of file package.cc.
Returns the max number of transport units that can be shipped from the available quantity.
Definition at line 165 of file package.cc.
|
inline |
|
static |
Definition at line 131 of file package.cc.
|
inlinestatic |