From 6e83757945245f80e83580a8cc5dbe0b1032c23d Mon Sep 17 00:00:00 2001 From: adrienmellot Date: Tue, 12 Mar 2024 12:14:32 +0100 Subject: [PATCH 1/2] Rename solver options from xtol to xatol Fixes #266 --- scripts/hydro/inflow_mwh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/hydro/inflow_mwh.py b/scripts/hydro/inflow_mwh.py index 0c04f94d..9f7d19a8 100644 --- a/scripts/hydro/inflow_mwh.py +++ b/scripts/hydro/inflow_mwh.py @@ -86,7 +86,7 @@ def residual(scaling_factor): return abs(generation(scaling_factor).sum() - annual_generation) x0 = annual_generation / inflow_m3.sum() - res = minimize(residual, x0, method='nelder-mead', options={'xtol': 1e-10}) + res = minimize(residual, x0, method='nelder-mead', options={'xatol': 1e-10}) assert res.success, print(res) assert res.fun < 1, print(res) # error smaller than 1 MWh From 0f06cb3e7f43eaa54ae15bf81a64c2c311d71476 Mon Sep 17 00:00:00 2001 From: adrienmellot Date: Tue, 12 Mar 2024 12:18:12 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f507f28b..3fb99dd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,10 @@ * **FIX** links in the documention to always point to the most recent version of the pre-builts (#218). +### Fixed (workflow) + +* **FIX** fixed optimisation tolerance of hydro power plants from xtol to xatol (#266). + ## 1.1.0 (2021-12-22) This version is a minor update to v1.0. It comes with updated input data, updated dependencies, several convenience features, several optional overrides, and with massively extended documentation. You should not expect model results to deviate much from v1.0.