diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 217a8adc75..ee335104af 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -25,8 +25,8 @@ on: env: GITHUB_TOKEN: ${{ github.token }} IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} - RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests == 'true' }} - RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests == 'true' }} + RUN_SIMPLE_TESTS: false + RUN_EXTENDED_TESTS: false REF: ${{ inputs.target_branch =='' && github.ref || inputs.target_branch}} VCPKG_ROOT: ${{ github.workspace }}/vcpkg vcpkgPackages: yaml-cpp antlr4 diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 5cf34f7b00..dfe0b5c3ed 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -25,8 +25,8 @@ on: env: GITHUB_TOKEN: ${{ github.token }} IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} - RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests == 'true' }} - RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests == 'true' }} + RUN_SIMPLE_TESTS: false + RUN_EXTENDED_TESTS: false REF: ${{ inputs.target_branch =='' && github.ref || inputs.target_branch}} diff --git a/src/solver/optimisation/post_process_commands.cpp b/src/solver/optimisation/post_process_commands.cpp index 1caef95462..397015b46f 100644 --- a/src/solver/optimisation/post_process_commands.cpp +++ b/src/solver/optimisation/post_process_commands.cpp @@ -131,19 +131,16 @@ void UpdateMrgPriceAfterCSRcmd::execute(const optRuntimeData&) { for (uint32_t Area = 0; Area < problemeHebdo_->NombreDePays; Area++) { - if (problemeHebdo_->adequacyPatchRuntimeData->areaMode[Area] != physicalAreaInsideAdqPatch) - continue; - 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; for (uint hour = 0; hour < nbHoursInWeek; hour++) { const bool isHourTriggeredByCsr = problemeHebdo_->adequacyPatchRuntimeData ->wasCSRTriggeredAtAreaHour(Area, hour); - if (isHourTriggeredByCsr && hourlyResults.ValeursHorairesDeDefaillancePositive[hour] > 0.5) + if (isHourTriggeredByCsr && hourlyResults.ValeursHorairesDeDefaillancePositive[hour] > 0.5 && areaInside) { hourlyResults.CoutsMarginauxHoraires[hour] = -unsuppliedEnergyCost; } @@ -168,29 +165,31 @@ void DTGnettingAfterCSRcmd::execute(const optRuntimeData&) { for (uint32_t Area = 0; Area < problemeHebdo_->NombreDePays; Area++) { - if (problemeHebdo_->adequacyPatchRuntimeData->areaMode[Area] != physicalAreaInsideAdqPatch) - continue; - auto& hourlyResults = problemeHebdo_->ResultatsHoraires[Area]; const auto& scratchpad = area_list_[Area]->scratchpad[thread_number_]; const double unsuppliedEnergyCost = area_list_[Area]->thermal.unsuppliedEnergyCost; 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]; - - // Default value (when the hour is not triggered by CSR) - hourlyResults.ValeursHorairesDtgMrgCsr[hour] = dtgMrg; - hourlyResults.ValeursHorairesDeDefaillancePositiveCSR[hour] = ens; - - if (isHourTriggeredByCsr) + 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 + { + // Default value (when the hour is not triggered by CSR) + hourlyResults.ValeursHorairesDtgMrgCsr[hour] = dtgMrg; + hourlyResults.ValeursHorairesDeDefaillancePositiveCSR[hour] = ens; } } }