frepple::Resource Class Reference

This class represents a workcentre, a physical or logical representation of capacity. More...

#include <model.h>

Inheritance diagram for frepple::Resource:
frepple::utils::HasHierarchy< Resource > frepple::HasLevel frepple::Plannable frepple::utils::HasDescription frepple::utils::HasName< Resource > frepple::utils::Object frepple::HasProblems frepple::Solvable frepple::utils::NonCopyable frepple::utils::Tree::TreeNode frepple::ResourceDefault frepple::ResourceInfinite

List of all members.

Public Types

typedef Association< Operation,
Resource, Load >::ListB 
loadlist
typedef TimeLine< LoadPlanloadplanlist

Public Member Functions

void beginElement (XMLInput &, const Attribute &)
void deleteOperationPlans (bool=false)
void endElement (XMLInput &, const Attribute &, const DataElement &)
size_t extrasize () const
LoadfindLoad (const Operation *o, Date d) const
double getCost () const
bool getHidden () const
loadplanlistgetLoadPlans ()
const loadplanlistgetLoadPlans () const
const loadlistgetLoads () const
LocationgetLocation () const
CalendarDoublegetMaximum () const
virtual const MetaClassgetType () const
 Resource (const string &str)
void setCost (const double c)
void setHidden (bool b)
void setLocation (Location *i)
void setMaximum (CalendarDouble *c)
virtual void solve (Solver &s, void *v=NULL) const
virtual void updateProblems ()
virtual void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
virtual ~Resource ()

Static Public Attributes

static const MetaCategorymetadata

Friends

class Load
class LoadPlan

Detailed Description

This class represents a workcentre, a physical or logical representation of capacity.

Definition at line 3374 of file model.h.


Member Typedef Documentation

Definition at line 3406 of file model.h.

Definition at line 3407 of file model.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 3382 of file model.h.

frepple::Resource::~Resource (  )  [virtual]

Destructor.

Definition at line 197 of file resource.cpp.


Member Function Documentation

void frepple::Resource::beginElement ( XMLInput pIn,
const Attribute pAttr 
)

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

Definition at line 130 of file resource.cpp.

void frepple::Resource::deleteOperationPlans ( bool  deleteLocked = false  ) 

Deletes all operationplans loading this resource. The boolean parameter controls whether we delete also locked operationplans or not.

Definition at line 186 of file resource.cpp.

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

Definition at line 150 of file resource.cpp.

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

Returns the memory size in bytes.

Reimplemented from frepple::utils::HasDescription.

Definition at line 3429 of file model.h.

Load* frepple::Resource::findLoad ( const Operation o,
Date  d 
) const [inline]

Return the load that is associates a given operation with this resource. Returns NULL is no such load exists.

Definition at line 3422 of file model.h.

double frepple::Resource::getCost (  )  const [inline]

Returns the cost of using 1 unit of this resource for 1 hour.
The default value is 0.0.

Definition at line 3397 of file model.h.

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

Returns whether an entity is real or dummy.

Reimplemented from frepple::utils::Object.

Definition at line 3449 of file model.h.

loadplanlist& frepple::Resource::getLoadPlans (  )  [inline]

Returns a reference to the list of loadplans.

Definition at line 3413 of file model.h.

const loadplanlist& frepple::Resource::getLoadPlans (  )  const [inline]

Returns a reference to the list of loadplans.

Definition at line 3410 of file model.h.

const loadlist& frepple::Resource::getLoads (  )  const [inline]

Returns a constant reference to the list of loads. It defines which operations are using the resource.

Definition at line 3418 of file model.h.

Location* frepple::Resource::getLocation (  )  const [inline]

Returns the location of this resource.

Definition at line 3433 of file model.h.

CalendarDouble* frepple::Resource::getMaximum (  )  const [inline]

Return a pointer to the maximum capacity profile.

Definition at line 3392 of file model.h.

virtual const MetaClass& frepple::Resource::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::ResourceDefault, and frepple::ResourceInfinite.

Definition at line 3451 of file model.h.

void frepple::Resource::setCost ( const double  c  )  [inline]

Update the cost of using 1 unit of this resource for 1 hour.

Definition at line 3400 of file model.h.

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

Mark the object as hidden or not. Hidden objects are not exported and are used only as dummy constructs.

Reimplemented from frepple::utils::Object.

Definition at line 3448 of file model.h.

void frepple::Resource::setLocation ( Location i  )  [inline]

Updates the location of this resource.

Definition at line 3436 of file model.h.

void frepple::Resource::setMaximum ( CalendarDouble c  ) 

Updates the size of a resource.

Definition at line 36 of file resource.cpp.

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

Reimplemented in frepple::ResourceInfinite.

Definition at line 3438 of file model.h.

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

Recompute the problems of this resource.

Implements frepple::HasProblems.

Definition at line 34 of file problems_resource.cpp.

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

Definition at line 73 of file resource.cpp.


Friends And Related Function Documentation

friend class Load [friend]

Definition at line 3377 of file model.h.

friend class LoadPlan [friend]

Definition at line 3378 of file model.h.


Member Data Documentation

Reimplemented in frepple::ResourceDefault, and frepple::ResourceInfinite.

Definition at line 3452 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