admb-project / admb

AD Model Builder
http://admb-project.org
Other
64 stars 19 forks source link

Add bound checks #222

Closed Cole-Monnahan-NOAA closed 2 years ago

Cole-Monnahan-NOAA commented 2 years ago

Add new feature that checks for estimated parameters on or near their bounds after doing the SD calculations, and prints results to console and the log file. The main issue with how I've implemented this is that it requires the admodel.hes file to be written. This is b/c the bounded and unbounded parameter vectors are stored in that file and are used for testing. If we could find a reliable way to get these two vectors at the MLE after optimization then we could bypass this and run it after optimization and before the SD calcs. The problem is that often the Hessian fails when there are parameters on bounds, and so this check will fail to run and alert the user that this may be why the Hessian is non-invertible.

But I think it's ready to push out and see what people think. Currently there is no way to disable it (it just prints anyways).

This PR currently contains commits from the other PR. Should be clearer what it does when that one is pulled in.

Cole-Monnahan-NOAA commented 2 years ago

I'm deleting this PR because these commits are now wrapped up in the master branch so will be incorporated with PR https://github.com/admb-project/admb/pull/220