This class represents the resource capacity of an operationplan. More...

#include <model.h>

Inheritance diagram for frepple::LoadPlan:

List of all members.

Public Member Functions

PyObject * getattro (const Attribute &)
bool getHidden () const
const LoadgetLoad () const
OperationPlangetOperationPlan () const
LoadPlangetOtherLoadPlan () const
ResourcegetResource () 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 ()
- Public Member Functions inherited from frepple::utils::TimeLine< type >::EventChangeOnhand
 EventChangeOnhand (double qty=0.0)
double getQuantity () const
virtual unsigned short getType () const
- Public Member Functions inherited from frepple::utils::TimeLine< type >::Event
double getCumulativeConsumed () const
double getCumulativeProduced () const
const DategetDate () 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 ()
- Public Member Functions inherited from frepple::utils::PythonExtensionBase
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 MetaCategorymetadata

Friends

class OperationPlan::LoadPlanIterator

Additional Inherited Members

- Static Protected Member Functions inherited from frepple::utils::PythonExtensionBase
static PythonTyperegisterPythonType (int, const type_info *)
- Static Protected Attributes inherited from frepple::utils::PythonExtensionBase
static vector< PythonType * > table

Detailed Description

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.

Definition at line 4574 of file model.h.


Constructor & Destructor Documentation

frepple::LoadPlan::LoadPlan ( OperationPlan o,
const Load r 
)
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.

frepple::LoadPlan::~LoadPlan ( )
virtual

Destructor.

Definition at line 328 of file loadplan.cpp.


Member Function Documentation

PyObject * frepple::LoadPlan::getattro ( const Attribute attr)
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.

bool frepple::LoadPlan::getHidden ( ) const
inline

Returns true when the loadplan is hidden.
This is determined by looking at whether the load is hidden or not.

Definition at line 4632 of file model.h.

const Load* frepple::LoadPlan::getLoad ( ) const
inline

Return the load of which this is a plan instance.

Definition at line 4590 of file model.h.

OperationPlan* frepple::LoadPlan::getOperationPlan ( ) const
inline

Return the operationplan owning this loadplan.

Definition at line 4587 of file model.h.

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.

Resource* frepple::LoadPlan::getResource ( ) const
inline

Return the resource.

Definition at line 4601 of file model.h.

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.

TimeLine<LoadPlan>* frepple::LoadPlan::getTimeLine ( ) const
inlinevirtual

Return a pointer to the timeline data structure owning this loadplan.

Reimplemented from frepple::utils::TimeLine< type >::Event.

Definition at line 4620 of file model.h.

int frepple::LoadPlan::initialize ( )
static

Definition at line 30 of file loadplan.cpp.

bool frepple::LoadPlan::isStart ( ) const
inline

Return true when this loadplan marks the start of an operationplan.

Definition at line 4609 of file model.h.

int frepple::LoadPlan::setattro ( const Attribute attr,
const PythonObject field 
)
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.


Friends And Related Function Documentation

friend class OperationPlan::LoadPlanIterator
friend

Definition at line 4576 of file model.h.


Member Data Documentation

const MetaCategory * frepple::LoadPlan::metadata
static

Definition at line 4644 of file model.h.


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