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

A constraint that prevents certain blocks that can't be extracted before a period due to capacities constraints, to be used. More...

#include <filtering.h>

Inheritance diagram for delphos::MinExtractPeriodConstraint:
Inheritance graph
Collaboration diagram for delphos::MinExtractPeriodConstraint:
Collaboration graph

Public Member Functions

 MinExtractPeriodConstraint (const string &name, const string &attribute, const vector< double > &capacities, delphos::Precedence *prec, delphos::BlockModel &bm)
 Defines A constraint that prevents certain blocks that can't be extracted before a period due to capacities constraints, to be used. More...
 
 MinExtractPeriodConstraint (const string &name, const string &attribute, const vector< double > &capacities, delphos::Precedence *prec, delphos::BlockModel &bm, const vector< string > &destinations, const vector< string > &val_attr)
 Defines A constraint that prevents certain blocks that can't be extracted before a period due to capacities constraints, to be used. More...
 
virtual ~MinExtractPeriodConstraint ()
 The destructor.
 
bool ComputeMinExtractPeriod ()
 Computes the extracted period minimums for each block.
 
void SetMinExtractPeriod (const delphos::BlockIndexType id, const unsigned int period)
 Set a minimum extracted period for a block. More...
 
unsigned int GetMinExtractPeriod (const delphos::BlockIndexType id) const
 Returns The extracted period minimum for a given block. More...
 
float GetConeVal (const delphos::BlockIndexType id) const
 Returns the full precedence cone value of a given block. More...
 
float GetConeWeight (const delphos::BlockIndexType id) const
 Returns the full precedence cone weight of a given block. More...
 
const unsigned int NumPeriods () const
 Returns the number of periods. Deprecated.
 
const unsigned int GetNumPeriods () const
 Returns the number of periods.
 
const double GetCapacity (const unsigned int period) const
 Returns the capacity of given period. More...
 
const PrecedenceGetPrecedence () const
 Returns The precedence.
 
virtual bool Check (const delphos::Schedule &sch) const
 checks if the constraint is satisfied by the schedule. More...
 
- Public Member Functions inherited from delphos::BlockConstraint
 BlockConstraint (const string &name, delphos::BlockModel &bm)
 Creates a new block selection constraint. More...
 
 BlockConstraint (const string &name, delphos::BlockSelection *bs)
 Creates a new block selection constraint. More...
 
delphos::BlockSelectionGetBlockSelection () const
 Returns the selection of blocks being constrained.
 
virtual ~BlockConstraint ()
 Destroys a block constraint.
 
- Public Member Functions inherited from delphos::Constraint
 Constraint (const string &name)
 Creates a constraint with given name. More...
 
virtual ~Constraint ()
 Destructor. More...
 
virtual bool Check (const delphos::FractionalSchedule &fsch) const
 Checks if the given fractional schedule satisfies the constraint. More...
 
virtual string ToXML (const unsigned int identation_level=0) const
 A XML string describing the constraint. More...
 
const char * TypeName () const
 a char string used a identifier in the XML representation of the constraint.
 

Detailed Description

A constraint that prevents certain blocks that can't be extracted before a period due to capacities constraints, to be used.

Constructor & Destructor Documentation

delphos::MinExtractPeriodConstraint::MinExtractPeriodConstraint ( const string &  name,
const string &  attribute,
const vector< double > &  capacities,
delphos::Precedence prec,
delphos::BlockModel bm 
)

Defines A constraint that prevents certain blocks that can't be extracted before a period due to capacities constraints, to be used.

Parameters
nameThe name of the constraint.
attributeThe name of the weight attribute.
capacitiesThe capacity values for each period.
precThe precedence to be applied.
bmThe block model to be constrained.
delphos::MinExtractPeriodConstraint::MinExtractPeriodConstraint ( const string &  name,
const string &  attribute,
const vector< double > &  capacities,
delphos::Precedence prec,
delphos::BlockModel bm,
const vector< string > &  destinations,
const vector< string > &  val_attr 
)

Defines A constraint that prevents certain blocks that can't be extracted before a period due to capacities constraints, to be used.

Parameters
nameThe name of the constraint.
attributeThe name of the weight attribute.
capacitiesThe capacity values for each period.
precThe precedence to be applied.
bmThe block model to be constrained.
destinationsThe destination names.
val_attrThe attribute name of value for each destination.

Member Function Documentation

bool delphos::MinExtractPeriodConstraint::Check ( const delphos::Schedule sch) const
virtual

checks if the constraint is satisfied by the schedule.

Parameters
schThe schedule to be checked.

Checks if the constraint is satisfied by the schedule.

Reimplemented from delphos::Constraint.

const double delphos::MinExtractPeriodConstraint::GetCapacity ( const unsigned int  period) const

Returns the capacity of given period.

Parameters
periodThe given period.
float delphos::MinExtractPeriodConstraint::GetConeVal ( const delphos::BlockIndexType  id) const

Returns the full precedence cone value of a given block.

Parameters
idThe id of block.
float delphos::MinExtractPeriodConstraint::GetConeWeight ( const delphos::BlockIndexType  id) const

Returns the full precedence cone weight of a given block.

Parameters
idThe id of block.
unsigned int delphos::MinExtractPeriodConstraint::GetMinExtractPeriod ( const delphos::BlockIndexType  id) const

Returns The extracted period minimum for a given block.

Parameters
idThe id of the block.
void delphos::MinExtractPeriodConstraint::SetMinExtractPeriod ( const delphos::BlockIndexType  id,
const unsigned int  period 
)

Set a minimum extracted period for a block.

Parameters
idThe id of block.
periodThe minimum period to be set.

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