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

Allow to limit Poisson schedule with a stop time (closes #1617) #1684

Conversation

schmitts
Copy link
Contributor

Allow to limit Poisson schedule with a stop time using the same
semantics as the regular schedule.

Allow to limit Poisson schedule with a stop time using the same
semantics as the regular schedule.
@noraabiakar noraabiakar self-assigned this Sep 29, 2021
Copy link
Contributor

@noraabiakar noraabiakar left a comment

Choose a reason for hiding this comment

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

Looks good thanks! I just have a small request to add an assertion.

Copy link
Contributor

@noraabiakar noraabiakar left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -256,6 +268,8 @@ void register_schedules(py::module& m) {
"The expected frequency [kHz].")
.def_readwrite("seed", &poisson_schedule_shim::seed,
"The seed for the random number generator.")
.def_property("tstop", &poisson_schedule_shim::get_tstop, &poisson_schedule_shim::set_tstop,
"No events delivered after this time [ms].")
Copy link
Contributor

Choose a reason for hiding this comment

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

std::ostream& operator<<(std::ostream& o, const poisson_schedule_shim& p) (line 27 of this file) needs to be amended to print out the tstop time as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

@noraabiakar noraabiakar merged commit ecd794a into arbor-sim:master Sep 30, 2021
max9901 pushed a commit to max9901/arbor that referenced this pull request Oct 11, 2021
Limit poisson schedule with a stop time using the same semantics as the regular schedule.
closes arbor-sim#1617
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.

2 participants