Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!uccba!mead!gordon From: gordon@mead.UUCP (Gordon Edwards) Newsgroups: comp.lang.c++ Subject: Re: discrete-event simulation in C++ Message-ID: <1215@meaddata.mead.UUCP> Date: 24 Aug 90 13:24:58 GMT References: <60862@lanl.gov> Sender: usenet@mead.UUCP Reply-To: mead!gordon@uccba.uc.edu Distribution: comp Organization: Mead Data Central, Dayton OH Lines: 67 In article , cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: |> In article <60862@lanl.gov> jwa@lanl.gov (Wayne Anderson) writes: |> |> Process oriented simulation seems to me to provide a somewhat more natural |> way of writing simulations. However, there also seems to be an efficiency |> trade off (as compared to discrete-event simulation). |> |> Could someone please explain (briefly) what process oriented simulation is and |> contrast it to event oriented simulation? Something tells me I'll probably |> get it as soon as someone starts explaining it, but, right now, its meaning |> escapes me. |> The process oriented, or process-interaction, simulation is a discrete-event simulation. There are four gross categories of simulations: Continuous-Event/Continuous-Time Continuous-Event/Discrete-Time Discrete-Event/Continous-Time Discrete-Event/Discrete-Time The term discrete-event simulations normaly refers to the discrete-event/ continuous-time category. This category can be further calssified into: Event-Scheduling Simulations Activity-Scanning Simulations Process-Interaction Simulations The event-scheduling simulations concentrate on the events that occur, activity- scanning simulations concentrate on the set of states required for an event to occur (often implemented using a big state table), and process-interaction simulations concentrate on the entities/objects as they are acted upon by events. Each type has its advantages and disadvantages. Process-interaction simulations have a great deal of popularity (I tend to agree with Wayne on their virtues), however, if you are not experienced developing simulations or you don't have a good understanding of concurrent processing they can be dangerous. Process-interaction simulations can introduce "artifactual deadlock". This is a type of deadlock that occurs due to the implementation of the simulation. For example, in a harbor simulation tankers wait outside the harbor for a tug to take them to the (1) berth, they then unload and wait for the tug to take them back to sea. Now from a process viewpoint (highly simplified): [1] Tanker_1 comes into port. [2] Tanker_1 acquires tug. [3] Tanker_1 acquires berth. [4] Tanker_1 releases tug and begins to unload. [5] Tanker_2 arrives and acquires the tug. [6] Tanker_2 tries to acquire the berth and is locked. [7] Tanker_1 finishes unloading and tries to acquire the tug (to free the berth) and is locked. Now there are a number of things you can do to solve this problem (use a petri net for ideas) but the point is that this is not a real-life problem but a problem imposed by the model. Since process-interaction simulations are literaly multi-tasking, the deadlock is very real. -- Gordon Edwards Mead Data Central, Dayton OH