-
Notifications
You must be signed in to change notification settings - Fork 13
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
Using time:go-until with LogoTime #35
Comments
Hey again, wow [forehead slap], this is apparently a case of getting ahead of myself during documentation. I clearly intended to add the capability of using a LogoTime and not just a number, but I never implemented it. Fortunately, it was quick and painless to add, which I just did and I will again release a new version of the extension shortly. Thank you for using the extension, for your patience, and for bringing these issues to my attention... I appreciate it! Feel free to submit more issues if you have them... as you've probably determined already, I don't monitor stackoverflow, so github is your best bet. Cheers, |
I am trying to use the time extension together with NetLogo's Behavior Space. My model stops as requested when it is run separately, but in Behaviour Space they never stop (and do not update the view, the monitors and the plots). Any experience with the time extension under Behavior Space? |
@kgtroitzsch sorry I didn't respond to this, I had a busy Spring. I've never attempted to use the time extension with Behavior Space, so I can't really say why the problem is occurring. I'll add it to my issues list for future investigation. |
Dear Colin, no problem, I found a hack to circumvent the problem J Best Klaus Dr. Klaus G. Troitzsch, Universitätsprofessor (a.D. / retired) Institut für Wirtschafts- und Verwaltungsinformatik Universität Koblenz-Landau e-mail: mailto:kgt@uni-koblenz.de kgt@uni-koblenz.de www: http://userpages.uni-koblenz.de/~kgt http://userpages.uni-koblenz.de/~kgt, Von: Colin Sheppard [mailto:notifications@github.com] @kgtroitzsch https://github.com/kgtroitzsch sorry I didn't respond to this, I had a busy Spring. I've never attempted to use the time extension with Behavior Space, so I can't really say why the problem is occurring. I'll add it to my issues list for future investigation. — |
Hi Colin,
Thanks for resolving the last issue that quickly!
Could you also have a look into this question: http://stackoverflow.com/questions/25060039/using-timego-until-in-netlogo-time-extension ?
Here's a copy of the question:
Using the NetLogo time extension on NetLogo 5.1.0 and Windows 8.1, I would like a simulation to stop either at a specific date, or after a specific period of time.
time:go-until should work for this according to the documentation on https://github.com/colinsheppard/time/#discrete-event-scheduler, but I can't figure out how to use it correctly. Here's what I have so far:
extensions [time]
globals[
start-time
current-time
]
to setup
clear-all
reset-ticks
set start-time time:create "2011-01-01"
set current-time time:anchor-to-ticks start-time 1.0 "days"
time:anchor-schedule start-time 1.0 "days"
create-turtles 2
time:schedule-repeating-event-with-period turtles task [fd 1] 1 1.0 "days"
end
to go-until
time:go-until 40
;time:go-until time:create "2011-03-01"
;time:go-until time:plus start-time 33.0 "days"
end
Like this, the sim runs for 40 ticks and then ends as expected. However, when I replace time:go-until 40 with either time:go-until time:create "2011-03-01" or time:go-until time:plus start-time 33.0 "days", I get this error at the start of the simulation:
Extension exception: time: was expecting a number as argument 1, found this instead: {{time:logotime 2011-03-01}}
error while observer running TIME:GO-UNTIL
called by procedure GO-UNTIL
called by Button 'go'
Here's an example from the documentation which should work correctly:
time:go-until time:plus t-datetime 1.0 "hour"
;; Execute events within the next hour; t-datetime is the current time.
What am I missing?
The text was updated successfully, but these errors were encountered: