A flowplan represents a planned material flow in or out of a buffer. More...

#include <model.h>

Inheritance diagram for frepple::FlowPlan:

Public Member Functions

 FlowPlan (OperationPlan *, const Flow *)
 
const BuffergetBuffer () const
 
const FlowgetFlow () const
 
bool getHidden () const
 
OperationPlangetOperationPlan () const
 
TimeLine< FlowPlan > * getTimeLine () const
 
void setFlow (const Flow *)
 
double setQuantity (double qty, bool b=false, bool u=true)
 
void update ()
 
void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
 
virtual ~FlowPlan ()
 
- 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 int setattro (const Attribute &attr, const PythonObject &field)
 
virtual PyObject * str () const
 
virtual ~PythonExtensionBase ()
 

Static Public Member Functions

static int initialize ()
 

Static Public Attributes

static const MetaCategorymetadata
 

Friends

class OperationPlan::FlowPlanIterator
 

Additional Inherited Members

- Protected Member Functions inherited from frepple::utils::TimeLine< type >::Event
 Event ()
 
- Static Protected Member Functions inherited from frepple::utils::PythonExtensionBase
static PythonTyperegisterPythonType (int, const type_info *)
 
- Protected Attributes inherited from frepple::utils::TimeLine< type >::Event
double cum_prod
 
Date dt
 
Eventnext
 
double oh
 
Eventprev
 
- Static Protected Attributes inherited from frepple::utils::PythonExtensionBase
static vector< PythonType * > table
 

Detailed Description

A flowplan represents a planned material flow in or out of a buffer.

Flowplans are owned by operationplans, which manage a container to store them.

Definition at line 3446 of file model.h.

Constructor & Destructor Documentation

frepple::FlowPlan::FlowPlan ( OperationPlan opplan,
const Flow f 
)
explicit

Constructor.

Definition at line 44 of file flowplan.cpp.

virtual frepple::FlowPlan::~FlowPlan ( )
inlinevirtual

Destructor.

Definition at line 3485 of file model.h.

Member Function Documentation

const Buffer* frepple::FlowPlan::getBuffer ( ) const
inline

Returns the buffer.

Definition at line 3474 of file model.h.

const Flow* frepple::FlowPlan::getFlow ( ) const
inline

Returns the flow of which this is an plan instance.

Definition at line 3471 of file model.h.

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

Returns true when the flowplan is hidden.
This is determined by looking at whether the flow is hidden or not.

Definition at line 3540 of file model.h.

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

Returns the operationplan owning this flowplan.

Definition at line 3482 of file model.h.

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

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

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

Definition at line 3534 of file model.h.

int frepple::FlowPlan::initialize ( )
static

Definition at line 29 of file flowplan.cpp.

void frepple::FlowPlan::setFlow ( const Flow newfl)

Update the flow of an already existing flowplan.
The new flow must belong to the same operation.

Definition at line 96 of file flowplan.cpp.

double frepple::FlowPlan::setQuantity ( double  qty,
bool  b = false,
bool  u = true 
)
inline

Updates the quantity of the flowplan by changing the quantity of the operationplan owning this flowplan.
The boolean parameter is used to control whether to round up (false) or down (true) in case the operation quantity must be a multiple.
The second parameter is to flag whether we want to actually perform the resizing, or only to simulate it.

Definition at line 3507 of file model.h.

void frepple::FlowPlan::update ( )

This function needs to be called whenever the flowplan date or quantity are changed.

Definition at line 80 of file flowplan.cpp.

void frepple::FlowPlan::writeElement ( XMLOutput o,
const Keyword tag,
mode  m = DEFAULT 
) const

Writing the element. This method has the same prototype as a usual instance of the Object class, but this is only superficial: FlowPlan isn't a subclass of Object at all.

Definition at line 127 of file flowplan.cpp.

Friends And Related Function Documentation

friend class OperationPlan::FlowPlanIterator
friend

Definition at line 3448 of file model.h.

Member Data Documentation

const MetaCategory * frepple::FlowPlan::metadata
static

Definition at line 3464 of file model.h.


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