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
const ResourcegetResource () const
const string & getSetup (bool=true) const
TimeLine< LoadPlan > * getTimeLine () const
bool isStart () const
 LoadPlan (OperationPlan *, const Load *)
void setLoad (const Load *)
void update ()
virtual ~LoadPlan ()

Static Public Member Functions

static int initialize ()

Static Public Attributes

static const MetaCategorymetadata

Friends

class OperationPlan::LoadPlanIterator

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 4673 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 52 of file loadplan.cpp.

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

Destructor.

Definition at line 174 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 343 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 4723 of file model.h.

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

Return the load of which this is a plan instance.

Definition at line 4689 of file model.h.

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

Return the operationplan owning this loadplan.

Definition at line 4686 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 123 of file loadplan.cpp.

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

Return the resource.

Definition at line 4692 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 150 of file loadplan.cpp.

TimeLine<LoadPlan>* frepple::LoadPlan::getTimeLine ( ) const [inline, virtual]

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

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

Definition at line 4711 of file model.h.

int frepple::LoadPlan::initialize ( ) [static]

Definition at line 37 of file loadplan.cpp.

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

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

Definition at line 4700 of file model.h.

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 213 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 131 of file loadplan.cpp.


Friends And Related Function Documentation

friend class OperationPlan::LoadPlanIterator [friend]

Definition at line 4675 of file model.h.


Member Data Documentation

Definition at line 4735 of file model.h.


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

Documentation generated for frePPLe by  doxygen