![]() |
MineLink
|
Defines a fractional scheduling of blocks. More...
#include <fractional_schedule.h>
Public Member Functions | |
FractionalSchedule (SchedulingInstance &si) | |
Create a new Schedule. More... | |
FractionalSchedule (const FractionalSchedule &other) | |
copy constructor More... | |
virtual | ~FractionalSchedule () |
Destructor. | |
void | SetAssignation (const delphos::BlockIndexType &index, const unsigned int &period, const unsigned int &destination, const double &val) |
Assigns period / destination to a block defined by its coordinates. More... | |
void | SetAssignation (const delphos::Coordinates &c, const unsigned int &period, const unsigned int &destination, const double &val) |
Assigns period / destination to a block defined by its coordinates. More... | |
void | SetAssignation (const double &x, const double &y, const double &z, const unsigned int &period, const unsigned int &destination, const double &val) |
Assigns period / destination to a block defined by its coordinates. More... | |
void | GetAssignation (const unsigned long &pos, delphos::BlockIndexType &index, unsigned int &period, unsigned int &destination, double &val) const |
Return the assignment of given position. More... | |
const unsigned long | Size () const |
Return the number of assigments. | |
void | SetStockValue (const delphos::BlockIndexType &index, const double &value) const |
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 . | |
delphos::SchedulingInstance & | GetInstance () const |
return the scheduling instance. | |
bool | FractionalScheduleToTextFile (const char *schedule_file) const |
store the fractional 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 fractional schedule satisfy the constaints of the scheduling instance. | |
delphos::BlockSelection * | GetBlocksWithoutSuccessor () |
Returns the blocks present in the schedule that don't have successors. | |
![]() | |
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... | |
Defines a fractional scheduling of blocks.
This class defines a fractional scheduling of blocks, that is, a list of assignment of a time period and a destination for each parts of blocks.
delphos::FractionalSchedule::FractionalSchedule | ( | SchedulingInstance & | si | ) |
Create a new Schedule.
si | The scheduling instance the schedule refers to. |
delphos::FractionalSchedule::FractionalSchedule | ( | const FractionalSchedule & | other | ) |
copy constructor
other | The fractional schedule to be copied. |
bool delphos::FractionalSchedule::FractionalScheduleToTextFile | ( | const char * | schedule_file | ) | const |
store the fractional blocks schedule in the given text file.
schedule_file | the name of the text file in which the fractional schedule is stored. It only concern blocks. |
void delphos::FractionalSchedule::GetAssignation | ( | const unsigned long & | pos, |
delphos::BlockIndexType & | index, | ||
unsigned int & | period, | ||
unsigned int & | destination, | ||
double & | val | ||
) | const |
Return the assignment of given position.
pos | The position of the assignment being returned. | |
[out] | index | The index of the block of the pos th assignment. |
[out] | period | The period of pos th assignment. |
[out] | destination | The destination of the pos th assignment. |
[out] | val | The part of the block of the pos th assignment. |
const double delphos::FractionalSchedule::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. |
void delphos::FractionalSchedule::SetAssignation | ( | const delphos::BlockIndexType & | index, |
const unsigned int & | period, | ||
const unsigned int & | destination, | ||
const double & | val | ||
) |
Assigns period / destination to a block defined by its coordinates.
index | The index of the block. |
period | The period being assigned to the part of the block. |
destination | The destination being assigned to the part of the block. |
val | The part of the block assigned to the destination. |
void delphos::FractionalSchedule::SetAssignation | ( | const delphos::Coordinates & | c, |
const unsigned int & | period, | ||
const unsigned int & | destination, | ||
const double & | val | ||
) |
Assigns period / destination to a block defined by its coordinates.
c | The coordinates of the block. |
period | The period being assigned to the part of the block. |
destination | The destination being assigned to the part of the block. |
val | The part of the block assigned to the destination. |
void delphos::FractionalSchedule::SetAssignation | ( | const double & | x, |
const double & | y, | ||
const double & | z, | ||
const unsigned int & | period, | ||
const unsigned int & | destination, | ||
const double & | val | ||
) |
Assigns period / destination to a block defined by its coordinates.
x | the X coordinate of the block. |
y | the Y coordinate of the block. |
z | the Z coordinate of the block. |
period | The period being assigned to the part of the block. |
destination | The destination being assigned to the part of the block. |
val | The part of the block assigned to the destination. |
void delphos::FractionalSchedule::SetStockValue | ( | const delphos::BlockIndexType & | index, |
const double & | value | ||
) | const |
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::FractionalSchedule::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. |