This class represents the resource capacity of an operationplan. More...
#include <model.h>
Public Member Functions | |
PyObject * | getattro (const Attribute &) |
bool | getHidden () const |
const Load * | getLoad () const |
OperationPlan * | getOperationPlan () const |
LoadPlan * | getOtherLoadPlan () const |
Resource * | getResource () const |
const string & | getSetup (bool=true) const |
TimeLine< LoadPlan > * | getTimeLine () const |
bool | isStart () const |
LoadPlan (OperationPlan *, const Load *) | |
int | setattro (const Attribute &, const PythonObject &) |
void | setLoad (const Load *) |
void | setResource (Resource *, bool=false) |
void | update () |
virtual | ~LoadPlan () |
![]() | |
EventChangeOnhand (double qty=0.0) | |
double | getQuantity () const |
virtual unsigned short | getType () const |
![]() | |
double | getCumulativeConsumed () const |
double | getCumulativeProduced () const |
const Date & | getDate () const |
virtual double | getMax (bool inclusive=true) const |
virtual double | getMin (bool inclusive=true) const |
double | getOnhand () const |
bool | operator< (const Event &fl2) const |
virtual | ~Event () |
![]() | |
virtual PyObject * | call (const PythonObject &args, const PythonObject &kwds) |
virtual int | compare (const PyObject *other) const |
Py_ssize_t | getReferenceCount () const |
void | initType (const MetaClass *t) |
void | initType (PyTypeObject *t) |
virtual PyObject * | iternext () |
PythonExtensionBase () | |
void | resetReferenceCount () |
virtual PyObject * | str () const |
virtual | ~PythonExtensionBase () |
Static Public Member Functions | |
static int | initialize () |
Static Public Attributes | |
static const MetaCategory * | metadata |
Friends | |
class | OperationPlan::LoadPlanIterator |
Additional Inherited Members | |
![]() | |
static PythonType * | registerPythonType (int, const type_info *) |
![]() | |
static vector< PythonType * > | table |
This class represents the resource capacity of an operationplan.
For both the start and the end date of the operationplan, a loadplan object is created. These are then inserted in the timeline structure associated with a resource.
|
explicit |
Public constructor.
This constructor constructs the starting loadplan and will also call a private constructor to creates the ending loadplan. In other words, a single call to the constructor will create two loadplan objects.
Definition at line 46 of file loadplan.cpp.
|
virtual |
Destructor.
Definition at line 328 of file loadplan.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 385 of file loadplan.cpp.
|
inline |
|
inline |
|
inline |
LoadPlan * frepple::LoadPlan::getOtherLoadPlan | ( | ) | const |
Each operationplan has 2 loadplans per load: one at the start, when the capacity consumption starts, and one at the end, when the capacity consumption ends.
This method returns the "companion" loadplan. It is not very scalable: the performance is linear with the number of loadplans on the resource.
Definition at line 277 of file loadplan.cpp.
|
inline |
const string & frepple::LoadPlan::getSetup | ( | bool | current = true | ) | const |
Returns the current setup of the resource.
When the argument is true (= default) the current setup is returned.
When the argument is false the setup just before the loadplan is returned.
Definition at line 304 of file loadplan.cpp.
Return a pointer to the timeline data structure owning this loadplan.
Reimplemented from frepple::utils::TimeLine< type >::Event.
|
static |
Definition at line 30 of file loadplan.cpp.
|
inline |
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 409 of file loadplan.cpp.
void frepple::LoadPlan::setLoad | ( | const Load * | newld | ) |
Update the load of an already existing flowplan.
The new load must belong to the same operation.
Definition at line 367 of file loadplan.cpp.
void frepple::LoadPlan::setResource | ( | Resource * | newres, |
bool | check = false |
||
) |
Update the resource.
The optional second argument specifies whether or not we need to verify if the assigned resource is valid. A valid resource must a) be a subresource of the resource specified on the load, and b) must also have the skill specified on the resource.
Definition at line 123 of file loadplan.cpp.
void frepple::LoadPlan::update | ( | ) |
This function needs to be called whenever the loadplan date or quantity are changed.
Definition at line 285 of file loadplan.cpp.
|
friend |
|
static |