Skip to content

Commit

Permalink
Remove checkAdqPatchDisabledLocalMatching
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes authored and payetvin committed Mar 20, 2024
1 parent b53e042 commit 60b18b6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
9 changes: 1 addition & 8 deletions src/libs/antares/study/parameters/adq-patch-params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,4 @@ void AdqPatchParams::checkAdqPatchIncludeHurdleCost(const bool includeHurdleCost
if (curtailmentSharing.includeHurdleCost && !includeHurdleCostParameters)
throw Error::IncompatibleHurdleCostCSR();
}

void AdqPatchParams::checkAdqPatchDisabledLocalMatching() const
{
if (!localMatching.enabled && curtailmentSharing.priceTakingOrder == AdqPatchPTO::isDens)
throw Error::AdqPatchDisabledLMR();
}

} // Antares::Data::AdequacyPatch
} // namespace Antares::Data::AdequacyPatch
1 change: 0 additions & 1 deletion src/libs/antares/study/parameters/adq-patch-params.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ struct AdqPatchParams
void checkAdqPatchStudyModeEconomyOnly(const StudyMode studyMode) const;
void checkAdqPatchContainsAdqPatchArea(const Antares::Data::AreaList& areas) const;
void checkAdqPatchIncludeHurdleCost(const bool includeHurdleCost) const;
void checkAdqPatchDisabledLocalMatching() const;
};

} // namespace Antares::Data::AdequacyPatch
7 changes: 0 additions & 7 deletions src/tests/src/solver/optimisation/adequacy_patch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,3 @@ BOOST_AUTO_TEST_CASE(check_adq_param_wrong_hurdle_cost)
auto p = createParams();
BOOST_CHECK_THROW(p.checkAdqPatchIncludeHurdleCost(false), Error::IncompatibleHurdleCostCSR);
}

BOOST_AUTO_TEST_CASE(check_adq_param_wrong_lmr_disabled)
{
auto p = createParams();
p.localMatching.enabled = false;
BOOST_CHECK_THROW(p.checkAdqPatchDisabledLocalMatching(), Error::AdqPatchDisabledLMR);
}

0 comments on commit 60b18b6

Please sign in to comment.