From aba7fabe3d9bd8800f44a8fa1c764d0dd21f8df5 Mon Sep 17 00:00:00 2001 From: Guillaume PIERRE Date: Fri, 21 Jul 2023 15:26:26 +0200 Subject: [PATCH] End-to-end BC tests : ensure retrieving correctly cluster production results --- .../binding_constraints/test_binding_constraints.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/end-to-end/binding_constraints/test_binding_constraints.cpp b/src/tests/end-to-end/binding_constraints/test_binding_constraints.cpp index f41a12e455..b8a07695ec 100644 --- a/src/tests/end-to-end/binding_constraints/test_binding_constraints.cpp +++ b/src/tests/end-to-end/binding_constraints/test_binding_constraints.cpp @@ -60,6 +60,7 @@ std::shared_ptr addClusterToArea(Area* area, const std::string& BOOST_CHECK(added != nullptr); area->thermal.list.mapping[cluster->id()] = added; + area->thermal.prepareAreaWideIndexes(); return cluster; } @@ -146,7 +147,7 @@ retrieveThermalClusterGenerationResults(const std::shared_ptr>& simulation, ThermalCluster* cluster, unsigned int hour) { auto result = retrieveThermalClusterGenerationResults(simulation, cluster); - return (*result)[cluster->index].avgdata.hourly[hour]; + return (*result)[cluster->areaWideIndex].avgdata.hourly[hour]; }