Antares Xpansion
Investment simulations for Antares studies
|
Public Member Functions | |
CriterionComputation ()=default | |
default constructor | |
CriterionComputation (const CriterionInputData &criterion_input_data) | |
Constructs a CriterionComputation object. | |
void | SearchVariables (const std::vector< std::string > &variables) |
Searches for relevant variables based on the provided variable names. | |
void | ComputeCriterion (double subproblem_weight, const std::vector< double > &sub_problem_solution, std::vector< double > &criteria, std::vector< double > &patterns_values) |
Computes the criteria based on subproblem solutions. | |
std::vector< std::vector< int > > & | getVarIndices () |
Retrieves the variable indices. | |
const CriterionInputData & | getCriterionInputData () const |
Retrieves the criterion input data. | |
bool | IsEmpty () const |
|
explicit |
Constructs a CriterionComputation object.
This constructor initializes the CriterionComputation instance with the provided criterion input data.
criterion_input_data | The input data to be used for criterion computation. |
void Benders::Criterion::CriterionComputation::ComputeCriterion | ( | double | subproblem_weight, |
const std::vector< double > & | sub_problem_solution, | ||
std::vector< double > & | criteria, | ||
std::vector< double > & | patterns_values ) |
Computes the criteria based on subproblem solutions.
This method calculates the criterion criteria and pattern values based on the provided subproblem weight and solution. It updates the criteria and patterns values vectors accordingly.
subproblem_weight | The weight of the subproblem affecting the criteria. |
sub_problem_solution | A vector containing the solutions of the subproblem. |
criteria | A reference to a vector where the computed criteria will be stored. |
patterns_values | A reference to a vector where the computed pattern values will be stored. |
const CriterionInputData & Benders::Criterion::CriterionComputation::getCriterionInputData | ( | ) | const |
Retrieves the criterion input data.
This method returns a constant reference to the criterion input data associated with this CriterionComputation instance.
std::vector< std::vector< int > > & Benders::Criterion::CriterionComputation::getVarIndices | ( | ) |
Retrieves the variable indices.
This method returns a reference to the vector containing the indices of the variables associated with this CriterionComputation instance.
void Benders::Criterion::CriterionComputation::SearchVariables | ( | const std::vector< std::string > & | variables | ) |
Searches for relevant variables based on the provided variable names.
This method initializes a VariablesGroup with the provided variable names and retrieves the indices of these variables for later computation.
variables | A vector of strings representing the variable names to search for. |