frepple::Demand Class Reference

Represents the (independent) demand in the system. It can represent a customer order or a forecast. More...

#include <model.h>

Inheritance diagram for frepple::Demand:
frepple::utils::HasHierarchy< Demand > frepple::Plannable frepple::utils::HasDescription frepple::utils::HasName< Demand > frepple::utils::Object frepple::HasProblems frepple::Solvable frepple::utils::NonCopyable frepple::utils::Tree::TreeNode frepple::DemandDefault module_forecast::Forecast module_forecast::ForecastBucket

List of all members.

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)
 Demand (const string &str)
virtual void endElement (XMLInput &, const Attribute &, const DataElement &)
size_t extrasize () const
int getCluster () const
CustomergetCustomer () const
const OperationPlan_listgetDelivery () const
OperationgetDeliveryOperation () const
const DategetDue () const
OperationPlangetEarliestDelivery () const
bool getHidden () const
ItemgetItem () const
OperationPlangetLatestDelivery () const
TimePeriod getMaxLateness () const
double getMinShipment () const
OperationgetOperation () const
double getPlannedQuantity () const
int getPriority () const
double getQuantity () const
virtual const MetaClassgetType () const
void removeDelivery (OperationPlan *o)
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 ()

Static Public Attributes

static const MetaCategorymetadata

Detailed Description

Represents the (independent) demand in the system. It can represent a customer order or a forecast.

This is an abstract class.

Definition at line 3979 of file model.h.


Member Typedef Documentation

Definition at line 3983 of file model.h.


Constructor & Destructor Documentation

frepple::Demand::Demand ( const string &  str  )  [inline, explicit]

Constructor.

Definition at line 3986 of file model.h.

virtual frepple::Demand::~Demand (  )  [inline, virtual]

Destructor. Deleting the demand will also delete all delivery operation plans

Definition at line 3992 of file model.h.


Member Function Documentation

void frepple::Demand::addDelivery ( OperationPlan o  ) 

Adds a delivery operationplan for this demand.

Definition at line 151 of file demand.cpp.

void frepple::Demand::beginElement ( XMLInput pIn,
const Attribute pAttr 
) [virtual]

Reimplemented from frepple::utils::HasHierarchy< Demand >.

Reimplemented in module_forecast::Forecast.

Definition at line 249 of file demand.cpp.

void frepple::Demand::deleteOperationPlans ( bool  deleteLockedOpplans = false  ) 

Deletes all delivery operationplans of this demand. The boolean parameter controls whether we delete also locked operationplans or not.

Definition at line 48 of file demand.cpp.

void frepple::Demand::endElement ( XMLInput ,
const Attribute ,
const DataElement  
) [virtual]

Called while restoring the model from an XML-file.
This is called when the corresponding close element tag is encountered, and the Data() member of pElement is valid.

Reimplemented from frepple::Plannable.

Reimplemented in module_forecast::Forecast.

Definition at line 264 of file demand.cpp.

size_t frepple::Demand::extrasize (  )  const [inline]

Returns the memory size in bytes.

Reimplemented from frepple::utils::HasDescription.

Definition at line 4081 of file model.h.

int frepple::Demand::getCluster (  )  const [inline]

Returns the cluster which this demand belongs to.

Definition at line 4033 of file model.h.

Customer* frepple::Demand::getCustomer (  )  const [inline]

Returns the customer.

Definition at line 4069 of file model.h.

const Demand::OperationPlan_list & frepple::Demand::getDelivery (  )  const

Returns the delivery operationplan list.

Definition at line 102 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 188 of file demand.cpp.

const Date& frepple::Demand::getDue (  )  const [inline]

Returns the due date of the demand.

Definition at line 4063 of file model.h.

OperationPlan * frepple::Demand::getEarliestDelivery (  )  const

Returns the earliest delivery operationplan.

Definition at line 141 of file demand.cpp.

bool frepple::Demand::getHidden (  )  const [inline, virtual]

Returns true if this demand is to be hidden from serialization.

Reimplemented from frepple::utils::Object.

Definition at line 4130 of file model.h.

Item* frepple::Demand::getItem (  )  const [inline]

Returns the item/product being requested.

Definition at line 4012 of file model.h.

OperationPlan * frepple::Demand::getLatestDelivery (  )  const

Returns the latest delivery operationplan.

Definition at line 134 of file demand.cpp.

TimePeriod frepple::Demand::getMaxLateness (  )  const [inline]

