'From VisualWorks® NonCommercial, Release 5i.4 of August 9, 2001 on June 13, 2002 at 2:46:29 pm'! !CormasNS.Kernel.Cormas methodsFor: 'simulation'! initSimulation | theCommEntities aSymbol pop | self stepButton: (self builder componentAt: #stepButton) widget. Cursor wait showWhile: [self currentSimulation notNil ifTrue: [self currentSimulation activeInit isNil ifTrue: [self alert_NoInit]. theCommEntities := self currentModel allClasses select: [:uneEntite | "self currentSimulation initCollec: self currentModel allClasses." ((uneEntite inheritsFrom: AgentComm) or: [uneEntite inheritsFrom: AgentCommLocation]) and: [uneEntite isGenericEntity not]]. self stepCounter value: 0. self currentSimulation initDataStructures. self currentSimulation perform: self currentSimulation activeInit. pop := OrderedCollection new. theCommEntities do: [:uneEntite | aSymbol := ('the' , uneEntite name asString , 's') asSymbol. pop addAll: (self currentSimulation perform: aSymbol)]. theCommEntities isEmpty ifFalse: [self currentSimulation initializeChannel]. pop do: [:p | p channel: self currentSimulation channel]. pop isEmpty ifFalse: [self currentSimulation channel population: pop]. self obsWin notNil ifTrue: [self obsWin populationSource: pop. self obsWin msgObs: self currentModel messages]]]! !