|  | MineLink
    | 
Defines a pre-existing stock. More...
#include <stock.h>


| Public Member Functions | |
| Stock (const string &stock_name, const string &tname, const double &tonnage) | |
| Creates a new stock with given name and tonnage.  More... | |
| Stock (const Stock &other) | |
| Copy constructor.  More... | |
| virtual | ~Stock () | 
| Destructor.  More... | |
| const double | Tonnage () const | 
| Return the (initial) tonnage in the stock.  More... | |
| const double | GetTonnage () const | 
| Return the (initial) tonnage in the stock.  More... | |
| const string | TonnageAttributeName () const | 
| Return the name of the tonnage atribute of the stock.  More... | |
| const string | GetTonnageAttributeName () const | 
| Return the name of the tonnage atribute of the stock.  More... | |
| void | SetTonnage (const double &tonnage_value) | 
| Set the tonnage value of the stock.  More... | |
|  Public Member Functions inherited from delphos::Dict | |
| Dict () | |
| Creates a new empty dictionary. | |
| Dict (const string &attr, const double &attr_value) | |
| Creates a new dictionary with a initial pair.  More... | |
| Dict (const map< string, double > &m) | |
| Creates a new dictionary from a existing map container.  More... | |
| virtual | ~Dict () | 
| Destructor. | |
| const double | operator[] (const string &attr_name) const | 
| Enables the use of the [] on the instance to access values.  More... | |
| double & | operator[] (const string &attr_name) | 
| Enables the use of the [] on the instance to access values.  More... | |
| const bool | IsAttribute (const string &attr_name) const | 
| Query if a there is a key matching the argument on the dictionary. Return true on success, false on failure.  More... | |
| const unsigned int | NumAttributes () const | 
| Return the amount of pairs on the dictionary. | |
| void | AddAttribute (const string &attr_name, double const &attr_value) | 
| Adds a new pair to the dictionary.  More... | |
| const map< string, double > | GetAttributes () const | 
| Return a copy of the internal map container. | |
| void | SetAttributes (const map< string, double > attr_map) | 
| Overwrites or copy the argument on the internal container.  More... | |
| const double | GetAttribute (const string &attr_name) | 
| Return the value associated with the given key.  More... | |
Defines a pre-existing stock.
A scheduling instance may consider pre-existing blocks of material which given attributes that can be scheduled over the planning horizon. This class allows specify one of such stocks.
A stock requires: a name and an overall tonnage, as well as need to have defined all the attributes that are used in the scheduling instance.
| delphos::Stock::Stock | ( | const string & | stock_name, | 
| const string & | tname, | ||
| const double & | tonnage | ||
| ) | 
Creates a new stock with given name and tonnage.
| stock_name | The name of the stock to be created. | 
| tname | the tonnage attribute name. | 
| tonnage | Overall tonnage contained in the stock. | 
This constructor creates the stock, but the attributes need also to be assigned in order to define the scheduling instance properly.
| delphos::Stock::Stock | ( | const Stock & | other | ) | 
Copy constructor.
| other | the given other stock to be copied. Copy constructor. | 
| 
 | virtual | 
Destructor.
Destructor.
| const double delphos::Stock::GetTonnage | ( | ) | const | 
Return the (initial) tonnage in the stock.
The initial tonnage in the stock.
| const string delphos::Stock::GetTonnageAttributeName | ( | ) | const | 
Return the name of the tonnage atribute of the stock.
The name of the tonnage attribute of the stock.
| void delphos::Stock::SetTonnage | ( | const double & | tonnage_value | ) | 
Set the tonnage value of the stock.
| tonnage_value | the given tonnage value of the stock. | 
| const double delphos::Stock::Tonnage | ( | ) | const | 
Return the (initial) tonnage in the stock.
The initial tonnage in the stock. Deprecated.
| const string delphos::Stock::TonnageAttributeName | ( | ) | const | 
Return the name of the tonnage atribute of the stock.
The name of the tonnage attribute of the stock. Deprecated.