Models an operation whose duration is the sum of a constant time, plus a cetain time per unit. More...
#include <model.h>
Public Member Functions | |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
TimePeriod | getDuration () const |
TimePeriod | getDurationPer () const |
virtual size_t | getSize () const |
virtual const MetaClass & | getType () const |
OperationTimePer (const string &s) | |
void | setDuration (TimePeriod t) |
void | setDurationPer (TimePeriod t) |
void | setOperationPlanParameters (OperationPlan *, double, Date, Date, bool=true) const |
virtual void | solve (Solver &s, void *v=NULL) const |
void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
Static Public Attributes | |
static const MetaClass * | metadata |
Models an operation whose duration is the sum of a constant time, plus a cetain time per unit.
Definition at line 2291 of file model.h.
frepple::OperationTimePer::OperationTimePer | ( | const string & | s | ) | [inline, explicit] |
void frepple::OperationTimePer::endElement | ( | XMLInput & | , | |
const Attribute & | , | |||
const DataElement & | ||||
) | [virtual] |
Called while restoring the model from an XML-file.
This is called when the corresponding close element tag is encountered, and the Data() member of pElement is valid.
Reimplemented from frepple::Operation.
Definition at line 700 of file operation.cpp.
TimePeriod frepple::OperationTimePer::getDuration | ( | ) | const [inline] |
TimePeriod frepple::OperationTimePer::getDurationPer | ( | ) | const [inline] |
virtual size_t frepple::OperationTimePer::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
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.
void frepple::OperationTimePer::setDuration | ( | TimePeriod | t | ) | [inline] |
void frepple::OperationTimePer::setDurationPer | ( | TimePeriod | t | ) | [inline] |
void frepple::OperationTimePer::setOperationPlanParameters | ( | OperationPlan * | oplan, | |
double | q, | |||
Date | s, | |||
Date | e, | |||
bool | preferEnd = true | |||
) | const [virtual] |
A operation of this type enforces the following rules on its operationplans:
Implements frepple::Operation.
Definition at line 568 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.
void frepple::OperationTimePer::writeElement | ( | XMLOutput * | , | |
const Keyword & | , | |||
mode | = DEFAULT | |||
) | const [virtual] |
Called while writing the model into an XML-file. The user class should write itself out, using the IOutStream members for its "simple" members and calling writeElement recursively for any contained objects. Not all classes are expected to implement this method. In instances of such a class can be created but can't be persisted. E.g. Command
Reimplemented from frepple::Operation.
Definition at line 678 of file operation.cpp.
const MetaClass * frepple::OperationTimePer::metadata [static] |
Reimplemented from frepple::Operation.