Models an operation whose duration is the sum of a constant time, plus a cetain time per unit. More...

#include <model.h>

Inheritance diagram for frepple::OperationTimePer:

List of all members.

Public Member Functions

void endElement (XMLInput &, const Attribute &, const DataElement &)
virtual PyObject * getattro (const Attribute &)
TimePeriod getDuration () const
TimePeriod getDurationPer () const
virtual size_t getSize () const
virtual const MetaClassgetType () const
 OperationTimePer (const string &s)
virtual int setattro (const Attribute &, const PythonObject &)
void setDuration (TimePeriod t)
void setDurationPer (TimePeriod t)
OperationPlanState setOperationPlanParameters (OperationPlan *, double, Date, Date, bool=true, bool=true) const
virtual void solve (Solver &s, void *v=NULL) const
void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
- Public Member Functions inherited from frepple::Operation
void addSuperOperation (Operation *o)
void beginElement (XMLInput &, const Attribute &)
DateRange calculateOperationTime (Date thedate, TimePeriod duration, bool forward, TimePeriod *actualduration=NULL) const
DateRange calculateOperationTime (Date start, Date end, TimePeriod *actualduration=NULL) const
OperationPlancreateOperationPlan (double, Date, Date, Demand *=NULL, OperationPlan *=NULL, unsigned long=0, bool makeflowsloads=true) const
void deleteOperationPlans (bool deleteLockedOpplans=false)
size_t extrasize () const
FlowfindFlow (const Buffer *b, Date d) const
LoadfindLoad (const Resource *r, Date d) const
double getCost () const
TimePeriod getFence () const
OperationPlangetFirstOpPlan () const
const flowlistgetFlows () const
bool getHidden () const
const loadlistgetLoads () const
LocationgetLocation () const
TimePeriod getPostTime () const
TimePeriod getPreTime () const
double getSizeMaximum () const
double getSizeMinimum () const
double getSizeMultiple () const
virtual const OperationlistgetSubOperations () const
const OperationlistgetSuperOperations () const
virtual void removeSubOperation (Operation *o)
void removeSuperOperation (Operation *o)
void setCost (const double c)
void setFence (TimePeriod t)
void setHidden (bool b)
void setLocation (Location *l)
void setPostTime (TimePeriod t)
void setPreTime (TimePeriod t)
void setSizeMaximum (double f)
void setSizeMinimum (double f)
void setSizeMultiple (double f)
virtual void updateProblems ()
virtual ~Operation ()
- Public Member Functions inherited from frepple::utils::HasName< Operation >
int compare (const PyObject *other) const
 HasName (const string &n)
 HasName (const char *n)
void setName (const string &newname)
virtual PyObject * str () const
 ~HasName ()
- Public Member Functions inherited from frepple::utils::Tree::TreeNode
TreeNodedecrement () const
const string & getName () const
TreeNodeincrement () const
bool operator< (const TreeNode &o)
 TreeNode (const string &n)
virtual ~TreeNode ()
- Public Member Functions inherited from frepple::utils::Object
 Object ()
virtual ~Object ()
- Public Member Functions inherited from frepple::utils::PythonExtensionBase
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 ()
- Public Member Functions inherited from frepple::HasLevel
unsigned short getCluster () const
short getLevel () const
- Public Member Functions inherited from frepple::Plannable
bool getChanged () const
bool getDetectProblems () const
PlannablegetEntity () const
 Plannable ()
void setChanged (bool b=true)
void setDetectProblems (bool b)
- Public Member Functions inherited from frepple::HasProblems
 HasProblems ()
virtual ~HasProblems ()
- Public Member Functions inherited from frepple::Solvable
virtual ~Solvable ()
- Public Member Functions inherited from frepple::utils::HasDescription
string getCategory () const
string getDescription () const
string getSubCategory () const
void setCategory (const string &f)
void setDescription (const string &f)
void setSubCategory (const string &f)

Static Public Member Functions

static int initialize ()

Static Public Attributes

