Skip to content

Commit

Permalink
remove unused parameters from antares settings.ini (#370)
Browse files Browse the repository at this point in the history
* remove useless parameters from antares settings

* remove compilation warnings
  • Loading branch information
sgatto authored Feb 14, 2022
1 parent 9110a1d commit 14b2666
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
8 changes: 4 additions & 4 deletions src/cpp/benders/benders_core/WorkerTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/*!
* \brief Get point
*/
Point WorkerMasterData::get_point() {
Point WorkerMasterData::get_point() const{
return *_x0;
}

Point WorkerMasterData::get_min_invest() {
Point WorkerMasterData::get_min_invest() const{
return *_min_invest;
}

Point WorkerMasterData::get_max_invest() {
Point WorkerMasterData::get_max_invest() const{
return *_max_invest;
}

Expand All @@ -26,7 +26,7 @@ LogData defineLogDataFromBendersDataAndTrace(const BendersData& data, const Bend
result.x0 = data.bestx;
size_t bestItIndex_l = data.best_it - 1;

if (bestItIndex_l >= 0 && bestItIndex_l < trace.size())
if (bestItIndex_l < trace.size())
{
const WorkerMasterDataPtr& bestItTrace = trace[bestItIndex_l];
result.slave_cost = bestItTrace->_operational_cost;
Expand Down
16 changes: 7 additions & 9 deletions src/cpp/benders/benders_core/include/WorkerTrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
class WorkerMasterData {
public:

WorkerMasterData(){
_valid = false;
}
WorkerMasterData() =default;

bool _valid;
bool _valid = false;
double _lb;
double _ub;
double _bestub;
Expand All @@ -30,13 +28,13 @@ class WorkerMasterData {
double _invest_cost;
double _operational_cost;

Point get_point();
Point get_min_invest();
Point get_max_invest();
Point get_point() const;
Point get_min_invest() const;
Point get_max_invest() const;
};

typedef std::shared_ptr<WorkerMasterData> WorkerMasterDataPtr;
typedef std::vector<WorkerMasterDataPtr> BendersTrace;
using WorkerMasterDataPtr=std::shared_ptr<WorkerMasterData> ;
using BendersTrace=std::vector<WorkerMasterDataPtr> ;

LogData defineLogDataFromBendersDataAndTrace(const BendersData& data, const BendersTrace& trace);

Expand Down
4 changes: 0 additions & 4 deletions src/python/antares_xpansion/general_data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ def _get_values_to_change_general_data_file(self):
(optimization, 'include-tc-minstablepower'): 'true' if self.is_accurate else 'false',
(optimization, 'include-tc-min-ud-time'): 'true' if self.is_accurate else 'false',
(optimization, 'include-dayahead'): 'true' if self.is_accurate else 'false',
(optimization, 'include-usexprs'): None,
(optimization, 'include-inbasis'): None,
(optimization, 'include-outbasis'): None,
(optimization, 'include-trace'): None,
('[general]', 'mode'): 'expansion' if self.is_accurate else 'Economy',
(
'[other preferences]',
Expand Down
5 changes: 1 addition & 4 deletions tests/cpp/solvers_interface/test_reading_problem.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#pragma once
#include "catch2.hpp"
#include <iostream>
#include "multisolver_interface/Solver.h"
Expand Down Expand Up @@ -605,9 +604,7 @@ TEST_CASE("We can get the indices of rows and columns by their names", "[read][g
}
//========================================================================================
// Get row and columns indices by their names
int n_vars = solver->get_ncols();
int n_rows = solver->get_nrows();


int col_index = -1;
std::string cur_name;
for (int i(0); i < 2; i++) {
Expand Down

0 comments on commit 14b2666

Please sign in to comment.