DistanceDevelopment / dsims

New simulation R library
1 stars 2 forks source link

`dsims` doesn't trap some types of failures #70

Closed erex closed 9 months ago

erex commented 1 year ago

Reported by a user on 20Sep22 that dsims fails with following message

optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower, :
Infeasible point, no further tests

I presume it is mrds, called by ds that calls optimx.check().

I'm not sure if DS.analysis.R handles this situation properly, because I'm not sure the event would be classified as either an error or a warning.

Might be indicative of additional problems arising in mrds because optimx.check gets to this part of the code only if the parameter estimates have landed outside the bounds for that parameter. Not sure how that comes to pass.

LHMarshall commented 1 year ago

Re-run this simulation and got the following errors (note have not reproduced original error in 1500 reps):

Summary of warnings and errors:
simpleWarning in optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower, : Parameters or bounds appear to have different scalings.
  This can cause poor performance in optimization. 
  It is important for derivative free methods like BOBYQA, UOBYQA, NEWUOA.
 (Model number: 2) (occurred 2 time(s) in repetition(s):  76, 401)
simpleWarning in ddf.ds(model = dsmodel, data, meta.data = meta.data, control = control, : First partial hessian is singular; using second-partial hessian

 (Model number: 2) (occurred 1 time(s) in repetition(s):  127)
-----

Next run produced:

> simulacion.paralela.3km <- run.simulation(simulacion.paralela.3km)
Summary of warnings and errors:
simpleWarning in optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower, : Parameters or bounds appear to have different scalings.
  This can cause poor performance in optimization. 
  It is important for derivative free methods like BOBYQA, UOBYQA, NEWUOA.
 (Model number: 2) (occurred 2 time(s) in repetition(s):  655, 686)
simpleWarning in ddf.ds(model = dsmodel, data, meta.data = meta.data, control = control, : First partial hessian is singular; using second-partial hessian

 (Model number: 2) (occurred 1 time(s) in repetition(s):  767)
-----
LHMarshall commented 1 year ago

I will move this to the list of things for the next release rather than close completely but for now I cannot replicate it.

LHMarshall commented 9 months ago

Still cannot replicate so closing