frepple::OperationRouting Class Reference

Represents a routing operation, i.e. an operation consisting of multiple, sequential sub-operations. More...

#include <model.h>

Inheritance diagram for frepple::OperationRouting:

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 addStepBack (Operation *o)
void addStepFront (Operation *o)
void beginElement (XMLInput &, const Attribute &)
virtual OperationPlancreateOperationPlan (double, Date, Date, Demand *=NULL, OperationPlan *=NULL, unsigned long=0, bool makeflowsloads=true) const
void endElement (XMLInput &, const Attribute &, const DataElement &)
virtual size_t getSize () const
virtual const OperationlistgetSubOperations () const
virtual const MetaClassgetType () const
 OperationRouting (const string &c)
void removeSubOperation (Operation *o)
void setOperationPlanParameters (OperationPlan *, double, Date, Date, bool=true) const
virtual void solve (Solver &s, void *v=NULL) const
virtual void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
 ~OperationRouting ()

Static Public Attributes

static const MetaClass metadata

Detailed Description

Represents a routing operation, i.e. an operation consisting of multiple, sequential sub-operations.

Definition at line 2280 of file model.h.


Constructor & Destructor Documentation

frepple::OperationRouting::OperationRouting ( const string &  c  )  [inline, explicit]

Constructor.

Definition at line 2284 of file model.h.

frepple::OperationRouting::~OperationRouting (  ) 

Destructor.

Definition at line 68 of file operation.cpp.


Member Function Documentation

void frepple::OperationRouting::addStepBack ( Operation o  )  [inline]

Adds a new steps to routing at the end of the routing.

Definition at line 2298 of file model.h.

void frepple::OperationRouting::addStepFront ( Operation o  )  [inline]

Adds a new steps to routing at the start of the routing.

Definition at line 2290 of file model.h.

void frepple::OperationRouting::beginElement ( XMLInput ,
const Attribute  
) [virtual]

Called while restoring the model from an XML-file. This is called for each element within the "this" element, for which the "this" element is immediate parent. It is called when the open element tag is encountered.

Reimplemented from frepple::Operation.

Definition at line 404 of file operation.cpp.

OperationPlan * frepple::OperationRouting::createOperationPlan ( double  q,
Date  s,
Date  e,
Demand l = NULL,
OperationPlan ow = NULL,
unsigned long  i = 0,
bool  makeflowsloads = true 
) const [virtual]

This is the factory method which creates all operationplans of the operation.

See also:
Operation::createOperationPlan

Reimplemented from frepple::Operation.

Definition at line 490 of file operation.cpp.

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

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

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 2345 of file model.h.

virtual const Operationlist& frepple::OperationRouting::getSubOperations (  )  const [inline, virtual]

Return a list of all sub-operationplans.

Reimplemented from frepple::Operation.

Definition at line 2333 of file model.h.

virtual const MetaClass& frepple::OperationRouting::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 2343 of file model.h.

void frepple::OperationRouting::removeSubOperation ( Operation o  )  [inline, virtual]

Removes a sub-operation from the list. This method will need to be overridden by all operation types that acts as a super-operation.

Reimplemented from frepple::Operation.

Definition at line 2305 of file model.h.

void frepple::OperationRouting::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 an end date is given, sequentially use this method on the different steps. The steps are stepped through starting from the last step, and each step will adjust to meet the requested end date. If there is slack between the routings' step operationplans, it can be used to "absorb" the change.
  • When a start date is given, the behavior is similar to the previous case, except that we step through the operationplans from the first step this time.
  • If both a start and an end date are given, we use only the end date.
  • If there are no sub operationplans yet, apply the requested changes blindly.
    See also:
    Operation::setOperationPlanParameters

Implements frepple::Operation.

Definition at line 427 of file operation.cpp.

virtual void frepple::OperationRouting::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 2330 of file model.h.

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


Member Data Documentation

Reimplemented from frepple::Operation.

Definition at line 2344 of file model.h.


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

Documentation generated by  doxygen