复杂系统大规模桌面仿真的数据结构编程
Programming Data Structures for Large-Scale Desktop Simulations of Complex Systems
摘要:
复杂系统的研究需要在许多时间迭代上运行大规模模拟。因此,重要的是提供有效的实现。本研究借用Gilbert Simondon的哲学概念来确定对运行时间和内存使用有最大影响的数据结构和算法。它们是实体$e$ -元组$\mathcal{E}$和交织的更新函数$ϕ$。专注于在C#中实现数据结构,根据当前软件工程实践将$\mathcal{E}$实现为对象列表,并且根据理论考虑将其实现为指针数组。在一次迭代中使用$10^9$实体的元胞自动机模拟表明,具有动态类型和多状态就绪的对象列表对运行时间和内存使用有显著影响,特别是动态类型,因为它对演化时间有很大影响。指针数组可以在C#中实现,并且与对象列表实现相比,它们的运行时间和内存效率更高,但是,它们实现起来很麻烦。总之,在基于对象列表的实现中避免动态类型或使用指针数组,即使在台式计算机上,也可以在实践中接受。
英文摘要:
The investigation of complex systems requires running large-scale simulations over many temporal iterations. It is therefore important to provide efficient implementations. The present study borrows philosophical concepts from Gilbert Simondon to identify data structures and algorithms that have the biggest impact on running time and memory usage. These are the entity $e$-tuple $\mathcal{E}$ and the intertwined update function $ϕ$. Focusing on implementing data structures in C#, $\mathcal{E}$ is implemented as a list of objects according to current software engineering practice and as an array of pointers according to theoretical considerations. Cellular automaton simulations with $10^9$ entities over one iteration reveal that the object-list with dynamic typing and multi-state readiness has a drastic effect on running time and memory usage, especially dynamic typing as it has a big impact on the evolution time. Pointer-arrays are possible to implement in C# and are more running time and memory efficient as compared to the object-list implementation, however, they are cumbersome to implement. In conclusion, avoiding dynamic typing in object-list based implementations or using pointer-arrays gives evolution times that are acceptable in practice, even on desktop computers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。