frepple::Load Class Reference

This class links a resource to a certain operation. More...

#include <model.h>

Inheritance diagram for frepple::Load:
frepple::utils::Object frepple::utils::Association< A, B, C >::Node frepple::Solvable

List of all members.

Public Member Functions

void beginElement (XMLInput &, const Attribute &)
void endElement (XMLInput &, const Attribute &, const DataElement &)
bool getHidden () const
virtual Date getLoadplanDate (const LoadPlan *) const
virtual double getLoadplanQuantity (const LoadPlan *) const
OperationgetOperation () const
double getQuantity () const
ResourcegetResource () const
virtual size_t getSize () const
virtual const MetaClassgetType () const
 Load ()
 Load (Operation *o, Resource *r, double u)
void setOperation (Operation *o)
void setQuantity (double f)
void setResource (Resource *r)
virtual void solve (Solver &s, void *v=NULL) const
virtual void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
 ~Load ()

Static Public Attributes

static const MetaCategorymetadata

Friends

class Operation
class Resource

Detailed Description

This class links a resource to a certain operation.

Definition at line 3507 of file model.h.


Constructor & Destructor Documentation

frepple::Load::Load ( Operation o,
Resource r,
double  u 
) [inline, explicit]

Constructor.

Definition at line 3516 of file model.h.

frepple::Load::~Load (  ) 

Destructor.

Definition at line 104 of file load.cpp.

frepple::Load::Load (  )  [inline]

Default constructor.

Definition at line 3575 of file model.h.


Member Function Documentation

void frepple::Load::beginElement ( XMLInput ,
const Attribute  
) [virtual]

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 158 of file load.cpp.

void frepple::Load::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.

Implements frepple::utils::Object.

Definition at line 167 of file load.cpp.

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

Returns whether an entity is real or dummy.

Reimplemented from frepple::utils::Object.

Definition at line 3563 of file model.h.

Date frepple::Load::getLoadplanDate ( const LoadPlan lp  )  const [inline, virtual]

This method holds the logic the compute the date of a loadplan.

Definition at line 4266 of file model.h.

double frepple::Load::getLoadplanQuantity ( const LoadPlan lp  )  const [inline, virtual]

This method holds the logic the compute the quantity of a loadplan.

Definition at line 4280 of file model.h.

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

Returns the operation consuming the resource capacity.

Definition at line 3528 of file model.h.

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

Returns how much capacity is consumed during the duration of the operationplan.

Definition at line 3543 of file model.h.

Resource* frepple::Load::getResource (  )  const [inline]

Returns the capacity resource being consumed.

Definition at line 3535 of file model.h.

virtual size_t frepple::Load::getSize (  )  const [inline, virtual]

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 3572 of file model.h.

virtual const MetaClass& frepple::Load::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.

Definition at line 3570 of file model.h.

void frepple::Load::setOperation ( Operation o  )  [inline]

Updates the operation being loaded. This method can only be called once for a load.

Definition at line 3532 of file model.h.

void frepple::Load::setQuantity ( double  f  )  [inline]

Updates the quantity of the load.

Exceptions:
DataException When a negative number is passed.

Definition at line 3548 of file model.h.

void frepple::Load::setResource ( Resource r  )  [inline]

Updates the capacity being consumed. This method can only be called once on a resource.

Definition at line 3539 of file model.h.

virtual void frepple::Load::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 3568 of file model.h.

void frepple::Load::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::utils::Object.

Definition at line 126 of file load.cpp.


Friends And Related Function Documentation

friend class Operation [friend]

Definition at line 3512 of file model.h.

friend class Resource [friend]

Definition at line 3511 of file model.h.


Member Data Documentation

Definition at line 3571 of file model.h.


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

Generated on 25 Sep 2009 for frePPLe by  doxygen 1.6.1