Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cuae2!ltuxa!we53!sw013b!dj3b1!killer!ndmce!pollux!infotel!ut-ngp!ut-sally!seismo!mcvax!unido!exunido!kubitzsc From: kubitzsc@exunido.UUCP@ndmce.uucp Newsgroups: net.lang.st80 Subject: Re: Orphaned Response - (nf) Message-ID: <278@ndmce.uucp> Date: Fri, 17-Oct-86 16:54:07 EDT Article-I.D.: ndmce.278 Posted: Fri Oct 17 16:54:07 1986 Date-Received: Tue, 21-Oct-86 05:33:16 EDT References: <307@unido.UUCP> Sender: news@ndmce.uucp Organization: Nathan D. Maier Consulting Engineers, Dallas Lines: 69 Nf-ID: #R:unido:-30700:exunido:17400019:37777777600:1565 Nf-From: exunido!kubitzsc Oct 14 19:30:00 1986 Here are the changes I had to add to the simulation methods shown in the 'Blue Book'. I added then on a PCS Cadmus 9200. There occurred no further problems while running the examples and implementing others. !ProbabilityDistibution methodsFor: 'private'! atEnd ^false! ! !Simulation methodsFor: 'initialization'! activate ProbabilityDistribution initialize. SimulationObject activeSimulation: self. Resource activeSimulation: self! ! !Simulation methosFor: 'scheduling'! newProcessFor: aBlock self startProcess. [aBlock value. self stopProcess] forkAt: [Processor activePriority + 1]! ! !Simulation methodsFor: 'simulation control'! proceed |eventProcess| [self readyToContinue] whileFalse: [Processsor yield]. eventQueue isEmpty ifTrue: [^self finishUp] ifFalse:[eventProcess _ eventQueue removeFirst. currentTime _ eventProcess condition. eventProcess resume]! ! !Simulation methodsFor: 'run a simulation'! run self startUp. [eventQueue isEmpty] whileFalse: [self proceed]! runUntil: aTime self startUp. [self time <= aTime and: [eventQueue isEmpty not]] whileTrue: [self proceed]! ! After all you should not forget to close the files you opened for gathering your statistics. Therefor you need the following method at least in this class: !EventMonitor class methodsFor: 'accessing'! file ^file! ! If you don't close an open file, the last 512 bytes block will not be written onto disk. I hope you enjoy your simulation. Peter Kubitzsch Vogelpothsweg 92/2 4600 Dortmund 50 Germany