From 825612555aa6d7638d3c7d7ee65add72d6239e92 Mon Sep 17 00:00:00 2001 From: Guillaume PIERRE Date: Tue, 10 Dec 2024 18:20:08 +0100 Subject: [PATCH] clang format --- .../optimisation/post_process_commands.cpp | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/solver/optimisation/post_process_commands.cpp b/src/solver/optimisation/post_process_commands.cpp index 69d11acefb..c768cac3e2 100644 --- a/src/solver/optimisation/post_process_commands.cpp +++ b/src/solver/optimisation/post_process_commands.cpp @@ -136,13 +136,15 @@ void UpdateMrgPriceAfterCSRcmd::execute(const optRuntimeData&) auto& hourlyResults = problemeHebdo_->ResultatsHoraires[Area]; const auto& scratchpad = area_list_[Area]->scratchpad[thread_number_]; const double unsuppliedEnergyCost = area_list_[Area]->thermal.unsuppliedEnergyCost; - const bool areaInside = problemeHebdo_->adequacyPatchRuntimeData->areaMode[Area] == physicalAreaInsideAdqPatch; + const bool areaInside = problemeHebdo_->adequacyPatchRuntimeData->areaMode[Area] + == physicalAreaInsideAdqPatch; for (uint hour = 0; hour < nbHoursInWeek; hour++) { const bool isHourTriggeredByCsr = problemeHebdo_->adequacyPatchRuntimeData ->wasCSRTriggeredAtAreaHour(Area, hour); - if (isHourTriggeredByCsr && hourlyResults.ValeursHorairesDeDefaillancePositive[hour] > 0.5 && areaInside) + if (isHourTriggeredByCsr + && hourlyResults.ValeursHorairesDeDefaillancePositive[hour] > 0.5 && areaInside) { hourlyResults.CoutsMarginauxHoraires[hour] = -unsuppliedEnergyCost; } @@ -172,19 +174,19 @@ void DTGnettingAfterCSRcmd::execute(const optRuntimeData&) for (uint hour = 0; hour < nbHoursInWeek; hour++) { - const bool isHourTriggeredByCsr - = problemeHebdo_->adequacyPatchRuntimeData->wasCSRTriggeredAtAreaHour(Area, hour); + const bool isHourTriggeredByCsr = problemeHebdo_->adequacyPatchRuntimeData + ->wasCSRTriggeredAtAreaHour(Area, hour); const double dtgMrg = scratchpad.dispatchableGenerationMargin[hour]; const double ens = hourlyResults.ValeursHorairesDeDefaillancePositive[hour]; - const bool areaInside = problemeHebdo_->adequacyPatchRuntimeData->areaMode[Area] - == physicalAreaInsideAdqPatch; - if (isHourTriggeredByCsr - && areaInside) + const bool areaInside = problemeHebdo_->adequacyPatchRuntimeData->areaMode[Area] + == physicalAreaInsideAdqPatch; + if (isHourTriggeredByCsr && areaInside) { hourlyResults.ValeursHorairesDtgMrgCsr[hour] = std::max(0.0, dtgMrg - ens); - hourlyResults.ValeursHorairesDeDefaillancePositiveCSR[hour] - = std::max(0.0, ens - dtgMrg); + hourlyResults.ValeursHorairesDeDefaillancePositiveCSR[hour] = std::max(0.0, + ens + - dtgMrg); } else {