Skip to content

Commit

Permalink
Merge, fix conflicts in CI files
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Jan 6, 2025
2 parents 4a4e919 + 32dc2e3 commit 3fba2e4
Show file tree
Hide file tree
Showing 8 changed files with 381 additions and 93 deletions.
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 3.14) # FetchContent_MakeAvailable
# Version
set(ANTARES_VERSION_HI 8)
set(ANTARES_VERSION_LO 8)
set(ANTARES_VERSION_REVISION 11)
set(ANTARES_VERSION_REVISION 12)

# Beta release
set(ANTARES_BETA 0)
set(ANTARES_RC 0)
set(ANTARES_RC 3)

set(ANTARES_VERSION_YEAR 2024)

Expand Down
1 change: 1 addition & 0 deletions src/libs/antares/study/parameters/adq-patch-params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ void AdqPatchParams::addExcludedVariables(std::vector<std::string>& out) const
out.emplace_back("LOLP CSR");
out.emplace_back("MAX MRG CSR");
out.emplace_back("OV. COST CSR");
out.emplace_back("MRG. PRICE CSR");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ AdqPatchPostProcessList::AdqPatchPostProcessList(const AdqPatchParams& adqPatchP
problemeHebdo_, areas, sheddingPolicy, splxOptimization, thread_number));
post_process_list.push_back(std::make_unique<CurtailmentSharingPostProcessCmd>(
adqPatchParams, problemeHebdo_, areas, thread_number_));
post_process_list.push_back(std::make_unique<UpdateMrgPriceAfterCSRcmd>(problemeHebdo_,
areas,
thread_number));
post_process_list.push_back(std::make_unique<DTGnettingAfterCSRcmd>(
problemeHebdo_, areas, thread_number));
post_process_list.push_back(
std::make_unique<DTGnettingAfterCSRcmd>(problemeHebdo_, areas, thread_number));
post_process_list.push_back(
std::make_unique<UpdateMrgPriceAfterCSRcmd>(problemeHebdo_, areas, thread_number));
post_process_list.push_back(
std::make_unique<HydroLevelsUpdatePostProcessCmd>(problemeHebdo_, areas, true, false));
post_process_list.push_back(
Expand Down
22 changes: 18 additions & 4 deletions src/solver/optimisation/post_process_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,27 @@ 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);
const bool isHourTriggeredByCsr
= problemeHebdo_->adequacyPatchRuntimeData->wasCSRTriggeredAtAreaHour(Area, hour);

if (isHourTriggeredByCsr && hourlyResults.ValeursHorairesDeDefaillancePositive[hour] > 0.5 && areaInside)
// IF UNSP. ENR CSR == 0, MRG. PRICE CSR = MRG. PRICE
// ELSE, MRG. PRICE CSR = “Unsupplied Energy Cost”
if (hourlyResults.ValeursHorairesDeDefaillancePositiveCSR[hour] > 0.5 && areaInside)
{
hourlyResults.CoutsMarginauxHorairesCSR[hour] = -unsuppliedEnergyCost;
}
else
{
hourlyResults.CoutsMarginauxHorairesCSR[hour]
= hourlyResults.CoutsMarginauxHoraires[hour];
}

