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

Static Public Member Functions

static int initialize ()

Static Public Attributes

static const MetaClassmetadata

Detailed Description

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

Definition at line 2300 of file model.h.


Constructor & Destructor Documentation

frepple::OperationTimePer::OperationTimePer ( const string &  s) [inline, explicit]

Constructor.

Definition at line 2304 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 877 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 1497 of file operation.cpp.

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

Returns the constant part of the operation time.

Definition at line 2307 of file model.h.

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

Returns the time per unit of the operation time.

Definition at line 2318 of file model.h.

virtual size_t frepple::OperationTimePer::getSize ( ) const [inline, virtual]

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 2355 of file model.h.

virtual const MetaClass& frepple::OperationTimePer::getType ( ) const [inline, virtual]

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

Implements frepple::utils::Object.

Definition at line 2353 of file model.h.

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

Reimplemented from frepple::Operation.

Definition at line 65 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 1507 of file operation.cpp.

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

Sets the constant part of the operation time.

Definition at line 2310 of file model.h.

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

Sets the time per unit of the operation time.

Definition at line 2321 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 720 of file operation.cpp.

virtual void frepple::OperationTimePer::solve ( Solver s,
void *  v = NULL 
) const [inline, virtual]

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 2351 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 855 of file operation.cpp.


Member Data Documentation

Reimplemented from frepple::Operation.

Definition at line 2354 of file model.h.


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

Documentation generated for frePPLe by  doxygen