Models an operation that takes a fixed amount of time, independent of the quantity. More...
#include <model.h>

Public Member Functions | |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
virtual PyObject * | getattro (const Attribute &) |
const TimePeriod | getDuration () const |
virtual size_t | getSize () const |
virtual const MetaClass & | getType () const |
OperationFixedTime (const string &s) | |
virtual int | setattro (const Attribute &, const PythonObject &) |
void | setDuration (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 MetaClass * | metadata |
Protected Member Functions | |
virtual bool | extraInstantiate (OperationPlan *o) |
Detailed Description
Models an operation that takes a fixed amount of time, independent of the quantity.
Constructor & Destructor Documentation
frepple::OperationFixedTime::OperationFixedTime | ( | const string & | s | ) | [inline, explicit] |
Member Function Documentation
void frepple::OperationFixedTime::endElement | ( | XMLInput & | pIn, |
const Attribute & | pAttr, | ||
const DataElement & | pElement | ||
) | [virtual] |
Reimplemented from frepple::Operation.
Definition at line 709 of file operation.cpp.
bool frepple::OperationFixedTime::extraInstantiate | ( | OperationPlan * | o | ) | [protected, virtual] |
Extra logic called when instantiating an operationplan.
When the function returns false the creation of the operationplan is denied and it is deleted.
Reimplemented from frepple::Operation.
Definition at line 623 of file operation.cpp.
PyObject * frepple::OperationFixedTime::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 1479 of file operation.cpp.
const TimePeriod frepple::OperationFixedTime::getDuration | ( | ) | const [inline] |
virtual size_t frepple::OperationFixedTime::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
virtual const MetaClass& frepple::OperationFixedTime::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.
int frepple::OperationFixedTime::initialize | ( | ) | [static] |
Reimplemented from frepple::Operation.
Definition at line 54 of file operation.cpp.
int frepple::OperationFixedTime::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 1487 of file operation.cpp.
void frepple::OperationFixedTime::setDuration | ( | TimePeriod | t | ) | [inline] |
OperationPlanState frepple::OperationFixedTime::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:
- The duration is always constant.
- If the end date is specified, we use that and ignore the start date that could have been passed.
- If no end date but only a start date are specified, we'll use that date.
- If no dates are specified, we don't update the dates of the operationplan.
- The quantity can be any positive number.
- Locked operationplans can't be updated.
Implements frepple::Operation.
Definition at line 583 of file operation.cpp.
virtual void frepple::OperationFixedTime::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.
void frepple::OperationFixedTime::writeElement | ( | XMLOutput * | o, |
const Keyword & | tag, | ||
mode | m = DEFAULT |
||
) | const [virtual] |
Reimplemented from frepple::Operation.
Definition at line 688 of file operation.cpp.
Member Data Documentation
const MetaClass * frepple::OperationFixedTime::metadata [static] |
Reimplemented from frepple::Operation.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
