Skip to content

Commit

Permalink
Remove unused function arguments (#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin authored Nov 2, 2023
1 parent a551894 commit a630959
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ AdequacyPatchOptimization::AdequacyPatchOptimization(const Antares::Data::Study&
{
}

void AdequacyPatchOptimization::solve(uint weekInTheYear, int hourInTheYear)
void AdequacyPatchOptimization::solve()
{
problemeHebdo_->adequacyPatchRuntimeData->AdequacyFirstStep = true;
OPT_OptimisationHebdomadaire(options_, problemeHebdo_, adqPatchParams_, writer_);
Expand All @@ -62,7 +62,7 @@ void AdequacyPatchOptimization::solve(uint weekInTheYear, int hourInTheYear)
std::fill(problemeHebdo_->ResultatsHoraires[pays].ValeursHorairesDENS.begin(),
problemeHebdo_->ResultatsHoraires[pays].ValeursHorairesDENS.end(), 0);
}

OPT_OptimisationHebdomadaire(options_, problemeHebdo_, adqPatchParams_, writer_);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class AdequacyPatchOptimization : public WeeklyOptimization
IResultWriter& writer);

~AdequacyPatchOptimization() override = default;
void solve(uint weekInTheYear, int hourInTheYear) override;
void solve() override;
private:
const Antares::Data::Study& study_;
};
Expand Down
4 changes: 2 additions & 2 deletions src/solver/optimisation/base_weekly_optimization.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace Antares::Solver::Optimization
class WeeklyOptimization
{
public:
virtual void solve(uint weekInTheYear, int hourInTheYear) = 0;
virtual void solve() = 0;
virtual ~WeeklyOptimization() = default;
static std::unique_ptr<WeeklyOptimization> create(const Antares::Data::Study& study,
const OptimizationOptions& options,
Expand All @@ -49,7 +49,7 @@ class WeeklyOptimization
protected:
explicit WeeklyOptimization(const OptimizationOptions& options,
PROBLEME_HEBDO* problemesHebdo,
Antares::Data::AdequacyPatch::AdqPatchParams&,
Antares::Data::AdequacyPatch::AdqPatchParams&,
uint numSpace,
IResultWriter& writer);
Antares::Solver::Optimization::OptimizationOptions options_;
Expand Down
2 changes: 1 addition & 1 deletion src/solver/optimisation/weekly_optimization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ DefaultWeeklyOptimization::DefaultWeeklyOptimization(const OptimizationOptions&
{
}

void DefaultWeeklyOptimization::solve(uint, int)
void DefaultWeeklyOptimization::solve()
{
OPT_OptimisationHebdomadaire(options_, problemeHebdo_, adqPatchParams_, writer_);
}
Expand Down
4 changes: 2 additions & 2 deletions src/solver/optimisation/weekly_optimization.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ class DefaultWeeklyOptimization : public WeeklyOptimization
public:
explicit DefaultWeeklyOptimization(const OptimizationOptions& options,
PROBLEME_HEBDO* problemeHebdo,
Antares::Data::AdequacyPatch::AdqPatchParams&,
Antares::Data::AdequacyPatch::AdqPatchParams&,
uint numSpace,
IResultWriter& writer);
~DefaultWeeklyOptimization() override = default;
void solve(uint, int) override;
void solve() override;
};
} // namespace Antares::Solver::Optimization
6 changes: 3 additions & 3 deletions src/solver/simulation/economy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ bool Economy::year(Progression::Task& progression,
pProblemesHebdo[numSpace].weekInTheYear = state.weekInTheYear = w;
pProblemesHebdo[numSpace].HeureDansLAnnee = hourInTheYear;

::SIM_RenseignementProblemeHebdo(study, pProblemesHebdo[numSpace], state.weekInTheYear,
::SIM_RenseignementProblemeHebdo(study, pProblemesHebdo[numSpace], state.weekInTheYear,
numSpace, hourInTheYear, hydroVentilationResults);

BuildThermalPartOfWeeklyProblem(study, pProblemesHebdo[numSpace],
BuildThermalPartOfWeeklyProblem(study, pProblemesHebdo[numSpace],
hourInTheYear, randomForYear.pThermalNoisesByArea, state.year);

// Reinit optimisation if needed
Expand All @@ -155,7 +155,7 @@ bool Economy::year(Progression::Task& progression,

try
{
weeklyOptProblems_[numSpace]->solve(w, hourInTheYear);
weeklyOptProblems_[numSpace]->solve();

// Runs all the post processes in the list of post-process commands
optRuntimeData opt_runtime_data(state.year, w, hourInTheYear);
Expand Down

0 comments on commit a630959

Please sign in to comment.