如何分析/优化模拟工具?
过去,现在断断续续地,我使用过诸如 简单的 Java 模拟 和 NetLogo。
它们是对各种数学/计算机科学概念进行可视化建模的绝佳工具,因为“您所要做的就是编写模拟循环 - 图形等都会为您处理。”
然而,我注意到的一件事是,使用此类工具提高执行时间/建模速度非常困难,因为实现的核心隐藏在表面之下。
一般来说,有关于如何使用模拟器工具的很好的文档,但我还没有找到任何关于提高执行时间的内容。
例如,假设您正在实施牛顿法来求根。 这是一种简单的算法,但根据
- 您使用的图形附件的类型或
- 选择的各种其他杂项选项,
模拟将以不同的速度运行。
有没有办法确定模拟数据的“最佳”显示?
我在使用这样的工具来教授有关建模/科学编程的课程时想到了这一点。
In the past, and intermittently now, I've used simulation tools like Easy Java Simulations and NetLogo.
They are great tools for visually modeling various mathematical/comp-sci concepts because "all you have to do" is write the simulation loop - the graphics, etc are handled for you.
However, one thing I have noticed is that improving execution time / modeling speed is extremely difficult using such tools, because the guts of the implementation are hidden under the surface.
There is, generally-speaking, great documentation on how to use the simulator tools, but I haven't found anything on improving execution time.
For example, say you're implementing Newton's Method for root finding. It's a straight-forward algorithm, but depending on
- the type of graphic attachment you use, or
- various other miscellaneous options chosen
the simulation will run at different speeds.
Is there a way to determine an "optimal" display of the simulation's data?
I'm thinking of this in the case of using such a tool to teach classes about modeling/scientific programming.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试使用Repast Symphony代理模拟工具包。
它是一个成熟、免费、开源的编程环境,具有许多有用的功能。
您可以将 Repast 与 Eclipse 集成,Eclipse 具有 分析器插件。
You may try to use the Repast Symphony agent simulation toolkit.
It is a mature, free, open source programming environment with lots of useful features.
You can integrate Repast with Eclipse what has a profiler plugin.
通过 Netlogo,您可以使用探查器扩展
请参阅netlogo 主页上的探查器文档
With Netlogo, you can use the Profiler extension
See profiler documentation on the netlogo home page
如果所有其他方法都失败,您可以结合使用这两种方法:
不要忘记内存缓存和优化等效果。 如果您尝试在特定环境中使用特定功能,它的运行可能会与您之前的体验有所不同。
If all else fails, you can use a combination of these two approaches:
Don't forget about effects such as memory caching and optimisations. If you try to use a particular feature in a certain context it may run differently to your previous experience.