Consider the need to simulate a set of entitities in an accurate way. All entities exist in an artificial timeline. Within 'steps' of this timeline, all entities can do certain operations. It is imperative that timed events, are handled accurately, and not in processing order. So simple threading isn't a proper simulation, nor is procedurally walking across all entities.

Processing may be slow, accuracy is key here.

I have some ideas how to implement this myself, but most likely something like this has been done before.

Are there any frameworks available for these purposes? Is there any particular paradigm more suitable?

UPDATE: example for clarification

Example: A and B send C a message at the exact same time. Assume sending the message takes time based on distance, and they both are at the exact same distance from C. C should be able to handle this action as a simultaneous 'event', not based on processing order if A would be traversed before B.

  • Interesting, do you have a particular language in mind? Do you also need to simulate these entities failing to do what is expected?
    – user131
    Commented Feb 24, 2011 at 19:25
  • 1
    Why do you think that procedurally walking all entities doesn't do as you expect? It's straightforward to manage simultaneity by just having all entities react to the state at the start of the timestep, regardless of what other entities have had their current timestep simulated yet.
    – Anon.
    Commented Feb 24, 2011 at 20:41
  • I don't have any idea what you are talking about. What does handled accurately mean. What does processing order have to do with accuracy? How has is threading or procedural walkthroughs related to anything.
    – Pemdas
    Commented Feb 25, 2011 at 0:25
  • 2
    It would help people answering your question immensely if you could give a concrete example. This should include how entities interact with each other to illustrate the difficulty in managing dissemination of information outside of the timeline.
    – Gary
    Commented Feb 25, 2011 at 8:57
  • 1
    you need to provide more information about what you're trying to do before we could suggest actual methodologies. I'd like to suggest flame.ac.uk but, you haven't really said enough for me to determine if it's anything like what you want.
    – TZHX
    Commented Feb 25, 2011 at 9:01

3 Answers 3


this sounds like a discrete-event simulation

you have a schedule of events by an arbitrary number of entities; at each time 'tick' an entity may take one or more actions including scheduling more actions at future time ticks

the main processing loop just walks through the timeline, jumping to the next time tick where an action is scheduled

the unclear part of this is what is the significance of (in your example) having C handle the message from A first and then B or somehow interleaving the two? If C's response to each message is another series of discrete events, then C can just schedule the responses for A and B as a set of future discrete events.

rinse and repeat


I'm using a tool called DEVS-Suite for some research in scalable queuing. In its own words:

DEVS-Suite is a Parallel DEVS simulator with support for (i) automating design of experiments in combination with (ii) animating models and (iii) generating data trajectories at run-time. See CoSMoSim - it offers rich visual modeling, database, etc.

(DEVS is an acronym for Discrete Event Simulation Specification).

It does take some time to figure out how to use, and while it is documented, the documentation does not tell you everything. On the other hand, the basic framework is stable.

The project home page is at: http://devs-suitesim.sourceforge.net/, and contains a bibliography of several papers describing it.


You may have a look at the Verilog and VHDL simulation languages. If you can model your setup in these languages, then good simulators are available. You can have text file input and output to drive and monitor your model.

  • 2
    Warning though, AFAIK these languages are meant for designing digital hardware. Might not be suitable for your simulation.
    – apoorv020
    Commented Mar 28, 2011 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.