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

Defines a fractional scheduling of blocks. More...

#include <fractional_schedule.h>

Inheritance diagram for delphos::FractionalSchedule:
Inheritance graph
Collaboration diagram for delphos::FractionalSchedule:
Collaboration graph

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::SchedulingInstanceGetInstance () 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::BlockSelectionGetBlocksWithoutSuccessor ()
 Returns the blocks present in the schedule that don't have successors.
 
- 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

delphos::FractionalSchedule::FractionalSchedule ( SchedulingInstance si)

Create a new Schedule.

Parameters
siThe scheduling instance the schedule refers to.
delphos::FractionalSchedule::FractionalSchedule ( const FractionalSchedule other)

copy constructor

Parameters
otherThe fractional schedule to be copied.

Member Function Documentation

bool delphos::FractionalSchedule::FractionalScheduleToTextFile ( const char *  schedule_file) const

store the fractional blocks schedule in the given text file.

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

Parameters
posThe position of the assignment being returned.
[out]indexThe index of the block of the pos th assignment.
[out]periodThe period of pos th assignment.
[out]destinationThe destination of the pos th assignment.
[out]valThe 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.

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

Parameters
indexThe index of the block.
periodThe period being assigned to the part of the block.
destinationThe destination being assigned to the part of the block.
valThe 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.

Parameters
cThe coordinates of the block.
periodThe period being assigned to the part of the block.
destinationThe destination being assigned to the part of the block.
valThe 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.

Parameters
xthe X coordinate of the block.
ythe Y coordinate of the block.
zthe Z coordinate of the block.
periodThe period being assigned to the part of the block.
destinationThe destination being assigned to the part of the block.
valThe 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.

Parameters
indexthe index (position) of the block, from 0 to Size()-1.
valuethe value of stock to be assigned.
bool delphos::FractionalSchedule::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.

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