NOAA-FIMS / FIMS

The repository for development of FIMS
https://noaa-fims.github.io/FIMS/
GNU General Public License v3.0
16 stars 9 forks source link

Add reporting functionality to dummy TMB #295

Closed ChristineStawitz-NOAA closed 1 year ago

ChristineStawitz-NOAA commented 1 year ago

We decided to add some REPORT_F statements to FIMS with a dummy objective function so @EJDick-NOAA and @KyleShertzer-NOAA can start getting R output from TMB and designing its structure

ChristineStawitz-NOAA commented 1 year ago
ChristineStawitz-NOAA commented 1 year ago

We added enough to report out:

Still need: ?

Andrea-Havron-NOAA commented 1 year ago

We will eventually want to adreport fleet q and Fmort. Currently, fleet.hpp does not have an evaluate function and there is some discussion about whether or not one is needed. How we adreport out these quantities will depend on how we end up writing the evaluate function in model.hpp.

Andrea-Havron-NOAA commented 1 year ago

Also, there was discussion about changing the _F on the three functions to _FUN to clarify the 'F' stands for function and not fishing mortality.

Andrea-Havron-NOAA commented 1 year ago

Currently an issue with data types for values being reported out. Need to update Population member data types using DataVector and ParameterVector in ModelTraits instead of std::vector

msupernaw commented 1 year ago

I was able to resolve this for REPORT, but there is still an issue with AD_REPORT.

Andrea-Havron-NOAA commented 1 year ago

I was able to resolve this for REPORT, but there is still an issue with AD_REPORT.

Thanks for working on this Matthew! I was able to get REPORT and ADREPORT working in my demo (see here and here). Can we do something similar for FIMS?

msupernaw commented 1 year ago

I don’t see why not, however ADREPORT_F doesn’t seem happy with vectors.Sent from my iPhoneOn Feb 20, 2023, at 4:34 PM, Andrea-Havron-NOAA @.***> wrote:

I was able to resolve this for REPORT, but there is still an issue with AD_REPORT.

Thanks for working on this Matthew! I was able to get REPORT and ADREPORT working in my demo (see here and here). Can we do something similar for FIMS?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Andrea-Havron-NOAA commented 1 year ago

I just pushed up a modified branch for feat-estimation that does not require modifying ModelTraits. It only requires casting to the EigenVector before calling REPORT_F and ADREPORT_F.

We shouldn't need to define each nested AD type in ModelTraits. Since we are working within a TMB_MODEL #ifdef statement, we get the nested data types and structures for free and don't need to define ourselves.

msupernaw commented 1 year ago

Great! I didn't know EigenVector had a constructor to take a std::vector as an argument! Good find!

On Tue, Feb 21, 2023 at 4:04 AM Andrea-Havron-NOAA @.***> wrote:

I just pushed up a modified branch for feat-estimation that does not require modifying ModelTraits https://github.com/NOAA-FIMS/FIMS/blob/bd75f767447cfb9bff5ad5ed90ae3aa37fe23783/inst/include/interface/interface.hpp#L44. It only requires casting to the EigenVector https://github.com/NOAA-FIMS/FIMS/blob/bd75f767447cfb9bff5ad5ed90ae3aa37fe23783/inst/include/population_dynamics/population/population.hpp#L552 before calling REPORT_F and ADREPORT_F.

We shouldn't need to define each nested AD type in ModelTraits https://github.com/NOAA-FIMS/FIMS/blob/cc1ada5f45716f621d0743bfc932eb09c1b352dc/inst/include/interface/interface.hpp#L72. Since we are working within a TMB_MODEL #ifdef statement, we get the nested data types and structures for free and don't need to define ourselves.

— Reply to this email directly, view it on GitHub https://github.com/NOAA-FIMS/FIMS/issues/295#issuecomment-1438104496, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFUSEFILJCPM7M72XNHXDTWYSAKPANCNFSM6AAAAAAUH253JU . You are receiving this because you commented.Message ID: @.***>

-- Matthew Supernaw Scientific Software Developer National Oceanic and Atmospheric Administration Office Of Science and Technology NOAA Fisheries | U.S. Department of Commerce Phone 248 - 396 - 7797