什么是日历队列?
我正在致力于构建一个离散事件模拟器。维基百科提到有几种通用优先级队列非常适合在 DES 中使用。具体来说,它提到日历队列是一个很好的结构。我找到了一份 pdf(1988 年的),其中提到了日历队列,但在大多数情况下我找不到关于它们的任何其他内容。有人介意解释什么是日历队列、它们如何使用以及我可以在哪里找到示例实现吗?
I am working on a building a discrete event simulator. Wikipedia mentioned that there are several general purpose priority queues that are good for use in DES's. Specifically, it mentions that a Calendar Queue is a good structure. I found one pdf (from 1988) that mentions Calendar Queues, but for the most part I can't find anything else out about them. Would someone mind explaining what Calendar Queue's are, how they're used, and where I might find a sample implementation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,Brown 1988 是我所知道的第一篇描述日历队列的论文,尽管 Brown 提到了几位作者在他之前。下面是日历队列文献的相对完整的参考书目以及我对每篇论文的笔记。如果您想要任何出版物的副本,请给我留言。
另外,我们最近完成了对布朗算法的一种变体的描述,它应该表现得更好。我认为该描述足以构建一个实现,并且本文中提供了示例代码。该出版物的标题为《用空间换时间:科学模拟中管理未来事件的恒速算法》,作者为 Lehman、Keene 和 Barnes,应该会在今年秋天的某个时候被编入索引。如果您想要一份副本,请发表评论,我会将其发送给您。
为了回答问题的不同部分,您可以将日历队列视为优先级队列,它针对优先级不断降低的事件进行了优化。通常,事件的优先级(时间)以某种方式进行存储,以避免必须接触所有事件才能插入一个事件(这可能发生在某些形式的堆管理中)。
Yes, Brown 1988 is the first paper I know of to describe calendar queues, though Brown mentions several authors who preceded him. Below is a relatively complete bibliography of the calendar queue literature along with my notes on each paper. Leave me a comment if you would like copies of any of the publications.
Also, we've recently finished describing a variant of Brown's algorithm which should perform better. The description is, I think quite adequate to build an implementation from and sample code is provided in the paper. The publication is entitled
Trading Space for Time: Constant-Speed Algorithms for Managing Future Events in Scientific Simulations
by Lehman, Keene, and Barnes and should be indexed sometime this fall. If you'd like a copy, leave a comment and I will send it to you.To answer a different part of your question, you can think of a calendar queue as being a priority queue which is optimized for events which will have ever-decreasing priorities. Usually the priorities (times) of the events are binned in some way so as to avoid having to touch all the events in order to insert one (as may happen in certain forms of heap management).
谷歌搜索找到了
离散事件日历队列中优化桶宽度的研究
模拟器
http://pioneer.netserv.chula.ac.th/~achaodit/ paper5.pdf
第 2 节描述了日历队列。
A Google search finds
Study of Optimised bucket widths in Calendar Queue for Discrete Event
Simulator
http://pioneer.netserv.chula.ac.th/~achaodit/paper5.pdf
which describes Calendar Queues in section 2.
NIST 的定义:
Paul E. Black,“日历队列”,《算法和数据结构词典》[在线],Vreda Pieterse 和 Paul E. Black 编辑。 2005 年 1 月 24 日。(访问时间:2014 年 3 月 10 日)可从:http://www.nist.gov/dads/HTML/calendarQueue.html" rel="nofollow">http://www. nist.gov/dads/HTML/calendarQueue.html
Definition by NIST:
Paul E. Black, "calendar queue", in Dictionary of Algorithms and Data Structures [online], Vreda Pieterse and Paul E. Black, eds. 24 January 2005. (accessed 2014-03-10) Available from: http://www.nist.gov/dads/HTML/calendarQueue.html