frepple::Solver Class Reference

This class is an implementation of the "visitor" design pattern. It is intended as a basis for different algoritms processing the frePPLe data. More...

#include <model.h>

Inheritance diagram for frepple::Solver:
frepple::utils::Object frepple::utils::HasName< Solver > frepple::utils::NonCopyable frepple::utils::Tree::TreeNode frepple::SolverMRP module_forecast::ForecastSolver module_lp_solver::LPSolver

List of all members.

Public Member Functions

virtual void endElement (XMLInput &, const Attribute &, const DataElement &)
unsigned short getLogLevel () const
virtual const MetaClassgetType () const
void setLogLevel (unsigned short v)
virtual void solve (const Solvable *, void *=NULL)
virtual void solve (const FlowEnd *b, void *v=NULL)
virtual void solve (const Flow *b, void *v=NULL)
virtual void solve (const Load *b, void *v=NULL)
virtual void solve (const BufferProcure *b, void *v=NULL)
virtual void solve (const BufferInfinite *b, void *v=NULL)
virtual void solve (const Buffer *, void *=NULL)
virtual void solve (const ResourceInfinite *r, void *v=NULL)
virtual void solve (const Resource *, void *=NULL)
virtual void solve (const OperationAlternate *o, void *v=NULL)
virtual void solve (const OperationRouting *o, void *v=NULL)
virtual void solve (const OperationTimePer *o, void *v=NULL)
virtual void solve (const OperationFixedTime *o, void *v=NULL)
virtual void solve (const Operation *, void *=NULL)
virtual void solve (const Demand *, void *=NULL)
virtual void solve (void *=NULL)=0
 Solver (const string &n)
virtual void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
virtual ~Solver ()

Static Public Attributes

static const MetaCategorymetadata

Protected Attributes

unsigned short loglevel

Detailed Description

This class is an implementation of the "visitor" design pattern. It is intended as a basis for different algoritms processing the frePPLe data.

The goal is to decouple the solver/algorithms from the model/data representation. Different solvers can be easily be plugged in to work on the same data.

Definition at line 1006 of file model.h.


Constructor & Destructor Documentation

frepple::Solver::Solver ( const string &  n  )  [inline, explicit]

Definition at line 1009 of file model.h.

virtual frepple::Solver::~Solver (  )  [inline, virtual]

Definition at line 1010 of file model.h.


Member Function Documentation

void frepple::Solver::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.

Implements frepple::utils::Object.

Reimplemented in frepple::SolverMRP, and module_lp_solver::LPSolver.

Definition at line 75 of file model/actions.cpp.

unsigned short frepple::Solver::getLogLevel (  )  const [inline]

Returns how elaborate and verbose output is requested.
As a guideline solvers should respect the following guidelines:

  • 0:
    Completely silent.
    This is the default value.
  • 1:
    Minimal and high-level messages on the progress that are sufficient for logging normal operation.
  • 2:
    Higher numbers are solver dependent. These levels are typically used for debugging and tracing, and provide more detail on the solver's progress.

Definition at line 1060 of file model.h.

virtual const MetaClass& frepple::Solver::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.

Reimplemented in frepple::SolverMRP, module_forecast::ForecastSolver, and module_lp_solver::LPSolver.

Definition at line 1065 of file model.h.

void frepple::Solver::setLogLevel ( unsigned short  v  )  [inline]

Controls whether verbose output will be generated.

Definition at line 1063 of file model.h.

virtual void frepple::Solver::solve ( const Solvable ,
void *  = NULL 
) [inline, virtual]

Definition at line 1044 of file model.h.

virtual void frepple::Solver::solve ( const FlowEnd b,
void *  v = NULL 
) [inline, virtual]

Definition at line 1042 of file model.h.

virtual void frepple::Solver::solve ( const Flow b,
void *  v = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1040 of file model.h.

virtual void frepple::Solver::solve ( const Load b,
void *  v = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1038 of file model.h.

virtual void frepple::Solver::solve ( const BufferProcure b,
void *  v = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1036 of file model.h.

virtual void frepple::Solver::solve ( const BufferInfinite b,
void *  v = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1034 of file model.h.

virtual void frepple::Solver::solve ( const Buffer ,
void *  = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1032 of file model.h.

virtual void frepple::Solver::solve ( const ResourceInfinite r,
void *  v = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1030 of file model.h.

virtual void frepple::Solver::solve ( const Resource ,
void *  = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1028 of file model.h.

virtual void frepple::Solver::solve ( const OperationAlternate o,
void *  v = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1026 of file model.h.

virtual void frepple::Solver::solve ( const OperationRouting o,
void *  v = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1024 of file model.h.

virtual void frepple::Solver::solve ( const OperationTimePer o,
void *  v = NULL 
) [inline, virtual]

Definition at line 1022 of file model.h.

virtual void frepple::Solver::solve ( const OperationFixedTime o,
void *  v = NULL 
) [inline, virtual]

Definition at line 1020 of file model.h.

virtual void frepple::Solver::solve ( const Operation ,
void *  = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP.

Definition at line 1018 of file model.h.

virtual void frepple::Solver::solve ( const Demand ,
void *  = NULL 
) [inline, virtual]

Reimplemented in frepple::SolverMRP, and module_forecast::ForecastSolver.

Definition at line 1016 of file model.h.

virtual void frepple::Solver::solve ( void *  = NULL  )  [pure virtual]
void frepple::Solver::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::utils::Object.

Reimplemented in frepple::SolverMRP, module_forecast::ForecastSolver, and module_lp_solver::LPSolver.

Definition at line 62 of file model/actions.cpp.


Member Data Documentation

unsigned short frepple::Solver::loglevel [protected]

Controls the amount of tracing and debugging messages.

Definition at line 1070 of file model.h.

Reimplemented in frepple::SolverMRP, module_forecast::ForecastSolver, and module_lp_solver::LPSolver.

Definition at line 1066 of file model.h.


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

Generated on 25 Feb 2010 for frePPLe by  doxygen 1.6.1