The purpose of this class is to compute the levels of all buffers, operations and resources in the model, and to categorize them in clusters. More...
#include <model.h>

Public Member Functions | |
unsigned short | getCluster () const |
short | getLevel () const |
Static Public Member Functions | |
static unsigned short | getNumberOfClusters () |
static unsigned short | getNumberOfHangingClusters () |
static void | triggerLazyRecomputation () |
Protected Member Functions | |
HasLevel () | |
HasLevel (const HasLevel &o) | |
~HasLevel () | |
Static Protected Member Functions | |
static void | computeLevels () |
Detailed Description
The purpose of this class is to compute the levels of all buffers, operations and resources in the model, and to categorize them in clusters.
Resources and buffers linked to the delivery operations of the demand are assigned level 1. buffers one level upstream have level 2, and so on...
A cluster is group of planning entities (buffers, resources and operations) that are linked together using loads and/or flows. Each cluster can be seen as a completely independent part of the model and the planning problem. There is no interaction possible between clusters. Clusters are helpful is multi-threading the planning problem, partial replanning of the model, etc...
Constructor & Destructor Documentation
frepple::HasLevel::HasLevel | ( | ) | [inline, protected] |
frepple::HasLevel::HasLevel | ( | const HasLevel & | o | ) | [inline, protected] |
frepple::HasLevel::~HasLevel | ( | ) | [inline, protected] |
Member Function Documentation
void frepple::HasLevel::computeLevels | ( | ) | [static, protected] |
This function recomputes all levels in the model. It is called automatically when the getLevel or getCluster() function on a Buffer, Resource or Operation are called while the "recomputeLevels" flag is set. Right, this is an example of a 'lazy' algorithm: only compute the information when it is required. Note however that the computation is triggered over the complete model, not a subset... The runtime of the algorithm is pretty much linear with the total number of operations in the model. The cluster size also has some (limited) impact on the performance: a network with larger cluster size will take longer to analyze.
- Exceptions:
-
LogicException Generated when there are too many clusters in your model. The maximum limit is USHRT_MAX, i.e. the greatest number that can be stored in a variable of type "unsigned short". The limit is platform dependent. On 32-bit platforms it will typically be 65535.
Definition at line 48 of file leveled.cpp.
unsigned short frepple::HasLevel::getCluster | ( | ) | const [inline] |
short frepple::HasLevel::getLevel | ( | ) | const [inline] |
static unsigned short frepple::HasLevel::getNumberOfClusters | ( | ) | [inline, static] |
static unsigned short frepple::HasLevel::getNumberOfHangingClusters | ( | ) | [inline, static] |
static void frepple::HasLevel::triggerLazyRecomputation | ( | ) | [inline, static] |
This function should be called when something is changed in the network structure. The notification sets a flag, but does not immediately trigger the recomputation.
- See also:
- computeLevels
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
