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

Defines a case for the nested pits problem. More...

#include <nestedpit.h>

Inheritance diagram for delphos::NestedPitInstance:
Inheritance graph
Collaboration diagram for delphos::NestedPitInstance:
Collaboration graph

Public Member Functions

 NestedPitInstance (const string &priceformula, const string &recformula, const string &rmultformula, const string &csellformula, const string &cminformula, const string &cplantformula, const string &grade_attr, const string &tonn_attr, const vector< double > &rf, const Precedence &prec, const string &value_attr, const string &pit_attr, const bool &multiattr=true)
 Creates a new instance of the Nested Pit Problem. More...
 
 NestedPitInstance (const string &formula, const vector< double > &rf, const Precedence &prec, const string &value_attr, const string &pit_attr, const bool &multiattr=true)
 Creates a new instance of the Nested Pit Problem. More...
 
const vector< double > & GetRF () const
 Returns the revenue factors.
 
void AddMaterial (const string &priceformula, const string &recformula, const string &rmultformula, const string &csellformula, const string &cminformula, const string &cplantformula, const string &grade_attr, const string &tonn_attr)
 Add a new Material to the valorization formula. More...
 
const vector< string > & GetMaterial (const unsigned int &index) const
 Returns the indexed material characteritics used in the valorization formula if the the constructor with 6 sub formulas is used or throw exception in case of the use of the 1 formula constructor. More...
 
unsigned int GetNumMaterials () const
 Returns the number of materials present in the valorization formula if the the constructor with 6 sub formulas is used or 0 in case of the use of the 1 formula constructor.
 
const string & GetValueAttr () const
 Returns the value attribute string used as base for the value attribute string constructed for each revenue factor.
 
const string & GetPitAttr () const
 Returns the pit attribute string used as base for the pit attribute string result constructed for each revenue factor.
 
const PrecedenceGetPrecedence () const
 Returns the precedence used in the computation.
 
const string & GetFormula () const
 Returns the formula used in the computation only if the 1 formula constructor was used.
 
bool IsMultiattr () const
 Returns true only if each pit will be added as 1 column attribute In case of false, only one column attribute will be created for all pits.
 
- 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 case for the nested pits problem.

Constructor & Destructor Documentation

delphos::NestedPitInstance::NestedPitInstance ( const string &  priceformula,
const string &  recformula,
const string &  rmultformula,
const string &  csellformula,
const string &  cminformula,
const string &  cplantformula,
const string &  grade_attr,
const string &  tonn_attr,
const vector< double > &  rf,
const Precedence prec,
const string &  value_attr,
const string &  pit_attr,
const bool &  multiattr = true 
)

Creates a new instance of the Nested Pit Problem.

Parameters
priceformulathe price formula used to compute the price of the first material.
recformulathe recovery formula used to compute the recovery of the first material.
rmultformulathe conversion factor formula for the first material.
csellformulathe sell cost formula used to compute the sell cost of the first material.
cminformulathe mining cost formula used to compute the mining cost of the first material.
cplantformulathe plant cost formula used to compute the plant cost of the first material.
grade_attrthe grade attribute of the first material.
tonn_attrthe tonnelage attribute of the first material.
rfthe revenue factors used to compute the nested pits.
precThe (slope) precedence to be used.
value_attrThe attribute that will be use to construct a value attribute for each rf.
pit_attrThe attribute that will be use to construct pit attribute for each rf.
multiattrThe flag that is equal to 1 only if the pit results are stored in various columns.

In all formulas, the Block model columns have to appear into brackets like: [column_name] Notice that no block model is required, as the Precedence constraint is always referred to one.

delphos::NestedPitInstance::NestedPitInstance ( const string &  formula,
const vector< double > &  rf,
const Precedence prec,
const string &  value_attr,
const string &  pit_attr,
const bool &  multiattr = true 
)

Creates a new instance of the Nested Pit Problem.

Parameters
formulaThe complete valorization formula.
rfThe revenues factors values that will be applied in the valorization formula.
preche (slope) precedence to be used.
value_attrThe attribute that will be use to construct a value attribute for each rf.
pit_attrThe attribute that will be use to construct pit attribute for each rf.
multiattrThe flag that is equal to 1 only if the pit results are stored in various columns. In the formula, the Block model columns have to appear into brackets like: [column_name] The revenue factor have to appear as [rfa] in the formula, if it is not present an exception is thrown. Notice that no block model is required, as the Precedence constraint is always referred to one.

Member Function Documentation

void delphos::NestedPitInstance::AddMaterial ( const string &  priceformula,
const string &  recformula,
const string &  rmultformula,
const string &  csellformula,
const string &  cminformula,
const string &  cplantformula,
const string &  grade_attr,
const string &  tonn_attr 
)

Add a new Material to the valorization formula.

Parameters
priceformulathe price formula used to compute the price of the new material.
recformulathe recovery formula used to compute the recovery of the new material.
rmultformulathe conversion factor formula for the new material.
csellformulathe sell cost formula used to compute the sell cost of the new material.
cminformulathe mining cost formula used to compute the mining cost of the new material.
cplantformulathe plant cost formula used to compute the plant cost of the new material.
grade_attrthe grade attribute of the new material.
tonn_attrthe tonnelage attribute of the new material.
const vector< string > & delphos::NestedPitInstance::GetMaterial ( const unsigned int &  index) const

Returns the indexed material characteritics used in the valorization formula if the the constructor with 6 sub formulas is used or throw exception in case of the use of the 1 formula constructor.

Parameters
indexthe index of the material.

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