module_forecast::ForecastSolver Class Reference
Implementation of a forecast netting algorithm. More...
#include <forecast.h>

Classes | |
struct | sorter |
Public Member Functions | |
bool | callback (Demand *l, const Signal a) |
ForecastSolver (const string &n) | |
virtual size_t | getSize () const |
virtual const MetaClass & | getType () const |
void | solve (void *v=NULL) |
void | solve (const Demand *, void *=NULL) |
void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
Static Public Member Functions | |
static int | initialize () |
Static Public Attributes | |
static const MetaClass * | metadata |
Friends | |
class | Forecast |
Detailed Description
Implementation of a forecast netting algorithm.
As customer orders are being received they need to be deducted from the forecast to avoid double-counting demand.
The netting solver will process each order as follows:
- First search for a matching forecast.
A matching forecast has the same item and customer as the order.
If no match is found at this level, a match is tried at higher levels of the customer and item.
Ultimately a match is tried with a empty customer or item field. - Next, the remaining net quantity of the forecast is decreased.
The forecast bucket to be reduced is the one where the order is due.
If the net quantity is already completely depleted in that bucket the solver will look in earlier and later buckets. The parameters Net_Early and Net_Late control the limits for the search in the time dimension.
The logging levels have the following meaning:
- 0: Silent operation. Default logging level.
- 1: Log demands being netted and the matching forecast.
- 2: Same as 1, plus details on forecast buckets being netted.
Definition at line 1255 of file forecast.h.
Constructor & Destructor Documentation
module_forecast::ForecastSolver::ForecastSolver | ( | const string & | n | ) | [inline] |
Constructor.
Definition at line 1260 of file forecast.h.
Member Function Documentation
Callback function, used for netting orders against the forecast.
Definition at line 46 of file forecastsolver.cpp.
virtual size_t module_forecast::ForecastSolver::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
Definition at line 1274 of file forecast.h.
virtual const MetaClass& module_forecast::ForecastSolver::getType | ( | ) | const [inline, virtual] |
This returns the type information on the object, a bit similar to the standard type_info information.
Reimplemented from frepple::Solver.
Definition at line 1272 of file forecast.h.
int module_forecast::ForecastSolver::initialize | ( | ) | [static] |
Reimplemented from frepple::Solver.
Definition at line 35 of file forecastsolver.cpp.
void module_forecast::ForecastSolver::solve | ( | void * | v = NULL |
) | [virtual] |
This is the main solver method that will appropriately call the other solve methods.
Implements frepple::Solver.
Definition at line 104 of file forecastsolver.cpp.
void module_forecast::ForecastSolver::solve | ( | const Demand * | l, | |
void * | v = NULL | |||
) | [virtual] |
This method handles the search for a matching forecast, followed by decreasing the net forecast.
Reimplemented from frepple::Solver.
Definition at line 75 of file forecastsolver.cpp.
void module_forecast::ForecastSolver::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::Solver.
Definition at line 56 of file forecastsolver.cpp.
Friends And Related Function Documentation
friend class Forecast [friend] |
Definition at line 1257 of file forecast.h.
Member Data Documentation
const MetaClass * module_forecast::ForecastSolver::metadata [static] |
Reimplemented from frepple::Solver.
Definition at line 1273 of file forecast.h.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
