Commit 612e2ac7 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

modification in Source so that the trace is outputted correctly in Entity generation

parent be7298d8
...@@ -106,14 +106,14 @@ class Source(CoreObject): ...@@ -106,14 +106,14 @@ class Source(CoreObject):
while 1: while 1:
entity=self.createEntity() # create the Entity object and assign its name entity=self.createEntity() # create the Entity object and assign its name
self.numberOfArrivals+=1 # we have one new arrival
G.numberOfEntities+=1
entity.creationTime=now() # assign the current simulation time as the Entity's creation time entity.creationTime=now() # assign the current simulation time as the Entity's creation time
entity.startTime=now() # assign the current simulation time as the Entity's start time entity.startTime=now() # assign the current simulation time as the Entity's start time
entity.currentStation=self # update the current station of the Entity entity.currentStation=self # update the current station of the Entity
self.outputTrace(self.item.type+\ self.outputTrace(self.item.type+\
str(self.numberOfArrivals)) # output the trace str(self.numberOfArrivals)) # output the trace
activeObjectQueue.append(entity) # append the entity to the resource activeObjectQueue.append(entity) # append the entity to the resource
self.numberOfArrivals+=1 # we have one new arrival
G.numberOfEntities+=1
yield hold,self,self.calculateInterarrivalTime() # wait until the next arrival yield hold,self,self.calculateInterarrivalTime() # wait until the next arrival
#============================================================================ #============================================================================
# sets the routing out element for the Source # sets the routing out element for the Source
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment