A buffer represents a combination of a item and location.
It is the entity for keeping modeling inventory.
More...
#include <model.h>
Public Types | |
typedef Association< Operation, Buffer, Flow >::ListB | flowlist |
typedef TimeLine< FlowPlan > | flowplanlist |
Public Member Functions | |
virtual void | beginElement (XMLInput &, const Attribute &) |
Buffer (const string &str) | |
void | deleteOperationPlans (bool deleteLockedOpplans=false) |
virtual void | endElement (XMLInput &, const Attribute &, const DataElement &) |
size_t | extrasize () const |
Flow * | findFlow (const Operation *o, Date d) const |
virtual void | followPegging (PeggingIterator &, FlowPlan *, short, double, double) |
virtual PyObject * | getattro (const Attribute &) |
double | getCarryingCost () const |
const flowplanlist & | getFlowPlans () const |
flowplanlist & | getFlowPlans () |
const flowlist & | getFlows () const |
bool | getHidden () const |
Item * | getItem () const |
Location * | getLocation () const |
double | getMaximum () const |
CalendarDouble * | getMaximumCalendar () const |
double | getMinimum () const |
CalendarDouble * | getMinimumCalendar () const |
double | getOnHand (Date d=Date::infinitePast) const |
double | getOnHand (Date, Date, bool min=true) const |
Operation * | getProducingOperation () const |
virtual const MetaClass & | getType () const |
virtual int | setattro (const Attribute &, const PythonObject &) |
void | setCarryingCost (const double c) |
void | setHidden (bool b) |
void | setItem (Item *i) |
void | setLocation (Location *i) |
void | setMaximum (double) |
void | setMaximumCalendar (CalendarDouble *) |
void | setMinimum (double) |
void | setMinimumCalendar (CalendarDouble *) |
void | setOnHand (double f) |
void | setProducingOperation (Operation *o) |
virtual void | solve (Solver &s, void *v=NULL) const |
virtual void | updateProblems () |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
virtual | ~Buffer () |
![]() | |
memberIterator | beginMember () const |
unsigned short | getHierarchyLevel () const |
Buffer * | getOwner () const |
HasHierarchy (const string &n) | |
bool | hasOwner () const |
bool | isGroup () const |
void | setOwner (Buffer *f) |
~HasHierarchy () | |
![]() | |
int | compare (const PyObject *other) const |
HasName (const string &n) | |
HasName (const char *n) | |
void | setName (const string &newname) |
virtual PyObject * | str () const |
~HasName () | |
![]() | |
TreeNode * | decrement () const |
const string & | getName () const |
TreeNode * | increment () const |
bool | operator< (const TreeNode &o) |
TreeNode (const string &n) | |
virtual | ~TreeNode () |
![]() | |
virtual size_t | getSize () const =0 |
Object () | |
virtual | ~Object () |
![]() | |
virtual PyObject * | call (const PythonObject &args, const PythonObject &kwds) |
Py_ssize_t | getReferenceCount () const |
void | initType (const MetaClass *t) |
void | initType (PyTypeObject *t) |
virtual PyObject * | iternext () |
PythonExtensionBase () | |
void | resetReferenceCount () |
virtual | ~PythonExtensionBase () |
![]() | |
unsigned short | getCluster () const |
short | getLevel () const |
![]() | |
bool | getChanged () const |
bool | getDetectProblems () const |
Plannable * | getEntity () const |
Plannable () | |
void | setChanged (bool b=true) |
void | setDetectProblems (bool b) |
![]() | |
HasProblems () | |
virtual | ~HasProblems () |
![]() | |
virtual | ~Solvable () |
![]() | |
string | getCategory () const |
string | getDescription () const |
string | getSubCategory () const |
void | setCategory (const string &f) |
void | setDescription (const string &f) |
void | setSubCategory (const string &f) |
Static Public Member Functions | |
static int | initialize () |
![]() | |
static unsigned short | getNumberOfClusters () |
static unsigned short | getNumberOfHangingClusters () |
static void | triggerLazyRecomputation () |
![]() | |
static void | computeProblems () |
![]() | |
static EntityIterator | beginEntity () |
static EntityIterator | endEntity () |
Static Public Attributes | |
static const MetaCategory * | metadata |
Friends | |
class | Flow |
class | FlowPlan |
Additional Inherited Members | |
![]() | |
HasLevel () | |
HasLevel (const HasLevel &o) | |
~HasLevel () | |
![]() | |
static void | computeLevels () |
A buffer represents a combination of a item and location.
It is the entity for keeping modeling inventory.
typedef Association<Operation,Buffer,Flow>::ListB frepple::Buffer::flowlist |
|
inlineexplicit |
|
virtual |
Destructor.
Definition at line 507 of file buffer.cpp.
Called while restoring the model from an XML-file.
This is called for each element within the "this" element, for which the "this" element is immediate parent.
It is called when the open element tag is encountered.
Reimplemented from frepple::utils::HasHierarchy< Buffer >.
Definition at line 263 of file buffer.cpp.
void frepple::Buffer::deleteOperationPlans | ( | bool | deleteLockedOpplans = false | ) |
Deletes all operationplans consuming from or producing from this buffer. The boolean parameter controls whether we delete also locked operationplans or not.
Definition at line 496 of file buffer.cpp.
|
virtual |
Reimplemented from frepple::Plannable.
Reimplemented in frepple::BufferProcure.
Definition at line 289 of file buffer.cpp.
|
inline |
Returns the memory size in bytes.
Reimplemented from frepple::utils::HasDescription.
|
virtual |
This function matches producing and consuming operationplans with each other, and updates the pegging iterator accordingly.
Definition at line 525 of file buffer.cpp.
|
virtual |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Reimplemented in frepple::BufferProcure.
Definition at line 775 of file buffer.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Returns whether an entity is real or dummy.
Reimplemented from frepple::utils::Object.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
double frepple::Buffer::getOnHand | ( | Date | d = Date::infinitePast | ) | const |
Returns the available material on hand immediately after the given date.
Definition at line 141 of file buffer.cpp.
Returns minimum or maximum available material on hand in the given daterange. The third parameter specifies whether we return the minimum (which is the default) or the maximum value. The computation is INclusive the start and end dates.
Definition at line 159 of file buffer.cpp.
|
inline |
|
inlinevirtual |
This returns the type information on the object, a bit similar to the standard type_info information.
Implements frepple::utils::Object.
Reimplemented in frepple::BufferProcure, frepple::BufferInfinite, and frepple::BufferDefault.
|
static |
Initialize the class.
Reimplemented in frepple::BufferProcure, frepple::BufferInfinite, and frepple::BufferDefault.
Definition at line 43 of file buffer.cpp.
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Reimplemented in frepple::BufferProcure.
Definition at line 821 of file buffer.cpp.
|
inline |
|
inlinevirtual |
Mark the object as hidden or not. Hidden objects are not exported and are used only as dummy constructs.
Reimplemented from frepple::utils::Object.
|
inline |
|
inline |
void frepple::Buffer::setMaximum | ( | double | m | ) |
Updates the minimum inventory target for the buffer.
Definition at line 426 of file buffer.cpp.
void frepple::Buffer::setMaximumCalendar | ( | CalendarDouble * | cal | ) |
Updates the minimum inventory target for the buffer.
Definition at line 457 of file buffer.cpp.
void frepple::Buffer::setMinimum | ( | double | m | ) |
Updates the minimum inventory target for the buffer.
Definition at line 356 of file buffer.cpp.
void frepple::Buffer::setMinimumCalendar | ( | CalendarDouble * | cal | ) |
Updates the minimum inventory target for the buffer.
Definition at line 387 of file buffer.cpp.
void frepple::Buffer::setOnHand | ( | double | f | ) |
Update the on-hand inventory at the start of the planning horizon.
Definition at line 92 of file buffer.cpp.
|
inline |
|
inlinevirtual |
This method is called by solver classes. The implementation of this class simply calls the solve method on the solver class. Using the polymorphism the solver can implement seperate methods for different plannable subclasses.
Reimplemented from frepple::Solvable.
Reimplemented in frepple::BufferProcure, and frepple::BufferInfinite.
|
virtual |
Called to update the list of problems. The function will only be called when:
Implements frepple::HasProblems.
Definition at line 28 of file problems_buffer.cpp.
|
virtual |
Reimplemented from frepple::Plannable.
Reimplemented in frepple::BufferProcure, and frepple::BufferInfinite.
Definition at line 204 of file buffer.cpp.
|
static |
Reimplemented in frepple::BufferProcure, frepple::BufferInfinite, and frepple::BufferDefault.