This class is an implementation of the "visitor" design pattern. It is intended as a basis for different algorithms processing the frePPLe data. More...
#include <model.h>
Public Member Functions | |
virtual void | endElement (XMLInput &, const Attribute &, const DataElement &) |
virtual PyObject * | getattro (const Attribute &) |
unsigned short | getLogLevel () const |
virtual const MetaClass & | getType () const |
virtual int | setattro (const Attribute &, const PythonObject &) |
void | setLogLevel (unsigned short v) |
virtual void | solve (void *=NULL)=0 |
virtual void | solve (const Demand *, void *=NULL) |
virtual void | solve (const Operation *, void *=NULL) |
virtual void | solve (const OperationFixedTime *o, void *v=NULL) |
virtual void | solve (const OperationTimePer *o, void *v=NULL) |
virtual void | solve (const OperationRouting *o, void *v=NULL) |
virtual void | solve (const OperationAlternate *o, void *v=NULL) |
virtual void | solve (const Resource *, void *=NULL) |
virtual void | solve (const ResourceInfinite *r, void *v=NULL) |
virtual void | solve (const Buffer *, void *=NULL) |
virtual void | solve (const BufferInfinite *b, void *v=NULL) |
virtual void | solve (const BufferProcure *b, void *v=NULL) |
virtual void | solve (const Load *b, void *v=NULL) |
virtual void | solve (const Flow *b, void *v=NULL) |
virtual void | solve (const FlowEnd *b, void *v=NULL) |
virtual void | solve (const Solvable *, void *=NULL) |
Solver (const string &n) | |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
virtual | ~Solver () |
![]() | |
int | compare (const PyObject *other) const |
HasName (const string &n) | |
HasName (const char *n) | |
void | setName (const string &newname) |
virtual PyObject * | str () const |
~HasName () | |
![]() | |
TreeNode * | decrement () const |
const string & | getName () const |
TreeNode * | increment () const |
bool | operator< (const TreeNode &o) |
TreeNode (const string &n) | |
virtual | ~TreeNode () |
![]() | |
virtual void | beginElement (XMLInput &, const Attribute &) |
virtual bool | getHidden () const |
virtual size_t | getSize () const =0 |
Object () | |
virtual void | setHidden (bool b) |
virtual | ~Object () |
![]() | |
virtual PyObject * | call (const PythonObject &args, const PythonObject &kwds) |
Py_ssize_t | getReferenceCount () const |
void | initType (const MetaClass *t) |
void | initType (PyTypeObject *t) |
virtual PyObject * | iternext () |
PythonExtensionBase () | |
void | resetReferenceCount () |
virtual | ~PythonExtensionBase () |
Static Public Member Functions | |
static int | initialize () |
static PyObject * | solve (PyObject *, PyObject *) |
![]() | |
static Solver * | add (const string &k, const MetaClass &cls) |
static Solver * | add (Solver *t) |
static Solver * | add (Solver *t, Solver *hint) |
static iterator | begin () |
static void | clear () |
static bool | empty () |
static iterator | end () |
static Solver * | find (const string &k) |
static Solver * | findLowerBound (const string &k, bool *f=NULL) |
static Object * | reader (const MetaClass *cat, const AttributeList &in) |
static size_t | size () |
static void | verify () |
static void | writer (const MetaCategory *c, XMLOutput *o) |
![]() | |
template<class T > | |
static PyObject * | create (PyTypeObject *pytype, PyObject *args, PyObject *kwds) |
template<class T > | |
static Object * | createDefault () |
template<class T > | |
static Object * | createString (const string &n) |
static PyObject * | toXML (PyObject *, PyObject *) |
Static Public Attributes | |
static const MetaCategory * | metadata |
This class is an implementation of the "visitor" design pattern. It is intended as a basis for different algorithms 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.
|
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::utils::HasName< Solver >.
Reimplemented in frepple::SolverMRP, and module_lp_solver::LPSolver.
Definition at line 56 of file solver.cpp.
|
virtual |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Reimplemented in frepple::SolverMRP, and module_lp_solver::LPSolver.
Definition at line 68 of file solver.cpp.
|
inline |
Returns how elaborate and verbose output is requested.
As a guideline solvers should respect the following guidelines:
|
inlinevirtual |
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, and module_lp_solver::LPSolver.
|
static |
Reimplemented in frepple::SolverMRP, and module_lp_solver::LPSolver.
Definition at line 31 of file solver.cpp.
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Reimplemented in frepple::SolverMRP, and module_lp_solver::LPSolver.
Definition at line 78 of file solver.cpp.
|
inline |
|
static |
Reimplemented in frepple::SolverMRP.
Definition at line 90 of file solver.cpp.
|
pure virtual |
Implemented in frepple::SolverMRP, and module_lp_solver::LPSolver.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
Reimplemented in frepple::SolverMRP.
|
inlinevirtual |
|
inlinevirtual |
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, and module_lp_solver::LPSolver.
Definition at line 43 of file solver.cpp.
|
static |
Reimplemented in frepple::SolverMRP, and module_lp_solver::LPSolver.