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

Random sink frequency #565

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Conversation

nuclearkatie
Copy link
Contributor

Adds randomness in the next time Sink requests material through random_frequency_type. Options:

  • UniformInt, which also requires random_frequency_max (otherwise the default is 1e299, making it extremely unlikely that the facility ever gets called), and optional random_frequency_min, which has a default of 1
  • NormalInt which has random_frequency_mean and random_frequency_stddev, and can will use random_frequency_min and random_frequency_max when provided

Tests

Closes #551 (Along with #550, which is already merged) and closes #559

@nuclearkatie nuclearkatie requested a review from gonuke November 30, 2023 18:08
@nuclearkatie nuclearkatie marked this pull request as draft November 30, 2023 18:14
@nuclearkatie nuclearkatie removed the request for review from gonuke November 30, 2023 18:14
@nuclearkatie nuclearkatie marked this pull request as ready for review November 30, 2023 18:25
@nuclearkatie nuclearkatie requested a review from gonuke November 30, 2023 18:25
Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly ok. I'd like to little more comments in the tests so that we know why they are right. (I believe that they are right, but want to leave comments for future us.)

src/sink_tests.cc Show resolved Hide resolved
Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent - thanks for these comments.

@gonuke gonuke merged commit 9514f92 into cyclus:main Dec 1, 2023
5 checks passed
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.

Design unit test for randomness in request frequency for Sink archetype implement randomness in Sink
2 participants