From 8a227d6599180535f38d865b4786cb8af1585d6d Mon Sep 17 00:00:00 2001 From: Lindon Roberts Date: Tue, 5 Mar 2019 17:45:51 +0000 Subject: [PATCH] Bug fix when shifting model base point, upgrade to v1.0.1 --- dfogn/dfogn.py | 5 +++-- dfogn/tests/test_dfogn.py | 2 +- dfogn/version.py | 2 +- docs/build/html/.buildinfo | 2 +- docs/build/html/_sources/history.rst.txt | 4 ++++ docs/build/html/genindex.html | 8 ++++---- docs/build/html/history.html | 15 +++++++++++---- docs/build/html/index.html | 13 +++++++------ docs/build/html/info.html | 8 ++++---- docs/build/html/install.html | 8 ++++---- docs/build/html/objects.inv | Bin 337 -> 339 bytes docs/build/html/search.html | 8 ++++---- docs/build/html/searchindex.js | 2 +- docs/build/html/userguide.html | 8 ++++---- docs/history.rst | 4 ++++ manual.pdf | Bin 265683 -> 265846 bytes setup.py | 2 +- 17 files changed, 54 insertions(+), 37 deletions(-) diff --git a/dfogn/dfogn.py b/dfogn/dfogn.py index f1db7a8..3d946a1 100644 --- a/dfogn/dfogn.py +++ b/dfogn/dfogn.py @@ -723,8 +723,9 @@ def dfogn_main(objfun, x0, xl, xu, rhobeg, rhoend, maxfun): # Severe cancellation is likely to occur if XOPT is too far from XBASE. [Fortran label 90] if dsq <= rounding_error_const * sumsq(model.xopt()): - model.shift_base(model.xopt()) # includes a re-factorisation of the interpolation matrix - xnew = xnew - model.xopt() + base_shift = model.xopt() + xnew = xnew - base_shift # before xopt is updated + model.shift_base(base_shift) # includes a re-factorisation of the interpolation matrix # Set KNEW to the index of the next interpolation point to be deleted to make room for a trust # region step. Again RESCUE may be called if rounding errors have damaged diff --git a/dfogn/tests/test_dfogn.py b/dfogn/tests/test_dfogn.py index e472637..4efec92 100644 --- a/dfogn/tests/test_dfogn.py +++ b/dfogn/tests/test_dfogn.py @@ -49,7 +49,7 @@ def runTest(self): soln = dfogn.solve(rosenbrock, x0) self.assertTrue(array_compare(soln.x, np.array([1.0, 1.0]), thresh=1e-4), "Wrong xmin") self.assertTrue(array_compare(soln.resid, rosenbrock(soln.x), thresh=1e-10), "Wrong resid") - self.assertTrue(array_compare(soln.jacobian, rosenbrock_jacobian(soln.x), thresh=1e-2), "Wrong Jacobian") + self.assertTrue(array_compare(soln.jacobian, rosenbrock_jacobian(soln.x), thresh=2e-2), "Wrong Jacobian") self.assertTrue(abs(soln.f) < 1e-10, "Wrong fmin") diff --git a/dfogn/version.py b/dfogn/version.py index 5fa3e76..e1f6b5a 100644 --- a/dfogn/version.py +++ b/dfogn/version.py @@ -24,4 +24,4 @@ """ -__version__ = '1.0' +__version__ = '1.0.1' diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index 4d9093c..73a9a7c 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 323aea43a5449895fd1471c6a55fc908 +config: d2939da9da2b6169649cc2ef47c7f549 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/html/_sources/history.rst.txt b/docs/build/html/_sources/history.rst.txt index 704f647..2219565 100644 --- a/docs/build/html/_sources/history.rst.txt +++ b/docs/build/html/_sources/history.rst.txt @@ -14,3 +14,7 @@ Version 1.0 (17 Jul 2018) ------------------------- * Bug fix for installation when dependencies not installed, added requirements.txt - no changes to the DFO-GN algorithm. +Version 1.0.1 (5 Mar 2019) +-------------------------- +* Bug fix when changing base point in model. + diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index f6af606..6c22400 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -9,7 +9,7 @@ - Index — DFO-GN v1.0 documentation + Index — DFO-GN v1.0.1 documentation @@ -36,7 +36,7 @@ - + @@ -65,7 +65,7 @@
- 1.0 + 1.0.1
@@ -198,7 +198,7 @@

Index

@@ -64,7 +64,7 @@
- 1.0 + 1.0.1
@@ -201,7 +201,7 @@