frepple::Resource Class Reference
This class represents a workcentre, a physical or logical representation of capacity. More...
#include <model.h>

Public Types | |
| typedef Association< Operation, Resource, Load >::ListB | loadlist |
| typedef TimeLine< LoadPlan > | loadplanlist |
Public Member Functions | |
| void | beginElement (XMLInput &, const Attribute &) |
| void | deleteOperationPlans (bool=false) |
| void | endElement (XMLInput &, const Attribute &, const DataElement &) |
| size_t | extrasize () const |
| Load * | findLoad (const Operation *o, Date d) const |
| double | getCost () const |
| bool | getHidden () const |
| loadplanlist & | getLoadPlans () |
| const loadplanlist & | getLoadPlans () const |
| const loadlist & | getLoads () const |
| Location * | getLocation () const |
| CalendarDouble * | getMaximum () const |
| virtual const MetaClass & | getType () 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 MetaCategory | metadata |
Friends | |
| class | Load |
| class | LoadPlan |
Detailed Description
This class represents a workcentre, a physical or logical representation of capacity.Definition at line 3278 of file model.h.
Member Typedef Documentation
| typedef Association<Operation,Resource,Load>::ListB frepple::Resource::loadlist |
Constructor & Destructor Documentation
| frepple::Resource::Resource | ( | const string & | str | ) | [inline, explicit] |
| frepple::Resource::~Resource | ( | ) | [virtual] |
Destructor.
Definition at line 190 of file resource.cpp.
Member Function Documentation
| 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 179 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 also valid. NOTE: each object receives both its own beginElement so it can process its own element tag attributes, and its own endElement so it can process its own character data.
Reimplemented from frepple::Plannable.
Definition at line 149 of file resource.cpp.
| size_t frepple::Resource::extrasize | ( | ) | const [inline] |
Returns the memory size in bytes.
Reimplemented from frepple::utils::HasDescription.
| double frepple::Resource::getCost | ( | ) | const [inline] |
| bool frepple::Resource::getHidden | ( | ) | const [inline, virtual] |
Returns whether an entity is real or dummy.
Reimplemented from frepple::utils::Object.
| loadplanlist& frepple::Resource::getLoadPlans | ( | ) | [inline] |
| const loadplanlist& frepple::Resource::getLoadPlans | ( | ) | const [inline] |
| const loadlist& frepple::Resource::getLoads | ( | ) | const [inline] |
| Location* frepple::Resource::getLocation | ( | ) | const [inline] |
| CalendarDouble* frepple::Resource::getMaximum | ( | ) | const [inline] |
| 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.
| void frepple::Resource::setCost | ( | const double | c | ) | [inline] |
| 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.
| void frepple::Resource::setLocation | ( | Location * | i | ) | [inline] |
| void frepple::Resource::setMaximum | ( | CalendarDouble * | c | ) |
Updates the size of a resource.
Definition at line 37 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.
| void frepple::Resource::updateProblems | ( | ) | [virtual] |
Recompute the problems of this resource.
Implements frepple::HasProblems.
Definition at line 35 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 74 of file resource.cpp.
Friends And Related Function Documentation
Member Data Documentation
const MetaCategory frepple::Resource::metadata [static] |
Reimplemented in frepple::ResourceDefault, and frepple::ResourceInfinite.
The documentation for this class was generated from the following files:
Documentation generated by
