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>
Public Member Functions | |
virtual void | endElement (XMLInput &, const Attribute &, const DataElement &) |
unsigned short | getLogLevel () const |
virtual const MetaClass & | getType () 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 MetaCategory * | metadata |
Protected Attributes | |
unsigned short | loglevel |
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.
frepple::Solver::Solver | ( | const string & | n | ) | [inline, explicit] |
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:
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.
void frepple::Solver::setLogLevel | ( | unsigned short | v | ) | [inline] |
virtual void frepple::Solver::solve | ( | const Solvable * | , | |
void * | = NULL | |||
) | [inline, virtual] |
virtual void frepple::Solver::solve | ( | const FlowEnd * | b, | |
void * | v = NULL | |||
) | [inline, virtual] |
virtual void frepple::Solver::solve | ( | const Flow * | b, | |
void * | v = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const Load * | b, | |
void * | v = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const BufferProcure * | b, | |
void * | v = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const BufferInfinite * | b, | |
void * | v = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const Buffer * | , | |
void * | = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const ResourceInfinite * | r, | |
void * | v = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const Resource * | , | |
void * | = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const OperationAlternate * | o, | |
void * | v = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const OperationRouting * | o, | |
void * | v = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const OperationTimePer * | o, | |
void * | v = NULL | |||
) | [inline, virtual] |
virtual void frepple::Solver::solve | ( | const OperationFixedTime * | o, | |
void * | v = NULL | |||
) | [inline, virtual] |
virtual void frepple::Solver::solve | ( | const Operation * | , | |
void * | = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP.
virtual void frepple::Solver::solve | ( | const Demand * | , | |
void * | = NULL | |||
) | [inline, virtual] |
Reimplemented in frepple::SolverMRP, and module_forecast::ForecastSolver.
virtual void frepple::Solver::solve | ( | void * | = NULL |
) | [pure virtual] |
Implemented in frepple::SolverMRP, module_forecast::ForecastSolver, and module_lp_solver::LPSolver.
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.
unsigned short frepple::Solver::loglevel [protected] |
const MetaCategory * frepple::Solver::metadata [static] |
Reimplemented in frepple::SolverMRP, module_forecast::ForecastSolver, and module_lp_solver::LPSolver.