From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!enea!sommar From: sommar@enea.UUCP (Erland Sommarskog) Newsgroups: comp.lang.ada Subject: Re: Tasks and Simulation Message-ID: <1660@enea.UUCP> Date: Fri, 23-Jan-87 18:26:58 EST Article-I.D.: enea.1660 Posted: Fri Jan 23 18:26:58 1987 Date-Received: Sat, 24-Jan-87 08:48:58 EST References: <469@cod.UUCP> Reply-To: sommar@enea.UUCP (Erland Sommarskog) Organization: ENEA DATA Svenska AB, Sweden List-Id: In article <469@cod.UUCP> dennis@cod.UUCP (Dennis Cottel) writes: >We are considering using Ada to write a non-real-time simulation of >combat engagements. It would seem a perfect application of >object-oriented design to use Ada tasks to model the independently >operating combatants, and in fact, to use tasks to model independent >functions within the weapons and platforms. > > ... further description of problems with clock tasks > First of all: I don't know anything of these combats that you are simulating. Is there any difference in the sense of simulation compared with for instance a telephone exchange? As far as I can read from your article, there is not. This is what I am assuming in the following. I don't think that Ada tasks are good tools to model the combatants. Tasks are real-time processes, while those you have, are not. That doesn't mean that I think it is bad idea to use Ada and OOD to solve the problem. It is just the approach that is wrong. What you need is non-real-time processes with non-real-time delays. In fact you will probably need a whole support package/generic/whatever for discrete-time simulation. Ada does not have this, however there is one langauge that actually have this as a standard feature, and that is Simula. If you don't know of the standard class SIMSET, I think you shall take a look at it. Probably it is exactly what you need. The problem will then be to implement SIMSET in Ada. Your simulation will be quite solve then, AND you will have good package for the next time.