Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process options in ... argument of dynr.model #229

Open
mhunter1 opened this issue Aug 8, 2019 · 2 comments
Open

Process options in ... argument of dynr.model #229

mhunter1 opened this issue Aug 8, 2019 · 2 comments
Labels
bug Something isn't working major

Comments

@mhunter1
Copy link
Owner

mhunter1 commented Aug 8, 2019

Original report by Michael Hunter (Bitbucket: mhunter, GitHub: mhunter).


The man page says we do this but we apparently don’t. Verify by trying to add `options` named list to demo/LineasSDE.R

model <- dynr.model(dynamics=dynamics, measurement=meas, noise=ecov, initial=initial, data=data, outfile="LinearSDE.c", options=list(ftol_rel=1e-6))
@mhunter1 mhunter1 added major bug Something isn't working labels Jan 7, 2020
@mhunter1 mhunter1 added this to the Coding Session 2 milestone Jan 14, 2020
@chriscmr
Copy link

Please did you manage to solve this issue?

@mhunter1
Copy link
Owner Author

Unfortunately, no this issue remains open. The options argument in dynr.model is still ignored. However, you can set options directly with the @ setters for S4 objects, and see them with the $ getters for S4 objects. For example

# Specify your model
# ...
# Create model
model <- dynr.model(dynamics=dynamics, measurement=meas, noise=ecov, initial=initial, data=data)

# See current options
model$options
#$xtol_rel
#[1] 1e-07
#
#$stopval
#[1] -9999
#
#$ftol_rel
#[1] 1e-10
#
#$ftol_abs
#[1] -1
#
#$maxeval
#[1] 500
#
#$maxtime
#[1] -1
#

# Set things
opt <- model$options
opt$maxeval <- 1000
model@options <- opt # now model has maxeval option set to 1000 instead of 500

I hope that helps for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

2 participants