-
Notifications
You must be signed in to change notification settings - Fork 40
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
support for binomial active/dormant in storage #635
Conversation
Build Status Report - dfd4e23 - 2024-10-31 02:27:52 +0000Build
|
I think this looks OK for the example you have, but not sure this is the best way to accomplish the disruption modeling scenario. I was thinking more about something that had a regular active/dormant cycle, but could be disrupted for some different amount of (longer) dormant time with some probability. |
Ah, interesting. So that's kind of like a negative binomial on top of another distribution? |
I think I'm thinking of something simpler. Sample from a Bernoulli (binomial with N=1) distribution with a high probability (p = 0.99), and use a nominal dormant length (e.g. 10 days) when successful (= 1 success, happens most of the time) and a disrupted dormant length (e.g. 150 days) when non successful (=0 success, happens rarely). Of course, this could just be done by sampling a random number and comparing to |
Ok I started working on the plane but I want to check in one more time before getting a working version. Basically, this would require a new understanding of |
It does need something new in Cyclus and I would implement it something like this: cyclus/cyclus#1827 Could also use a binomial distribution under the hood |
Of course - this is not building properly - but I use it to show the concept. |
It builds now.... I think I'm using the binomial distribution correctly. I expect it to return either 0 or 1, and it should return 1 with p_success. |
Ok, I added |
Passing on latest now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is one optional parameter missing in the comments. You also didn't include the list of distribution types in the top of the header - I think you mentioned that today.
Finally - one optional request for formatting in comments.
Co-authored-by: Paul Wilson <[email protected]>
Adds the ability to use a binomial distribution to active and dormant cycles which requires one parameter, the probability that any individual time step would end the current cycle. This is specifically useful for disruption modeling, where you can assume that at every time step there is some very small chance that the agent goes offline (i.e. dormant) and vice versa for dormant.
This is a negative binomial distribution (since we're sampling the number of trials until n successes, rather than sampling the successes in n trials), in the specific case where the number of successes is always one. This is equal to a geometric distribution, but since negative binomial is more generic that's what is implemented in cyclus#1841 and used here. Note that like a coin toss, every time step is independent and has the same probability,
active_buying_end_probability
(or dormant)Requires cyclus#1841 to be merged first