gadget-framework / gadget3

TMB-based gadget implemtation
GNU General Public License v2.0
8 stars 6 forks source link

error demo-ling #97

Closed vbartolino closed 1 year ago

vbartolino commented 1 year ago

Hi, I'm starting baby steps into gadget3. When I try source('demo-ling/setup.R', echo = TRUE)

it runs for 2-3 minutes before the following error:

> if (demo_ling_optimize_tmb) {
+     # Run model through R optimiser, using bounds set in tmb_param
+     fit.opt <- optim(ling_model_tmb$par,
+      .... [TRUNCATED] 
Error in optim(ling_model_tmb$par, ling_model_tmb$fn, ling_model_tmb$gr,  : 
  initial value in 'vmmin' is not finite
> 

Any suggestion? Thanks in advance \Valerio

lentinj commented 1 year ago

demo-ling is a very unloved child nowadays, we decided to bin it but I've not gotten around to it yet, apologies. What you probably want is the equivalent model in gadget-models:

https://github.com/gadget-framework/gadget-models/tree/master/06-ling/gadget3/00-setup

...unless @willbutler42 corrects me?

willbutler42 commented 1 year ago

Yes, this is the best example for now. When I get a chance I will strip this one down to a very basic set of setup scripts, but in the meantime please shoot through any questions regarding those scripts @vbartolino