gustavdelius / mizer

This is my old mizer fork that is not actively used any more but still has lots of material in its many branches.
http://gustavdelius.github.io/mizer/
0 stars 2 forks source link

modifying and installing mizer locally #60

Closed astaaudzi closed 6 years ago

astaaudzi commented 6 years ago

Hi, I know this is not an issue with the package, but I am trying to modify recruitment code in mizer package and install the modified package from my computer. Any suggestions on the best way to do it?

If I just source all R files, most functions are available, but project() will not work with the error message " Error in .Call("_mizer_inner_project_loop", PACKAGE = "mizer", no_sp, : "_mizer_inner_project_loop" not available for .Call() for package "mizer"

Thanks

astaaudzi commented 6 years ago

Ok, I just figured out that everything seems to work, when I load mizer and then source only the files I modify. Not sure why, but R uses modified files instead of the ones in mizer package

gustavdelius commented 6 years ago

Hi Asta,

thanks for getting in touch. I'd love to hear more about your modifications to the recruitment code.

Regarding running modifications of mizer, I usually follow the instructions at https://support.rstudio.com/hc/en-us/articles/200486488-Developing-Packages-with-RStudio and use the "Build and reload" button (which in my version of RStudio is called "Install and restart" instead) after I have made a modification to the code.

Gustav

astaaudzi commented 6 years ago

Hi Gustav,

Thanks for the suggestion, I will try to follow it and will let you know :)

Regarding the modification to the stock recruitment relationship, I would like to get rid of Rmax parameter for trait based or multi species models (because Rmax seems to have a large effect on model dynamics). Perhaps it was already tried, but I was wondering whether adding stochasticity to recruitment would do the trick of sustaining species co-existence. Basically all I want to do is the modify rdd calculation, where rdi is multiplied by a random number from some distribution (perhaps Poisson or normal, not sure which one would be more suitable). For a start I would "overload" the Rmax parameter to indicate mean or standard deviation of this random distribution, which could be species specific in multi-species model, and make sure recruitment does not become negative. Do you know if this was already tried? And if the model developers would like to implement it instead, it would definitely be much easier :) :)

Regards, Asta http://www.utas.edu.au/profiles/staff/imas/asta-audzijonyte

gustavdelius commented 6 years ago

Hi Asta,

you are quite right to want to get rid of the strong influence of Rmax on the dynamics. You are probably aware that this repository is our development version of mizer and here we are already running multi-species models without Rmax. This work is funded by the EU Minouw project and Richard Southwell is working full time on it. We still have to include an explanation our approach in the vignette though.

We also very much like the idea of introducing stochasticity into the recruitment. We think the best way to do this would be not via a random Rmax but via random plankton dynamics. We feel that there is indeed a lot of stochasticity in the amount of planktonic food that larvae find and that that has a big effect on recruitment (see issue #22) .

We'd be very happy to discuss and collaborate with you on modelling stochasticity in recruitment. Would you be interested in a video chat next week?

Gustav

astaaudzi commented 6 years ago

Hi Gustav,

Good to know that you are thinking about same issues. I would love to hear more about your approaches. In 2016 I have spent 10 months working on a user guide for a marine ecosystem model Atlantis (e.g. https://www.researchgate.net/profile/Asta_Audzijonyte/contributions), and had a chance to think about stock recruitment relationships quite a bit ☺

Also it was not clear to me how your repository relates to mizer available from CRAN. There was a mention that the model is now uploaded on CRAN, so I assumed that this is the main CRAN package, especially because the vignette is the same. Once I updated mizer from CRAN it indeed seems to run faster, so presumably the CRAN package now uses your faster integration method? But as I said, this was not at all clear to me.

I am in Hobart and probably around 9 hours ahead of you, but I could chat on Tuesday or Wednesday (at about 1pm your time)

Best regards, Asta

From: Gustav W Delius notifications@github.com Sent: Friday, 6 April 2018 6:49 PM To: gustavdelius/mizer mizer@noreply.github.com Cc: Asta Audzijonyte asta.audzijonyte@utas.edu.au; Author author@noreply.github.com Subject: Re: [gustavdelius/mizer] modifying and installing mizer locally (#60)

Hi Asta,

you are quite right to want to get rid of the strong influence of Rmax on the dynamics. You are probably aware that this repository is our development version of mizer and here we are already running multi-species models without Rmax. This work is funded by the EU Minouw project and Richard Southwell is working full time on it. We still have to include an explanation our approach in the vignette though.

We also very much like the idea of introducing stochasticity into the recruitment. We think the best way to do this would be not via a random Rmax but via random plankton dynamics. We feel that there is indeed a lot of stochasticity in the amount of planktonic food that larvae find and that that has a big effect on recruitment (see issue #22https://github.com/gustavdelius/mizer/issues/22) .

We'd be very happy to discuss and collaborate with you on modelling stochasticity in recruitment. Would you be interested in a video chat next week?

Gustav

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/gustavdelius/mizer/issues/60#issuecomment-379190077, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ae8W0FpyjxViDBESz-KrZ964IdYOONiuks5tlywZgaJpZM4THu9D.

University of Tasmania Electronic Communications Policy (December, 2014). This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.