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

Does spotpy's Dream not exactly Vrugt, J. A. (2016) proposed Dream? #285

Merged
merged 2 commits into from
Jun 21, 2022

Conversation

BeingHapppy
Copy link
Contributor

Hi, @thouska

I have tried to fix the missing function of dream. This is my first pull request. I am not sure I am on the right way. My classmate thinks my work is unnecessary, because he is used to using spotpy dream to complete his experiments, so he thinks my work may trouble him, but I don't know how to write code that can take care of his idea. What do you think?

The main change is: using a random number of chain pairs to generate the jump of the dream, which in spotpy now is only one pair.

parameter delta is the biggest number of chain pairs to generate the jump,
parameter c is for creating lambda,
parameter nchain_pairs is number of chain pairs actually used for a jump,

To be consistent with the source code (random_par_set1[i]-random_par_set2[i]), I changed the sum of the difference to “sum first and then do the difference”

If there is any room for improvement, please advise, I am willing to continue to revise.

Best wishes,
Yantong Wu

@thouska
Copy link
Owner

thouska commented Jun 21, 2022

Hi @BeingHapppy,
I double checked your contribution and I am super happy to say, that it all looks very good. I think with your contribution the missing features as described by you in #284 are covered.
Your classmate is certainly right, the changes will alter the results gained with the Dream algorithm in Spotpy. This can cause some troubles. But, on the other hand:

  1. it is important to reproduce the orginal code as best as possible.
  2. I ran some test and can say your implementation seems robust and the actual final results change only slightly
  3. your contribution will result in a new spotpy version (1.5.15). So everyone who doesn't want to use the most recent version, can do so (which I however do not recommend).

I will add the missing changes to change the version number of spotpy with your pull request now. So what do you think, should we merge?
Thank you again for your contribution, and the time, effort, profession! It is highly appreciated!

Cheers,
Tobias

@BeingHapppy
Copy link
Contributor Author

Hi @thouska,
Yes, I am happy that you would like to merge it. Thank you for giving me the opportunity to participate in the improvement of spotpy dream, which I didn't dare to dream of. Thank you for your affirmation, it will greatly promote my confidence in programming!

cheers,
Yantong

@thouska thouska linked an issue Jun 21, 2022 that may be closed by this pull request
@thouska thouska merged commit e77e52c into thouska:master Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does spotpy's Dream not exactly Vrugt, J. A. (2016) proposed Dream?
2 participants