NetLogo 中的离散事件调度:在某个特定的时间点执行一些命令
Discrete Event Scheduling in NetLogo: Executing some command on some specific tick
我的代码有一个条件:
if ticks = 10^7 [ do-something ]
虽然我确切地知道何时必须执行命令,但现在每个报价都会检查此条件。这可能会减慢我的代码。 time extension 正是通过 time:go 命令完成的。我使用时间扩展的命令是:
time:schedule-event patches task do-something 1000000
但这会引发错误:
Extension exception: Attempted to schedule an event for tick 999999.0 which is before the present 'moment' of 1000000.0
error while observer running TIME:SCHEDULE-EVENT
called by procedure GO
called by Button 'go'
有什么我想念的吗?或者任何其他有效的方法来在特定的滴答处安排一些事件而不检查每个滴答声的滴答声条件?
如果这看起来像是时间延长中的错误,请 post 在 https://github.com/colinsheppard/time/issues
并告诉我们在哪里可以找到您的代码。 (或通过电子邮件发送给我。)
我的代码有一个条件:
if ticks = 10^7 [ do-something ]
虽然我确切地知道何时必须执行命令,但现在每个报价都会检查此条件。这可能会减慢我的代码。 time extension 正是通过 time:go 命令完成的。我使用时间扩展的命令是:
time:schedule-event patches task do-something 1000000
但这会引发错误:
Extension exception: Attempted to schedule an event for tick 999999.0 which is before the present 'moment' of 1000000.0
error while observer running TIME:SCHEDULE-EVENT
called by procedure GO
called by Button 'go'
有什么我想念的吗?或者任何其他有效的方法来在特定的滴答处安排一些事件而不检查每个滴答声的滴答声条件?
如果这看起来像是时间延长中的错误,请 post 在 https://github.com/colinsheppard/time/issues 并告诉我们在哪里可以找到您的代码。 (或通过电子邮件发送给我。)