1 #ifndef CYCLUS_SRC_TOOLKIT_RESOURCE_BUFF_H_ 2 #define CYCLUS_SRC_TOOLKIT_RESOURCE_BUFF_H_ 75 return std::max(0.0, capacity_ - qty_);
91 Manifest
PopQty(
double qty);
105 Manifest
PopN(
int num);
121 return boost::dynamic_pointer_cast<T>(
Pop());
152 for (
int i = 0; i < rs.size(); i++) {
153 tot_qty += rs.at(i)->quantity();
156 throw ValueError(
"Resource pushing breaks capacity limit.");
159 for (
int i = 0; i < rs.size(); i++) {
160 if (mats_present_.count(rs.at(i)) == 1) {
161 throw KeyError(
"Duplicate resource pushing attempted");
165 for (
int i = 0; i < rs.size(); i++) {
166 mats_.push_back(rs[i]);
167 mats_present_.insert(rs[i]);
181 std::list<Resource::Ptr> mats_;
182 std::set<Resource::Ptr> mats_present_;
188 #endif // CYCLUS_SRC_TOOLKIT_RESOURCE_BUFF_H_
For values that are too big, too small, etc.
double eps_rsrc()
an epsilon value to be used by resources
boost::shared_ptr< Resource > Ptr
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.
For failed retrieval/insertion of key-based data into/from data structures.
double eps()
a generic epsilon value