Commit 0f1d6992 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

update so that in the schedule of an Entity the whole object is kept

parent 8389f3fe
......@@ -105,7 +105,7 @@ class CoreObject(Process):
#append the time to schedule so that it can be read in the result
#remember that every entity has it's schedule which is supposed to be updated every time
# the entity enters a new object
activeEntity.schedule.append([activeObject.id,now()])
activeEntity.schedule.append([activeObject,now()])
activeEntity.currentStation=self
self.timeLastEntityEntered=now()
try:
......
......@@ -58,7 +58,7 @@ class Job(Entity): # inherits from the Entity c
i=0
for record in self.schedule:
json['results']['schedule'][str(i)]={} # dictionary holding time and
json['results']['schedule'][str(i)]['stationId']=record[0] # id of the Object
json['results']['schedule'][str(i)]['stationId']=record[0].id # id of the Object
json['results']['schedule'][str(i)]['entranceTime']=record[1] # time entering the Object
i+=1
G.outputJSON['elementList'].append(json)
......
......@@ -538,7 +538,7 @@ def setWIP():
object=obj # find the object in the 'G.ObjList
object.getActiveObjectQueue().append(entity) # append the entity to its Queue
entity.remainingRoute[0][0]="" # remove data from the remaining route.
entity.schedule.append([object.id,now()]) #append the time to schedule so that it can be read in the result
entity.schedule.append([object,now()]) #append the time to schedule so that it can be read in the result
entity.currentStation=object # update the current station of the entity
# ===========================================================================
......
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