在Netlogo中绘制X轴的时间
我正在使用Netlogo的时间延长,每个刻度为一分钟。我已经使用设置当前时间设置此设置:锚到键的开始时间1.0 tick-“ minute”
。
该模型的运行正常。我能够根据日期/月/月进行时间步长操作,等等。
我无法绘制当前时间变量。我希望它在情节的X轴上。如果我尝试设置这样的范围set-plot-x范围的启动末期末日
在绘图设置部分中,我会收到这样的错误:
Runtime Error: SET-PLOT-X-RANGE expected input to be number but got the org.nlogo.extensions.time.data.types.LogoTime
这是什么选择?
I am using the Time extension in NetLogo where each tick is a minute. I have set this up using set current-time time:anchor-to-ticks start-time 1.0 tick-"minute"
.
The running of the model works fine. I am able to perform my time step actions based on the date/day/month, etc.
I am unable to plot the current-time variable though. I would want it to be on the x-axis of the plot. If I try setting a range like this set-plot-x-range start-time end-time
in the plot setup section, I get an error like this:
Runtime Error: SET-PLOT-X-RANGE expected input to be number but got the org.nlogo.extensions.time.data.types.LogoTime
What's the alternative to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对不起,我认为没有办法在Netlogo的情节上绘制格式化的时间。这些图只能在其轴上使用数字,而您的时间值是不同类型的变量,徽标,它更像是一个对象而不是数字。
取而代之的是,您只需在X轴上使用刻度,然后将轴标记为在几分钟内将轴标记为模拟时间。
您还可以将结果写入输出文件,包括格式为字符串的当前时间的值,例如,使用:
然后使用文件输出以及其他处理日期和时间的其他软件绘制图。
我很高兴看到人们使用时间延长!
I'm sorry but I don't think there is a way to plot a formatted time on NetLogo's plots. The plots can only use numbers on their axes, and your time values are a different type of variable, a Logotime, which is more like an object than a number.
Instead, you can simply use TICKS on the X axis and label the axis as simulated time in minutes.
You can also write your results to an output file, including the value of current-time formatted as a character string, e.g., using:
and then draw plots using the file output and some other software that handles dates and times.
I'm glad to see people using the Time extension!