MineLink
 All Data Structures Functions Variables Pages
delphos::Schedule Class Reference

Defines a scheduling of blocks. More...

#include <schedule.h>

Inheritance diagram for delphos::Schedule:
Inheritance graph
Collaboration diagram for delphos::Schedule:
Collaboration graph

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::SchedulingInstanceGetInstance () 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::BlockModelGetBlockModel ()
 Retrieves the block model to which the entity is associated. More...
 
const delphos::BlockModelGetBlockModel () const
 Retrieves the block model to which the entity is associated. More...
 

Static Public Attributes

static const unsigned int NO_PERIOD =0
 

Detailed Description

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.

Constructor & Destructor Documentation

delphos::Schedule::Schedule ( SchedulingInstance si)

Create a new Schedule.

Parameters
siThe scheduling instance the schedule refers to.

Member Function Documentation

const unsigned int delphos::Schedule::GetBlockDestination ( const delphos::BlockIndexType &  index) const

Return what is the destination the block is sent to.

Parameters
indexThe 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.

Parameters
cThe 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.

Parameters
xthe X coordinate of the block.
ythe Y coordinate of the block.
zthe 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.

Parameters
xthe X coordinate of the block.
ythe Y coordinate of the block.
zthe 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.

Parameters
indexThe 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.

Parameters
cThe 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.

Parameters
indexThe 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.

Parameters
cThe 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.

Parameters
xthe X coordinate of the block.
ythe Y coordinate of the block.
zthe 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.

Parameters
indexthe 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.

Parameters
schedule_filethe 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.

Parameters
indexthe index (position) of the block, from 0 to Size()-1.
destinationthe destination being assigned to the block.
void delphos::Schedule::SetBlockDestination ( const delphos::Coordinates c,
const unsigned int &  destination 
)

Assigns the destination to a block.

Parameters
cthe block coordinates.
destinationthe 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.

Parameters
xthe X coordinate of the block.
ythe Y coordinate of the block.
zthe Z coordinate of the block.
destinationthe destination being assigned to the block.
void delphos::Schedule::SetBlockDestinations ( const delphos::BlockIndexType &  index,
const vector< double > &  destinations 
)

Assigns destinations to a block.

Parameters
indexthe index (position) of the block, from 0 to Size()-1.
destinationsthe destinations being assigned to the block.
void delphos::Schedule::SetBlockDestinations ( const delphos::Coordinates c,
const vector< double > &  destinations 
)

Assigns destinations to a block.

Parameters
cthe block coordinates.
destinationsthe 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.

Parameters
xthe X coordinate of the block.
ythe Y coordinate of the block.
zthe Z coordinate of the block.
destinationsthe 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.

Parameters
indexthe index (position) of the block, from 0 to Size().
periodthe 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.

Parameters
cthe block coordinates.
periodthe 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.

Parameters
xthe X coordinate of the block.
ythe Y coordinate of the block.
zthe Z coordinate of the block.
periodthe 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.

Parameters
indexthe index (position) of the block, from 0 to Size()-1.
valuethe value of stock to be assigned.
bool delphos::Schedule::StocksToTextFile ( const char *  stocks_file) const

store the stocks schedule in the given text file.

Parameters
stocks_filethe 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.

Parameters
time_attributeThe name of the attribute, the scheduling periods will be saved into.
dest_attributeThe name of the attribute, the scheduling destinations will be saved into.
multiattrThe 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.

Field Documentation

const unsigned int delphos::Schedule::NO_PERIOD =0
static

Period returned for non scheduled blocks.


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