Open stevencarlislewalker opened 6 months ago
This seems like a good idea. It's too bad that we're working within C++ instead of R here; in R we could more easily write functions that modify their environments to warn only once in a session (as discussed by you in a recent lab meeting I think?)
I'm trying to think of alternative ways to achieve this goal without writing our own warning system ...
This is a great point. Can we get any inspiration from glmmTMB
here?
A discussion at a macpan tech meeting about when to round variables that should be integers (e.g. state variables in some models with process error) led to the idea that we should have a warning system for the engine. The standard
Rf_warning
mechanism is annoying in TMB because it will get called at each of the (5?) steps of theMakeADFun
machinery and for each time step. Here is a design that addresses this issue and makes it straightforward to provide information about what time-step and expression was involved in the warning.