-
Notifications
You must be signed in to change notification settings - Fork 62
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
Allow to limit Poisson schedule with a stop time (closes #1617) #1684
Conversation
Allow to limit Poisson schedule with a stop time using the same semantics as the regular schedule.
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.
Looks good thanks! I just have a small request to add an assertion.
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.
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].") |
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.
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.
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.
Will do.
Limit poisson schedule with a stop time using the same semantics as the regular schedule. closes arbor-sim#1617
Allow to limit Poisson schedule with a stop time using the same
semantics as the regular schedule.