Represents the (independent) demand in the system. It can represent a customer order or a forecast. More...
#include <model.h>
Public Types | |
typedef slist< OperationPlan * > | OperationPlan_list |
Public Member Functions | |
void | addDelivery (OperationPlan *o) |
virtual void | beginElement (XMLInput &, const Attribute &) |
void | deleteOperationPlans (bool deleteLockedOpplans=false, CommandManager *=NULL) |
Demand (const string &str) | |
virtual void | endElement (XMLInput &, const Attribute &, const DataElement &) |
size_t | extrasize () const |
virtual PyObject * | getattro (const Attribute &) |
int | getCluster () const |
const Problem::List & | getConstraints () const |
Problem::List & | getConstraints () |
Customer * | getCustomer () const |
const OperationPlan_list & | getDelivery () const |
Operation * | getDeliveryOperation () const |
const Date & | getDue () const |
OperationPlan * | getEarliestDelivery () const |
bool | getHidden () const |
Item * | getItem () const |
OperationPlan * | getLatestDelivery () const |
TimePeriod | getMaxLateness () const |
double | getMinShipment () const |
Operation * | getOperation () const |
double | getPlannedQuantity () const |
int | getPriority () const |
double | getQuantity () const |
virtual const MetaClass & | getType () const |
void | removeDelivery (OperationPlan *o) |
virtual int | setattro (const Attribute &, const PythonObject &) |
virtual void | setCustomer (Customer *c) |
virtual void | setDue (Date d) |
void | setHidden (bool b) |
virtual void | setItem (Item *i) |
virtual void | setMaxLateness (TimePeriod m) |
virtual void | setMinShipment (double m) |
virtual void | setOperation (Operation *o) |
virtual void | setPriority (int i) |
virtual void | setQuantity (double) |
virtual void | solve (Solver &s, void *v=NULL) const |
virtual void | updateProblems () |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
virtual | ~Demand () |
![]() | |
void | beginElement (XMLInput &, const Attribute &) |
memberIterator | beginMember () const |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
unsigned short | getHierarchyLevel () const |
Demand * | getOwner () const |
HasHierarchy (const string &n) | |
bool | hasOwner () const |
bool | isGroup () const |
void | setOwner (Demand *f) |
void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
~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 () |
![]() | |
bool | getChanged () const |
bool | getDetectProblems () const |
Plannable * | getEntity () const |
Plannable () | |
void | setChanged (bool b=true) |
void | setDetectProblems (bool b) |
![]() | |
HasProblems () | |
virtual | ~HasProblems () |
![]() | |
virtual | ~Solvable () |
![]() | |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
string | getCategory () const |
string | getDescription () const |
string | getSubCategory () const |
void | setCategory (const string &f) |
void | setDescription (const string &f) |
void | setSubCategory (const string &f) |
void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
Static Public Member Functions | |
static int | initialize () |
![]() | |
static void | computeProblems () |
![]() | |
static EntityIterator | beginEntity () |
static EntityIterator | endEntity () |
Static Public Attributes | |
static const MetaCategory * | metadata |
Additional Inherited Members | |
![]() | |
NonCopyable () | |
~NonCopyable () | |
![]() | |
size_t | extrasize () const |
![]() | |
static PythonType * | registerPythonType (int, const type_info *) |
![]() | |
static vector< PythonType * > | table |
Represents the (independent) demand in the system. It can represent a customer order or a forecast.
This is an abstract class.
typedef slist<OperationPlan*> frepple::Demand::OperationPlan_list |
|
inlineexplicit |
|
virtual |
Destructor. Deleting the demand will also delete all delivery operation plans (including locked ones) and reset the motive on any operationplans.
Definition at line 67 of file demand.cpp.
void frepple::Demand::addDelivery | ( | OperationPlan * | o | ) |
Adds a delivery operationplan for this demand.
Definition at line 188 of file demand.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::Object.
Definition at line 310 of file demand.cpp.
void frepple::Demand::deleteOperationPlans | ( | bool | deleteLockedOpplans = false , |
CommandManager * | cmds = NULL |
||
) |
Deletes all delivery operationplans of this demand.
The (optional) boolean parameter controls whether we delete also locked operationplans or not.
The second (optional) argument is a command list that can be used to remove the operationplans in an undo-able way.
Definition at line 79 of file demand.cpp.
|
virtual |
Reimplemented from frepple::Plannable.
Definition at line 325 of file demand.cpp.
|
virtual |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 371 of file demand.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
const Demand::OperationPlan_list & frepple::Demand::getDelivery | ( | ) | const |
Returns the delivery operationplan list.
Definition at line 139 of file demand.cpp.
Operation * frepple::Demand::getDeliveryOperation | ( | ) | const |
This function returns the operation that is to be used to satisfy this demand. In sequence of priority this goes as follows: 1) If the "operation" field on the demand is set, use it. 2) Otherwise, use the "delivery" field of the requested item. 3) Else, return NULL. This demand can't be satisfied!
Definition at line 225 of file demand.cpp.
|
inline |
OperationPlan * frepple::Demand::getEarliestDelivery | ( | ) | const |
Returns the earliest delivery operationplan.
Definition at line 178 of file demand.cpp.
|
inlinevirtual |
Returns true if this demand is to be hidden from serialization.
Reimplemented from frepple::utils::Object.
|
inline |
OperationPlan * frepple::Demand::getLatestDelivery | ( | ) | const |
Returns the latest delivery operationplan.
Definition at line 171 of file demand.cpp.
|
inline |
|
inline |
|
inline |
double frepple::Demand::getPlannedQuantity | ( | ) | const |
Returns the total amount that has been planned.
Definition at line 236 of file demand.cpp.
|
inline |
|
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::DemandDefault.
|
static |
Definition at line 32 of file demand.cpp.
void frepple::Demand::removeDelivery | ( | OperationPlan * | o | ) |
Removes a delivery operationplan for this demand.
Definition at line 109 of file demand.cpp.
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 413 of file demand.cpp.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Specifies whether of not this demand is to be hidden from serialization. The default value is false.
Reimplemented from frepple::utils::Object.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
Updates the quantity of the demand. The quantity must be be greater than or equal to 0.
Definition at line 55 of file demand.cpp.
|
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.
|
virtual |
Recompute the problems.
Implements frepple::HasProblems.
Definition at line 28 of file problems_demand.cpp.
|
virtual |
Reimplemented from frepple::Plannable.
Definition at line 245 of file demand.cpp.
|
static |