Return the maximum delay allowed in satisfying this demand.
The default value is infinite.

Definition at line 4092 of file model.h.

double frepple::Demand::getMinShipment (  )  const [inline]

Return the minimum shipment quantity allowed in satisfying this demand.
The default value is 0, which allows deliveries of any size.

Definition at line 4109 of file model.h.

Operation* frepple::Demand::getOperation (  )  const [inline]

This fields points to an operation that is to be used to plan the demand. By default, the field is left to NULL and the demand will then be planned using the delivery operation of its item.

See also:
Item::getDelivery()

Definition at line 4022 of file model.h.

double frepple::Demand::getPlannedQuantity (  )  const

Returns the total amount that has been planned.

Definition at line 199 of file demand.cpp.

int frepple::Demand::getPriority (  )  const [inline]

Returns the priority of the demand.
Lower numbers indicate a higher priority level.

Definition at line 4004 of file model.h.

double frepple::Demand::getQuantity (  )  const [inline]

Returns the quantity of the demand.

Definition at line 3995 of file model.h.

virtual const MetaClass& frepple::Demand::getType (  )  const [inline, virtual]

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, module_forecast::Forecast, and module_forecast::ForecastBucket.

Definition at line 4132 of file model.h.

void frepple::Demand::removeDelivery ( OperationPlan o  ) 

Removes a delivery operationplan for this demand.

Definition at line 72 of file demand.cpp.

virtual void frepple::Demand::setCustomer ( Customer c  )  [inline, virtual]

Updates the customer.

Reimplemented in module_forecast::Forecast.

Definition at line 4072 of file model.h.

virtual void frepple::Demand::setDue ( Date  d  )  [inline, virtual]

Updates the due date of the demand.

Definition at line 4066 of file model.h.

void frepple::Demand::setHidden ( bool  b  )  [inline, virtual]

Specifies whether of not this demand is to be hidden from serialization. The default value is false.

Reimplemented from frepple::utils::Object.

Definition at line 4127 of file model.h.

virtual void frepple::Demand::setItem ( Item i  )  [inline, virtual]

Updates the item/product being requested.

Reimplemented in module_forecast::Forecast.

Definition at line 4015 of file model.h.

virtual void frepple::Demand::setMaxLateness ( TimePeriod  m  )  [inline, virtual]

Updates the maximum allowed lateness for this demand.
The default value is infinite.
The argument must be a positive time period.

Reimplemented in module_forecast::Forecast.

Definition at line 4098 of file model.h.

virtual void frepple::Demand::setMinShipment ( double  m  )  [inline, virtual]

Updates the maximum allowed lateness for this demand.
The default value is infinite.
The argument must be a positive time period.

Reimplemented in module_forecast::Forecast.

Definition at line 4115 of file model.h.

virtual void frepple::Demand::setOperation ( Operation o  )  [inline, virtual]

Updates the operation being used to plan the demand.

Reimplemented in module_forecast::Forecast.

Definition at line 4040 of file model.h.

virtual void frepple::Demand::setPriority ( int  i  )  [inline, virtual]

Updates the due date of the demand.
Lower numbers indicate a higher priority level.

Reimplemented in module_forecast::Forecast.

Definition at line 4009 of file model.h.

void frepple::Demand::setQuantity ( double  f  )  [virtual]

Updates the quantity of the demand. The quantity must be be greater than or equal to 0.

Reimplemented in module_forecast::Forecast.

Definition at line 36 of file demand.cpp.

virtual void frepple::Demand::solve ( Solver s,
void *  v = NULL 
) const [inline, virtual]

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.

Definition at line 4087 of file model.h.

void frepple::Demand::updateProblems (  )  [virtual]

Recompute the problems.

Implements frepple::HasProblems.

Definition at line 34 of file problems_demand.cpp.

void frepple::Demand::writeElement ( XMLOutput ,
const Keyword ,
mode  = DEFAULT 
) const [virtual]

Called while writing the model into an XML-file. The user class should write itself out, using the IOutStream members for its "simple" members and calling writeElement recursively for any contained objects. Not all classes are expected to implement this method. In instances of such a class can be created but can't be persisted. E.g. Command

Reimplemented from frepple::Plannable.

Reimplemented in module_forecast::Forecast.

Definition at line 208 of file demand.cpp.


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on 25 Sep 2009 for frePPLe by  doxygen 1.6.1