-
Notifications
You must be signed in to change notification settings - Fork 10
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
MSE tutorial - getCtrl function issue #14
Comments
That tutorial is in need of an update, I am afraid. I will contact the people that wrote it and ask them to take a look, but that might take a little while. |
Hello,
I got the code to run. It is working fine now with one small issue towards the end of the tutorial.
The issue comes with the different syntaxes of fwd and fwdControl in Flash and Flasher.
I can send the updated code (as it works on my R version) if that helps? It is just a couple of very small things…
Pia
<((((°> ~ <°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°>
Pia Schuchert (PhD)
Marine Fisheries
AFBI Aquatics
18a Newforge Lane
Belfast
BT9 5PX
Tel. 028 902 55500
<°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°>
https://www.afbini.gov.uk/area-of-expertise/fisheries-and-aquatic-ecosystems
From: Iago Mosqueira [mailto:[email protected]]
Sent: 25 July 2019 09:40
To: flr/doc <[email protected]>
Cc: Schuchert, Pia <[email protected]>; Author <[email protected]>
Subject: Re: [flr/doc] MSE tutorial - getCtrl function issue (#14)
That tutorial is in need of an update, I am afraid. I will contact the people that wrote it and ask them to take a look, but that might take a little while.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#14?email_source=notifications&email_token=AF2B4GEAFOEQSKPI6V3SANDQBFRF7A5CNFSM4IFW73NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2YZF5Y#issuecomment-514953975>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AF2B4GCAYIHMZFILUTRFFXTQBFRF7ANCNFSM4IFW73NA>.
If you are not the intended recipient of this email (and any attachment), please inform the sender by return email and destroy all copies. Unauthorised access, use, disclosure, storage or copying is not permitted.
Any email including its content may be monitored by AFBI. For more information on our Privacy Notice, please see the following link: AFBI Privacy Notice.
Communication by internet email is not secure as messages may be intercepted and read by someone else. AFBI cannot guarantee that this message or any attachment is virus free or has not been intercepted and amended. You should perform your own virus checks
|
Thanks for this. Yes, please do send it, or create a pull request. Were you using FLasher? |
I did use a mixture… now I just use Flash, and I got it to work…
So I guess that is what was there initially.
Will try to do the pull/push on Monday, as I am not sure about the possibilities in our institute with firewall etc…
Pia
<((((°> ~ <°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°>
Pia Schuchert (PhD)
Marine Fisheries
AFBI Aquatics
18a Newforge Lane
Belfast
BT9 5PX
Tel. 028 902 55500
<°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°> ~ <°))))>< ~ ><((((°>
https://www.afbini.gov.uk/area-of-expertise/fisheries-and-aquatic-ecosystems
From: Iago Mosqueira [mailto:[email protected]]
Sent: 26 July 2019 10:15
To: flr/doc <[email protected]>
Cc: Schuchert, Pia <[email protected]>; Author <[email protected]>
Subject: Re: [flr/doc] MSE tutorial - getCtrl function issue (#14)
Thanks for this.
Yes, please do send it, or create a pull request. Were you using FLasher?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#14?email_source=notifications&email_token=AF2B4GHE4G3A7LVOUVF57RDQBK57NA5CNFSM4IFW73NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2375AA#issuecomment-515374720>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AF2B4GBJ5335EETMEHOZSXTQBK57NANCNFSM4IFW73NA>.
If you are not the intended recipient of this email (and any attachment), please inform the sender by return email and destroy all copies. Unauthorised access, use, disclosure, storage or copying is not permitted.
Any email including its content may be monitored by AFBI. For more information on our Privacy Notice, please see the following link: AFBI Privacy Notice.
Communication by internet email is not secure as messages may be intercepted and read by someone else. AFBI cannot guarantee that this message or any attachment is virus free or has not been intercepted and amended. You should perform your own virus checks
|
It was written for FLash. OK, do try otherwise send me the code and I will change it. |
Hi Pia and Iago, |
Hi,
This issue was assigned to me but I'm a bit overwhelmed these days. Can you
send me a working example ? I'll do my best to come back to you as soon as
possible.
Best
EJ
…On Fri, 15 Oct 2021, 17:25 Marcurius419, ***@***.***> wrote:
Hi Pia and Iago,
I'm working with this tutorial now (as a MsC student), and I'm getting an
error at the last for loop of the code: "negative length vectors are not
allowed". Is this also because the tutorial needs updating or did I do
something wrong (I get it when I exactly copy everything so I don't think
that I did something wrong).
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#14 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC7BP3UQ54BDAIGSZQOPADUHBBV5ANCNFSM4IFW73NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi EJ, I put 'my code' (which is just the MSE tutorial basically copy-pasted) in a zip file (github didn't allow me to upload an R-file). The error occurs in the final for loop on line 190 (I made a comment there as well). The error I get is:
I tried to solve it myself with the debug and traceback function, but didn't know how to fix it. Thanks again and hopefully you can help |
Hi EJ, I have an update about the MSE error that may make it easier for you to understand what's the issue. My supervisor thinks, however, that this is partly written in C++, so maybe that helps. This might also be useful information, the R and package version I'm running:
Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
Hi,
That's part of the FLXSA package. Please check with Iago who's
maintaining it .
Best
EJ
…On 26/10/2021 18:17, MRobert999 wrote:
Hi EJ,
I have an update about the MSE error that may make it easier for you
to understand what's the issue.
It occurs in the for loop specifically when the line
|out.assess <- xsa(stk.mp, idx.mp)|
is run.
This calls the function xsa which in turn calls the function
|FLXSA(stk, idx, control)|
We looked up the code for the FLXSA function which we found here:
https://github.com/flr/FLXSA/blob/master/R/flxsa.R
And we think that the issue is on line 278 at
|res<-.Call("runFLXSA", iter(stock, 1), lapply(indices, iter, 1),
control, FALSE)|
My supervisor thinks, however, that this is partly written in C++, so
maybe that helps.
This might also be useful information, the R and package version I'm
running:
sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Dutch_Netherlands.1252 LC_CTYPE=Dutch_Netherlands.1252
[3] LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C
[5] LC_TIME=Dutch_Netherlands.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] FLBRP_2.5.8 ggplotFL_2.6.10 ggplot2_3.3.5 FLXSA_2.6.5
[5] FLAssess_2.6.3 FLash_2.5.11 FLa4a_1.8.2 FLCore_2.6.17
[9] iterators_1.0.13 lattice_0.20-44
loaded via a namespace (and not attached):
[1] pcaPP_1.9-74 RColorBrewer_1.1-2 pillar_1.6.2 compiler_4.1.1
[5] tools_4.1.1 pspline_1.0-18 lifecycle_1.0.0 tibble_3.1.4
[9] gtable_0.3.0 nlme_3.1-152 mgcv_1.8-37 png_0.1-7
[13] pkgconfig_2.0.3 rlang_0.4.11 Matrix_1.3-4 DBI_1.1.1
[17] mvtnorm_1.1-2 gridExtra_2.3 coda_0.19-4 copula_1.0-1
[21] withr_2.4.2 dplyr_1.0.7 generics_0.1.0 vctrs_0.3.8
[25] cowplot_1.1.1 stats4_4.1.1 grid_4.1.1 tidyselect_1.1.1
[29] ADGofTest_0.3 data.table_1.14.2 glue_1.4.2 triangle_0.12
[33] R6_2.5.1 jpeg_0.1-9 fansi_0.5.0 latticeExtra_0.6-29
[37] purrr_0.3.4 magrittr_2.0.1 scales_1.1.1 ellipsis_0.3.2
[41] MASS_7.3-54 splines_4.1.1 stabledist_0.7-1 assertthat_0.2.1
[45] colorspace_2.0-2 numDeriv_2016.8-1.1 utf8_1.2.2 gsl_2.1-6
[49] munsell_0.5.0 crayon_1.4.1
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#14 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC7BP3HZWAWACUT37Q7ICLUI3PD3ANCNFSM4IFW73NA>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Could you please contact me directly? iago AT mosqueira DOT eu |
Hello,
I try to run the MSE tutorial and found a few small issues. However, one I cannot overcome is the issue with the getCtrl function. There is an error message with the last line in particular, where it says ctrl@trgtArray<-arr0. It seems there is no option in the fwdControl object to add a target array. I used the basic fwdControl function to create an object to get on with the tutorial, however, I believe I need to get something like this target array to proceed with the tutorial in full.
Thanks,
Pia
getCtrl <- function(values, quantity, years, it){
dnms <- list(iter=1:it, year=years, c("min", "val", "max"))
arr0 <- array(NA, dimnames=dnms, dim=unlist(lapply(dnms, length)))
arr0[,,"val"] <- unlist(values)
arr0 <- aperm(arr0, c(2,3,1))
ctrl <- fwdControl(data.frame(year=years, quantity=quantity, val=NA))
ctrl@trgtArray <- arr0
ctrl
}
M
The text was updated successfully, but these errors were encountered: