Skip to content

Commit

Permalink
Merge pull request #280 from adrienmellot/feature-optimisation-tolerance
Browse files Browse the repository at this point in the history
fix optimisation tolerance of hydro power plants
  • Loading branch information
timtroendle authored Mar 15, 2024
2 parents 1685e78 + 0f06cb3 commit 1fdd222
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/hydro/inflow_mwh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1fdd222

Please sign in to comment.