Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliette-Gerbaux committed Nov 12, 2024
1 parent 3336eaf commit c2885a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/solver/variable/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <cmath>

#include <antares/logs/logs.h>
#include <antares/study/study.h>

namespace Antares::Solver::Variable
Expand Down Expand Up @@ -381,6 +382,7 @@ void State::yearEndBuildThermalClusterCalculateStartupCosts(
uint endHourForCurrentYear = startHourForCurrentYear
+ study.runtime.rangeLimits.hour[Data::rangeCount];

Antares::logs.notice() << "Max duration on : " << maxDurationON;
for (uint hour = startHourForCurrentYear; hour < endHourForCurrentYear; ++hour)
{
double thermalClusterStartupCostForYear = 0;
Expand All @@ -390,6 +392,8 @@ void State::yearEndBuildThermalClusterCalculateStartupCosts(
// the optimal number.
uint optimalCount = (maxDurationON == 0) ? ON_min[hour] : ON_opt[hour];

Antares::logs.notice() << "Optimal count for hour " << hour << " : " << optimalCount;

// NODU cannot be > unit count
if (optimalCount > currentCluster->unitCount)
{
Expand All @@ -404,6 +408,8 @@ void State::yearEndBuildThermalClusterCalculateStartupCosts(
int delta = (maxDurationON == 0) ? ON_min[hour] - ON_min[hour - 1]
: ON_opt[hour] - ON_opt[hour - 1];

Antares::logs.notice() << "M+ for hour " << hour << " : " << delta;

(delta > 0) ? (thermalClusterStartupCostForYear = currentCluster->startupCost * delta)
: (thermalClusterStartupCostForYear = 0.);
}
Expand Down

0 comments on commit c2885a3

Please sign in to comment.