![]() |
MineLink
|
Defines a scheduling of blocks. More...
#include <schedule.h>


Public Member Functions | |
| Schedule (SchedulingInstance &si) | |
| Create a new Schedule. More... | |
| Schedule (const Schedule &other) | |
| Copy contructor. | |
| virtual | ~Schedule () |
| Destructor. | |
| const unsigned int | GetBlockPeriod (const delphos::BlockIndexType &index) const |
| Return at what time period the block is scheduled for extraction. More... | |
| const unsigned int | GetBlockPeriod (const delphos::Coordinates &c) const |
| Return at what time period the block is scheduled for extraction. More... | |
| const unsigned int | GetBlockPeriod (const double &x, const double &y, const double &z) const |
| Return at what time period the block is scheduled for extraction. More... | |
| const unsigned int | GetBlockDestination (const delphos::BlockIndexType &index) const |
| Return what is the destination the block is sent to. More... | |
| const unsigned int | GetBlockDestination (const delphos::Coordinates &c) const |
| Return what is the destination the block is sent to. More... | |
| const unsigned int | GetBlockDestination (const double &x, const double &y, const double &z) const |
| Return what is the destination the block is sent to. More... | |
| vector< double > | GetBlockDestinations (const double &x, const double &y, const double &z) const |
| Return what is the destination the block is sent to. More... | |
| vector< double > | GetBlockDestinations (const delphos::BlockIndexType &index) const |
| Return what is the destination the block is sent to. More... | |
| vector< double > | GetBlockDestinations (const delphos::Coordinates &c) const |
| Return what is the destination the block is sent to. More... | |
| void | SetBlockPeriod (const delphos::BlockIndexType &index, const unsigned int &period) |
| Schedules a block for extraction at a given time period. More... | |
| void | SetBlockPeriod (const delphos::Coordinates &c, const unsigned int &period) |
| Schedules a block for extraction at a given time period. More... | |
| void | SetBlockPeriod (const double &x, const double &y, const double &z, const unsigned int &period) |
| Schedules a block for extraction at a given time period. More... | |
| void | SetBlockDestination (const delphos::BlockIndexType &index, const unsigned int &destination) |
| Assigns the destination to a block. More... | |
| void | SetBlockDestination (const delphos::Coordinates &c, const unsigned int &destination) |
| Assigns the destination to a block. More... | |
| void | SetBlockDestination (const double &x, const double &y, const double &z, const unsigned int &destination) |
| Assigns the destination to a block. More... | |
| void | SetBlockDestinations (const delphos::BlockIndexType &index, const vector< double > &destinations) |
| Assigns destinations to a block. More... | |
| void | SetBlockDestinations (const delphos::Coordinates &c, const vector< double > &destinations) |
| Assigns destinations to a block. More... | |
| void | SetBlockDestinations (const double &x, const double &y, const double &z, const vector< double > &destinations) |
| Assigns destinations to a block. More... | |
| void | StoreAsAttribute (const string &time_attribute, const string &dest_attribute, const bool &multiattr=false) |
| Saves the schedule as an attribute in the block model. More... | |
| void | SetStockValue (const delphos::BlockIndexType &index, const double &value) |
| Assigns a stock value to the block of given index. More... | |
| double const | GetStockValue (const delphos::BlockIndexType &index) const |
| return the stock value of the block of given index. More... | |
| const unsigned int | StockVarListSize () const |
| return the size of the stock variable list. Deprecated. | |
| const unsigned int | GetStockVarListSize () const |
| return the size of the stock variable list. | |
| delphos::SchedulingInstance & | GetInstance () const |
| return the scheduling instance. | |
| bool | ScheduleToTextFile (const char *schedule_file, const bool &multiattr=false) const |
| store the blocks schedule in the given text file. More... | |
| bool | StocksToTextFile (const char *stocks_file) const |
| store the stocks schedule in the given text file. More... | |
| bool | Check () const |
| Check if the schedule satisfy the constaints of the scheduling instance. | |
Public Member Functions inherited from delphos::BlockModelEntity | |
| BlockModelEntity (delphos::BlockModel &bm) | |
| Creates a new block instance associated to a given block model. More... | |
| delphos::BlockModel & | GetBlockModel () |
| Retrieves the block model to which the entity is associated. More... | |
| const delphos::BlockModel & | GetBlockModel () const |
| Retrieves the block model to which the entity is associated. More... | |
Static Public Attributes | |
| static const unsigned int | NO_PERIOD =0 |
Defines a scheduling of blocks.
This class defines a scheduling of blocks, that is, an assignment of time periods to blocks in a block model representing the periods at which the blocks should be extracted.
| delphos::Schedule::Schedule | ( | SchedulingInstance & | si | ) |
Create a new Schedule.
| si | The scheduling instance the schedule refers to. |
| const unsigned int delphos::Schedule::GetBlockDestination | ( | const delphos::BlockIndexType & | index | ) | const |
Return what is the destination the block is sent to.
| index | The position (index) of the block in the block model (from 0 to Size()-1). |
| const unsigned int delphos::Schedule::GetBlockDestination | ( | const delphos::Coordinates & | c | ) | const |
Return what is the destination the block is sent to.
| c | The coordinates of the block. |
| const unsigned int delphos::Schedule::GetBlockDestination | ( | const double & | x, |
| const double & | y, | ||
| const double & | z | ||
| ) | const |
Return what is the destination the block is sent to.
| x | the X coordinate of the block. |
| y | the Y coordinate of the block. |
| z | the Z coordinate of the block. |
| vector< double > delphos::Schedule::GetBlockDestinations | ( | const double & | x, |
| const double & | y, | ||
| const double & | z | ||
| ) | const |
Return what is the destination the block is sent to.
| x | the X coordinate of the block. |
| y | the Y coordinate of the block. |
| z | the Z coordinate of the block. |
| vector< double > delphos::Schedule::GetBlockDestinations | ( | const delphos::BlockIndexType & | index | ) | const |
Return what is the destination the block is sent to.
| index | The position (index) of the block in the block model (from 0 to Size()-1). |
| vector< double > delphos::Schedule::GetBlockDestinations | ( | const delphos::Coordinates & | c | ) | const |
Return what is the destination the block is sent to.
| c | The coordinates of the block. |
| const unsigned int delphos::Schedule::GetBlockPeriod | ( | const delphos::BlockIndexType & | index | ) | const |
Return at what time period the block is scheduled for extraction.
| index | The position (index) of the block in the block model (from 0 to Size()-1). |
| const unsigned int delphos::Schedule::GetBlockPeriod | ( | const delphos::Coordinates & | c | ) | const |
Return at what time period the block is scheduled for extraction.
| c | The coordinates of the block. |
| const unsigned int delphos::Schedule::GetBlockPeriod | ( | const double & | x, |
| const double & | y, | ||
| const double & | z | ||
| ) | const |
Return at what time period the block is scheduled for extraction.
| x | the X coordinate of the block. |
| y | the Y coordinate of the block. |
| z | the Z coordinate of the block. |
| const double delphos::Schedule::GetStockValue | ( | const delphos::BlockIndexType & | index | ) | const |
return the stock value of the block of given index.
| index | the index (position) of the block, from 0 to Size()-1. |
| bool delphos::Schedule::ScheduleToTextFile | ( | const char * | schedule_file, |
| const bool & | multiattr = false |
||
| ) | const |
store the blocks schedule in the given text file.
| schedule_file | the name of the text file in which the schedule is stored. It only concern blocks. |
| void delphos::Schedule::SetBlockDestination | ( | const delphos::BlockIndexType & | index, |
| const unsigned int & | destination | ||
| ) |
Assigns the destination to a block.
| index | the index (position) of the block, from 0 to Size()-1. |
| destination | the destination being assigned to the block. |
| void delphos::Schedule::SetBlockDestination | ( | const delphos::Coordinates & | c, |
| const unsigned int & | destination | ||
| ) |
Assigns the destination to a block.
| c | the block coordinates. |
| destination | the destination being assigned to the block. |
| void delphos::Schedule::SetBlockDestination | ( | const double & | x, |
| const double & | y, | ||
| const double & | z, | ||
| const unsigned int & | destination | ||
| ) |
Assigns the destination to a block.
| x | the X coordinate of the block. |
| y | the Y coordinate of the block. |
| z | the Z coordinate of the block. |
| destination | the destination being assigned to the block. |
| void delphos::Schedule::SetBlockDestinations | ( | const delphos::BlockIndexType & | index, |
| const vector< double > & | destinations | ||
| ) |
Assigns destinations to a block.
| index | the index (position) of the block, from 0 to Size()-1. |
| destinations | the destinations being assigned to the block. |
| void delphos::Schedule::SetBlockDestinations | ( | const delphos::Coordinates & | c, |
| const vector< double > & | destinations | ||
| ) |
Assigns destinations to a block.
| c | the block coordinates. |
| destinations | the destinations being assigned to the block. |
| void delphos::Schedule::SetBlockDestinations | ( | const double & | x, |
| const double & | y, | ||
| const double & | z, | ||
| const vector< double > & | destinations | ||
| ) |
Assigns destinations to a block.
| x | the X coordinate of the block. |
| y | the Y coordinate of the block. |
| z | the Z coordinate of the block. |
| destinations | the destinations being assigned to the block. |
| void delphos::Schedule::SetBlockPeriod | ( | const delphos::BlockIndexType & | index, |
| const unsigned int & | period | ||
| ) |
Schedules a block for extraction at a given time period.
| index | the index (position) of the block, from 0 to Size(). |
| period | the period for which the block is now scheduled for extraction. |
| void delphos::Schedule::SetBlockPeriod | ( | const delphos::Coordinates & | c, |
| const unsigned int & | period | ||
| ) |
Schedules a block for extraction at a given time period.
| c | the block coordinates. |
| period | the period for which the block is now scheduled for extraction. |
| void delphos::Schedule::SetBlockPeriod | ( | const double & | x, |
| const double & | y, | ||
| const double & | z, | ||
| const unsigned int & | period | ||
| ) |
Schedules a block for extraction at a given time period.
| x | the X coordinate of the block. |
| y | the Y coordinate of the block. |
| z | the Z coordinate of the block. |
| period | the period for which the block is now scheduled for extraction. |
| void delphos::Schedule::SetStockValue | ( | const delphos::BlockIndexType & | index, |
| const double & | value | ||
| ) |
Assigns a stock value to the block of given index.
| index | the index (position) of the block, from 0 to Size()-1. |
| value | the value of stock to be assigned. |
| bool delphos::Schedule::StocksToTextFile | ( | const char * | stocks_file | ) | const |
store the stocks schedule in the given text file.
| stocks_file | the name of the text file in which the stock schedule is stored. It only concern stocks. |
| void delphos::Schedule::StoreAsAttribute | ( | const string & | time_attribute, |
| const string & | dest_attribute, | ||
| const bool & | multiattr = false |
||
| ) |
Saves the schedule as an attribute in the block model.
| time_attribute | The name of the attribute, the scheduling periods will be saved into. |
| dest_attribute | The name of the attribute, the scheduling destinations will be saved into. |
| multiattr | The flag, in case of a PCPSP instance and if the flag is on, then the destinations are stored in various columns. |
This method creates an attribute in the block model and stores the schedule into this attribute.
|
static |
Period returned for non scheduled blocks.