This class represents a workcentre, a physical or logical representation of capacity. More...
#include <model.h>
Classes | |
class | PlanIterator |
This class provides an efficient way to iterate over the plan of a resource aggregated in time buckets. More... | |
Public Types | |
typedef Association< Operation, Resource, Load >::ListB | loadlist |
typedef TimeLine< LoadPlan > | loadplanlist |
typedef Association< Resource, Skill, ResourceSkill >::ListA | skilllist |
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 |
virtual PyObject * | getattro (const Attribute &) |
double | getCost () const |
bool | getHidden () const |
const loadplanlist & | getLoadPlans () const |
loadplanlist & | getLoadPlans () |
const loadlist & | getLoads () const |
Location * | getLocation () const |
TimePeriod | getMaxEarly () const |
double | getMaximum () const |
CalendarDouble * | getMaximumCalendar () const |
const string & | getSetup () const |
SetupMatrix * | getSetupMatrix () const |
const skilllist & | getSkills () const |
virtual const MetaClass & | getType () const |
Resource (const string &str) | |
virtual int | setattro (const Attribute &, const PythonObject &) |
void | setCost (const double c) |
void | setHidden (bool b) |
void | setLocation (Location *i) |
void | setMaxEarly (TimePeriod c) |
void | setMaximum (double) |
void | setMaximumCalendar (CalendarDouble *) |
void | setSetup (const string s) |
void | setSetupMatrix (SetupMatrix *s) |
virtual void | solve (Solver &s, void *v=NULL) const |
virtual void | updateProblems () |
virtual void | updateSetups (const LoadPlan *=NULL) |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
virtual | ~Resource () |
![]() | |
void | beginElement (XMLInput &, const Attribute &) |
memberIterator | beginMember () const |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
unsigned short | getHierarchyLevel () const |
Resource * | getOwner () const |
HasHierarchy (const string &n) | |
bool | hasOwner () const |
bool | isGroup () const |
void | setOwner (Resource *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 () |
![]() | |
unsigned short | getCluster () const |
short | getLevel () const |
![]() | |
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 unsigned short | getNumberOfClusters () |
static unsigned short | getNumberOfHangingClusters () |
static void | triggerLazyRecomputation () |
![]() | |
static void | computeProblems () |
![]() | |
static EntityIterator | beginEntity () |
static EntityIterator | endEntity () |
Static Public Attributes | |
static const long | defaultMaxEarly = 100*86400L |
static const MetaCategory * | metadata |
Friends | |
class | Load |
class | LoadPlan |
class | ResourceSkill |
Additional Inherited Members | |
![]() | |
NonCopyable () | |
~NonCopyable () | |
![]() | |
HasLevel () | |
HasLevel (const HasLevel &o) | |
~HasLevel () | |
![]() | |
size_t | extrasize () const |
![]() | |
static PythonType * | registerPythonType (int, const type_info *) |
![]() | |
static void | computeLevels () |
![]() | |
static vector< PythonType * > | table |
This class represents a workcentre, a physical or logical representation of capacity.
typedef Association<Operation,Resource,Load>::ListB frepple::Resource::loadlist |
typedef Association<Resource,Skill,ResourceSkill>::ListA frepple::Resource::skilllist |
|
inlineexplicit |
|
virtual |
Destructor.
Definition at line 301 of file resource.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 209 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 290 of file resource.cpp.
|
virtual |
Reimplemented from frepple::Plannable.
Definition at line 242 of file resource.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 375 of file resource.cpp.
|
inline |
|
inlinevirtual |
Returns whether an entity is real or dummy.
Reimplemented from frepple::utils::Object.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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::ResourceInfinite, and frepple::ResourceDefault.
|
static |
Initialize the class.
Definition at line 33 of file resource.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 419 of file resource.cpp.
|
inline |
|
inlinevirtual |
Mark the object as hidden or not. Hidden objects are not exported and are used only as dummy constructs.
Reimplemented from frepple::utils::Object.
|
inline |
|
inline |
void frepple::Resource::setMaximum | ( | double | m | ) |
Updates the size of a resource.
Definition at line 72 of file resource.cpp.
void frepple::Resource::setMaximumCalendar | ( | CalendarDouble * | c | ) |
Updates the size of a resource, when it is time-dependent.
Definition at line 106 of file resource.cpp.
|
inline |
|
inline |
|
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.
Reimplemented in frepple::ResourceInfinite.
|
virtual |
Recompute the problems of this resource.
Implements frepple::HasProblems.
Definition at line 28 of file problems_resource.cpp.
|
virtual |
Scan the setups of this resource.
Definition at line 314 of file resource.cpp.
|
virtual |
Reimplemented from frepple::Plannable.
Reimplemented in frepple::ResourceInfinite.
Definition at line 144 of file resource.cpp.
|
friend |
|
static |
|
static |