if (isHourTriggeredByCsr
&& hourlyResults.ValeursHorairesDeDefaillancePositive[hour] > 0.5 && areaInside)
{
hourlyResults.CoutsMarginauxHoraires[hour] = -unsuppliedEnergyCost;
}
Expand Down
2 changes: 2 additions & 0 deletions src/solver/simulation/sim_alloc_probleme_hebdo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ void SIM_AllocateAreas(PROBLEME_HEBDO& problem,
.assign(NombreDePasDeTemps, 0.);
problem.ResultatsHoraires[k].CoutsMarginauxHoraires
.assign(NombreDePasDeTemps, 0.);
problem.ResultatsHoraires[k].CoutsMarginauxHorairesCSR
.assign(NombreDePasDeTemps, 0.);
problem.ResultatsHoraires[k].niveauxHoraires
.assign(NombreDePasDeTemps, 0.);
problem.ResultatsHoraires[k].valeurH2oHoraire
Expand Down
1 change: 1 addition & 0 deletions src/solver/simulation/sim_structure_probleme_economique.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ struct RESULTATS_HORAIRES
std::vector<double> debordementsHoraires;

std::vector<double> CoutsMarginauxHoraires;
std::vector<double> CoutsMarginauxHorairesCSR;
std::vector<PRODUCTION_THERMIQUE_OPTIMALE> ProductionThermique; // index is pdtHebdo

std::vector<::ShortTermStorage::RESULTS> ShortTermStorage;
Expand Down
159 changes: 77 additions & 82 deletions src/solver/variable/economy/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "renewableGeneration.h"
#include "overallCost.h"
#include "overallCostCsr.h"
#include "priceCSR.h"
#include "operatingCost.h"
#include "nonProportionalCost.h"
#include "nbOfDispatchedUnits.h"
Expand Down Expand Up @@ -129,67 +130,61 @@ class Links;
/*!
** \brief All variables for a single area (economy)
*/
typedef // Prices
OverallCost // Overall Cost (Op. Cost + Unsupplied Eng.)
<OverallCostCsr // Overall Cost after CSR (adequacy patch Curtailment ShaRing)
<OperatingCost // Operating Cost
<Price // Marginal price
// Thermal pollutants
<ThermalAirPollutantEmissions // Overall pollutant emissions(from all thermal dispatchable
// clusters) Production by thermal cluster
<ProductionByDispatchablePlant // Energy generated by thermal dispatchable clusters
<ProductionByRenewablePlant // Energy generated by renewable clusters (must-run)
<Balance // Nodal Energy Balance
// Misc Gen.
<RowBalance // Misc Gen. Row balance
<PSP // PSP
<MiscGenMinusRowPSP // Misc Gen. - Row Balance - PSP
// Time series
<TimeSeriesValuesLoad // Load
<TimeSeriesValuesHydro // Hydro
<TimeSeriesValuesWind // Wind
<TimeSeriesValuesSolar // Solar
// Other
<DispatchableGeneration // All dispatchable generation
<RenewableGeneration // All renewable generation
<HydroStorage // Hydro Storage Generation
<Pumping // Pumping generation
<ReservoirLevel // Reservoir levels
<Inflows // Hydraulic inflows
<Overflows // Hydraulic overflows
<WaterValue // Water values
<HydroCost // Hydro costs
<ShortTermStorageByGroup
<STstorageInjectionByCluster
<STstorageWithdrawalByCluster
<STstorageLevelsByCluster
<STstorageCashFlowByCluster
<UnsupliedEnergy // Unsuplied Energy
<UnsupliedEnergyCSR // Unsupplied energy CSR
<DomesticUnsuppliedEnergy // Domestic Unsupplied Energy
<LMRViolations // LMR Violations
<SpilledEnergy // Spilled Energy
<LOLD // LOLD
<LOLD_CSR
<LOLP // LOLP
<LOLP_CSR
<AvailableDispatchGen
<DispatchableGenMargin
<DtgMarginCsr // DTG MRG CSR
<Marge
<MaxMrgCsr
<NonProportionalCost
<NonProportionalCostByDispatchablePlant // Startup cost +
// Fixed cost per
// thermal plant
// detail
<NbOfDispatchedUnits // Number of Units Dispatched
<NbOfDispatchedUnitsByPlant // Number of Units Dispatched
// by plant
<ProfitByPlant
// Links
<Variable::Economy::Links // All links
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
typedef // Prices
OverallCost // Overall Cost (Op. Cost + Unsupplied Eng.)
<OverallCostCsr // Overall Cost after CSR (adequacy patch Curtailment ShaRing)
<OperatingCost // Operating Cost
<Price // Marginal price
<PriceCSR // Thermal pollutants
<ThermalAirPollutantEmissions // Overall pollutant emissions(from all thermal dispatchable
// clusters) Production by thermal cluster
<ProductionByDispatchablePlant // Energy generated by thermal dispatchable clusters
<ProductionByRenewablePlant // Energy generated by renewable clusters (must-run)
<Balance // Nodal Energy Balance
// Misc Gen.
<RowBalance // Misc Gen. Row balance
<PSP // PSP
<MiscGenMinusRowPSP // Misc Gen. - Row Balance - PSP
// Time series
<TimeSeriesValuesLoad // Load
<TimeSeriesValuesHydro // Hydro
<TimeSeriesValuesWind // Wind
<TimeSeriesValuesSolar // Solar
// Other
<DispatchableGeneration // All dispatchable generation
<RenewableGeneration // All renewable generation
<HydroStorage // Hydro Storage Generation
<Pumping // Pumping generation
<ReservoirLevel // Reservoir levels
<Inflows // Hydraulic inflows
<Overflows // Hydraulic overflows
<WaterValue // Water values
<HydroCost // Hydro costs
<ShortTermStorageByGroup<
STstorageInjectionByCluster<STstorageWithdrawalByCluster<
STstorageLevelsByCluster<STstorageCashFlowByCluster<
UnsupliedEnergy // Unsuplied Energy
<UnsupliedEnergyCSR // Unsupplied energy CSR
<DomesticUnsuppliedEnergy // Domestic Unsupplied Energy
<LMRViolations // LMR Violations
<SpilledEnergy // Spilled Energy
<LOLD // LOLD
<LOLD_CSR<
LOLP // LOLP
<LOLP_CSR<AvailableDispatchGen<DispatchableGenMargin<
DtgMarginCsr // DTG MRG CSR
<Marge<MaxMrgCsr<NonProportionalCost<
NonProportionalCostByDispatchablePlant // Startup cost +
// Fixed cost per
// thermal plant
// detail
<NbOfDispatchedUnits // Number of Units Dispatched
<NbOfDispatchedUnitsByPlant // Number of Units
// Dispatched by plant
<ProfitByPlant
// Links
<Variable::Economy::Links // All links
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
VariablesPerArea;

/*!
Expand Down Expand Up @@ -253,35 +248,35 @@ typedef // Prices
LMRViolations,
Common::SpatialAggregate<
SpilledEnergy,
Common::SpatialAggregate<
LOLD,
Common::SpatialAggregate<
LOLD,
LOLP,
Common::SpatialAggregate<
LOLP,
AvailableDispatchGen,
Common::SpatialAggregate<
AvailableDispatchGen,
DispatchableGenMargin,
Common::SpatialAggregate<
DispatchableGenMargin,
DtgMarginCsr,
Common::SpatialAggregate<
DtgMarginCsr,
Marge,

// Detail Prices
Common::SpatialAggregate<
Marge,
NonProportionalCost, // MBO
// 13/05/2014
// -
// refs:
// #21

// Detail Prices
// Number Of Dispatched Units
Common::SpatialAggregate<
NonProportionalCost, // MBO
// 13/05/2014
// -
// refs:
// #21

// Number Of Dispatched Units
Common::SpatialAggregate<
NbOfDispatchedUnits // MBO
// 25/02/2016
// -
// refs:
// #55
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
NbOfDispatchedUnits // MBO
// 25/02/2016
// -
// refs:
// #55
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
VariablesPerSetOfAreas;

typedef BindingConstMarginCost< // Marginal cost for a binding constraint
Expand Down
Loading

0 comments on commit 3fba2e4

Please sign in to comment.