frepple::OperationTimePer Class Reference

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:
frepple::Operation frepple::utils::HasName< Operation > 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 &)
TimePeriod getDuration () const
TimePeriod getDurationPer () const
virtual size_t getSize () const
virtual const MetaClassgetType () 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 MetaClassmetadata

Detailed Description

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.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 2295 of file model.h.


Member Function Documentation

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]

Returns the constant part of the operation time.

Definition at line 2298 of file model.h.

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

Returns the time per unit of the operation time.

Definition at line 2309 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 2343 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 2341 of file model.h.

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

Sets the constant part of the operation time.

Definition at line 2301 of file model.h.

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

Sets the time per unit of the operation time.

Definition at line 2312 of file model.h.

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:

  • 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 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.

Definition at line 2339 of file model.h.

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.


Member Data Documentation

Reimplemented from frepple::Operation.

Definition at line 2342 of file model.h.


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

Generated on 25 Sep 2009 for frePPLe by  doxygen 1.6.1