static const MetaClassmetadata
- Static Public Attributes inherited from frepple::Operation

Additional Inherited Members

- Public Types inherited from frepple::Operation
typedef Association< Operation,
Buffer, Flow >::ListA 
flowlist
typedef Association< Operation,
Resource, Load >::ListA 
loadlist
typedef list< Operation * > Operationlist
- Protected Member Functions inherited from frepple::Operation
virtual bool extraInstantiate (OperationPlan *o)
void initOperationPlan (OperationPlan *, double, const Date &, const Date &, Demand *, OperationPlan *, unsigned long, bool=true) const
 Operation (const string &str)
- Protected Member Functions inherited from frepple::HasLevel
 HasLevel ()
 HasLevel (const HasLevel &o)
 ~HasLevel ()

Detailed Description

Models an operation whose duration is the sum of a constant time, plus a cetain time per unit.

Definition at line 2289 of file model.h.


Constructor & Destructor Documentation

frepple::OperationTimePer::OperationTimePer ( const string &  s)
inlineexplicit

Constructor.

Definition at line 2293 of file model.h.


Member Function Documentation

void frepple::OperationTimePer::endElement ( XMLInput pIn,
const Attribute pAttr,
const DataElement pElement 
)
virtual

Reimplemented from frepple::Operation.

Definition at line 871 of file operation.cpp.

PyObject * frepple::OperationTimePer::getattro ( const Attribute attr)
virtual

Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.

Reimplemented from frepple::Operation.

Definition at line 1491 of file operation.cpp.

TimePeriod frepple::OperationTimePer::getDuration ( ) const
inline

Returns the constant part of the operation time.

Definition at line 2296 of file model.h.

TimePeriod frepple::OperationTimePer::getDurationPer ( ) const
inline

Returns the time per unit of the operation time.

Definition at line 2307 of file model.h.

virtual size_t frepple::OperationTimePer::getSize ( ) const
inlinevirtual

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 2344 of file model.h.

virtual const MetaClass& frepple::OperationTimePer::getType ( ) const
inlinevirtual

This returns the type information on the object, a bit similar to the standard type_info information.

Implements frepple::utils::Object.

Definition at line 2342 of file model.h.

int frepple::OperationTimePer::initialize ( )
static

Reimplemented from frepple::Operation.

Definition at line 59 of file operation.cpp.

int frepple::OperationTimePer::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::Operation.

Definition at line 1501 of file operation.cpp.

void frepple::OperationTimePer::setDuration ( TimePeriod  t)
inline

Sets the constant part of the operation time.

Definition at line 2299 of file model.h.

void frepple::OperationTimePer::setDurationPer ( TimePeriod  t)
inline

Sets the time per unit of the operation time.

Definition at line 2310 of file model.h.

OperationPlanState frepple::OperationTimePer::setOperationPlanParameters ( OperationPlan opplan,
double  q,
Date  s,
Date  e,
bool  preferEnd = true,
bool  execute = true 
) const
virtual

A operation of this type enforces the following rules on its operationplans:

  • If both the start and end date are specified, the quantity is computed to match these dates. If the time difference between the start and end date is too small to fit the fixed duration, the quantity is set to 0.
  • If only an end date is specified, it will be respected and we compute a start date based on the quantity.
  • If only a start date is specified, it will be respected and we compute an end date based on the quantity.
  • If no date is specified, we respect the quantity and the end date of the operation. A new start date is being computed.
    See also:
    Operation::setOperationPlanParameters

Implements frepple::Operation.

Definition at line 714 of file operation.cpp.

virtual void frepple::OperationTimePer::solve ( Solver s,
void *  v = NULL 
) const
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::Operation.

Definition at line 2340 of file model.h.

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

Reimplemented from frepple::Operation.

Definition at line 849 of file operation.cpp.


Member Data Documentation

const MetaClass * frepple::OperationTimePer::metadata
static

Reimplemented from frepple::Operation.

Definition at line 2343 of file model.h.


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