Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
Benders::Criterion::CriterionComputation Class Reference

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 CriterionInputDatagetCriterionInputData () const
 Retrieves the criterion input data.
 
bool IsEmpty () const
 

Constructor & Destructor Documentation

◆ CriterionComputation()

Benders::Criterion::CriterionComputation::CriterionComputation ( const CriterionInputData & criterion_input_data)
explicit

Constructs a CriterionComputation object.

This constructor initializes the CriterionComputation instance with the provided criterion input data.

Parameters
criterion_input_dataThe input data to be used for criterion computation.

Member Function Documentation

◆ ComputeCriterion()

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.

Parameters
subproblem_weightThe weight of the subproblem affecting the criteria.
sub_problem_solutionA vector containing the solutions of the subproblem.
criteriaA reference to a vector where the computed criteria will be stored.
patterns_valuesA reference to a vector where the computed pattern values will be stored.

◆ getCriterionInputData()

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.

Returns
A constant reference to the CriterionInputData object.

◆ getVarIndices()

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.

Returns
A reference to the vector of variable indices.

◆ SearchVariables()

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.

Parameters
variablesA vector of strings representing the variable names to search for.

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