frepple::SolverMRP::SolverMRPdata Class Reference

This class is a helper class of the SolverMRP class. More...

#include <solver.h>

Inheritance diagram for frepple::SolverMRP::SolverMRPdata:

List of all members.

Public Member Functions

virtual void commit ()
unsigned short getLogLevel () const
virtual size_t getSize () const
SolverMRPgetSolver () const
virtual const MetaClassgetType () const
bool getVerbose () const
void pop ()
void push (double q=0.0, Date d=Date::infiniteFuture)
 SolverMRPdata (SolverMRP *s=NULL, int c=0, deque< Demand * > *d=NULL)
virtual ~SolverMRPdata ()
- Public Member Functions inherited from frepple::utils::CommandManager
void add (Command *c)
iterator begin ()
 CommandManager ()
iterator end ()
reverse_iterator rbegin ()
void redoBookmark (Bookmark *)
reverse_iterator rend ()
void rollback (Bookmark *)
void rollback ()
BookmarksetBookmark ()
void undoBookmark (Bookmark *)
 ~CommandManager ()

Static Public Member Functions

static void runme (void *args)

Public Attributes

Stateprevstate
Statestate

Friends

class SolverMRP

Detailed Description

This class is a helper class of the SolverMRP class.

It stores the solver state maintained by each solver thread.

See also:
SolverMRP

Definition at line 555 of file solver.h.


Constructor & Destructor Documentation

frepple::SolverMRP::SolverMRPdata::SolverMRPdata ( SolverMRP s = NULL,
int  c = 0,
deque< Demand * > *  d = NULL 
)
inline

Constructor.

Definition at line 570 of file solver.h.

virtual frepple::SolverMRP::SolverMRPdata::~SolverMRPdata ( )
inlinevirtual

Destructor.

Definition at line 575 of file solver.h.


Member Function Documentation

void frepple::SolverMRP::SolverMRPdata::commit ( )
virtual

This function runs a single planning thread. Such a thread will loop through the following steps:

  • Use the method next_cluster() to find another unplanned cluster.
  • Exit the thread if no more cluster is found.
  • Sort all demands in the cluster, using the demand_comparison() method.
  • Loop through the sorted list of demands and plan each of them. During planning the demands exceptions are caught, and the planning loop will simply move on to the next demand. In this way, an error in a part of the model doesn't ruin the complete plan.
    See also:
    demand_comparison
    next_cluster

Reimplemented from frepple::utils::CommandManager.

Definition at line 72 of file solverplan.cpp.

unsigned short frepple::SolverMRP::SolverMRPdata::getLogLevel ( ) const
inline

Verbose mode is inherited from the solver.

Definition at line 578 of file solver.h.

virtual size_t frepple::SolverMRP::SolverMRPdata::getSize ( ) const
inlinevirtual

Definition at line 597 of file solver.h.

SolverMRP* frepple::SolverMRP::SolverMRPdata::getSolver ( ) const
inline

Return the solver.

Definition at line 567 of file solver.h.

virtual const MetaClass& frepple::SolverMRP::SolverMRPdata::getType ( ) const
inlinevirtual

Definition at line 596 of file solver.h.

bool frepple::SolverMRP::SolverMRPdata::getVerbose ( ) const
inline

Definition at line 599 of file solver.h.

void frepple::SolverMRP::SolverMRPdata::pop ( )
inline

Removes a state from the status stack.

Definition at line 623 of file solver.h.

void frepple::SolverMRP::SolverMRPdata::push ( double  q = 0.0,
Date  d = Date::infiniteFuture 
)
inline

Add a new state to the status stack.

Definition at line 605 of file solver.h.

static void frepple::SolverMRP::SolverMRPdata::runme ( void *  args)
inlinestatic

Definition at line 559 of file solver.h.


Friends And Related Function Documentation

friend class SolverMRP
friend

Definition at line 557 of file solver.h.


Member Data Documentation

State* frepple::SolverMRP::SolverMRPdata::prevstate

Pointer to the solver status one level higher on the stack.

Definition at line 661 of file solver.h.

State* frepple::SolverMRP::SolverMRPdata::state

Pointer to the current solver status.

Definition at line 658 of file solver.h.


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