Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Orphaned Response - (nf)

0 views
Skip to first unread message

kubitzsc@exunido.UUCP@ndmce.uucp

unread,
Oct 17, 1986, 4:54:07 PM10/17/86
to
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

0 new messages