frepple::OperationFixedTime Class Reference

Models an operation that takes a fixed amount of time, independent of the quantity. More...

#include <model.h>

Inheritance diagram for frepple::OperationFixedTime:

frepple::Operation frepple::utils::HasName< T > frepple::HasLevel frepple::Plannable frepple::utils::HasDescription frepple::utils::NonCopyable frepple::utils::Tree::TreeNode frepple::utils::Object frepple::HasProblems frepple::Solvable

List of all members.


Public Member Functions

void endElement (XMLInput &, const Attribute &, const DataElement &)
const TimePeriod getDuration () const
virtual size_t getSize () const
virtual const MetaClassgetType () const
 OperationFixedTime (const string &s)
void setDuration (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

Detailed Description

Models an operation that takes a fixed amount of time, independent of the quantity.

Definition at line 2160 of file model.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 2164 of file model.h.


Member Function Documentation

void frepple::OperationFixedTime::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 also valid. NOTE: each object receives both its own beginElement so it can process its own element tag attributes, and its own endElement so it can process its own character data.

Reimplemented from frepple::Operation.

Definition at line 258 of file operation.cpp.

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

Returns the length of the operation.

Definition at line 2167 of file model.h.

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

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 2185 of file model.h.

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.

Definition at line 2183 of file model.h.

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

Updates the duration of the operation. Existing operation plans of this operation are not automatically refreshed to reflect the change.

Definition at line 2171 of file model.h.

void frepple::OperationFixedTime::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:

  • 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.
    See also:
    Operation::setOperationPlanParameters

Implements frepple::Operation.

Definition at line 216 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.

Definition at line 2181 of file model.h.

void frepple::OperationFixedTime::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 237 of file operation.cpp.


Member Data Documentation

Reimplemented from frepple::Operation.

Definition at line 2184 of file model.h.


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

Documentation generated by  doxygen