Commit 1f4e19c9 authored by Georgios Dagkakis's avatar Georgios Dagkakis

prints removed

parent 5daca64b
...@@ -231,11 +231,6 @@ class CapacityStationController(EventGenerator): ...@@ -231,11 +231,6 @@ class CapacityStationController(EventGenerator):
# loop through the capacity station buffers # loop through the capacity station buffers
for buffer in G.CapacityStationBufferList: for buffer in G.CapacityStationBufferList:
pr = False pr = False
if self.env.now==21.0:
if buffer.id=='ASBTST_B':
pass
print 'FOUND'
pr=True
# if the buffer was considered before (due to shared resources) continue # if the buffer was considered before (due to shared resources) continue
if buffer in alreadyConsideredBuffers: if buffer in alreadyConsideredBuffers:
continue continue
...@@ -302,9 +297,6 @@ class CapacityStationController(EventGenerator): ...@@ -302,9 +297,6 @@ class CapacityStationController(EventGenerator):
# get buffer where the entity is and the station it requests to get in # get buffer where the entity is and the station it requests to get in
entityBuffer=entity.currentStation entityBuffer=entity.currentStation
entityStation=entity.currentStation.next[0] entityStation=entity.currentStation.next[0]
if pr:
print '----->checking', entity.capacityProject.id
print self.checkIfThereIsEnoughSpace(entity, entityBuffer, consideredSpace)
if self.checkIfProjectCanStartInStation(entity.capacityProject, entityStation) and\ if self.checkIfProjectCanStartInStation(entity.capacityProject, entityStation) and\
(not self.checkIfProjectNeedsToBeAssembled(entity.capacityProject, entityBuffer))\ (not self.checkIfProjectNeedsToBeAssembled(entity.capacityProject, entityBuffer))\
...@@ -312,8 +304,7 @@ class CapacityStationController(EventGenerator): ...@@ -312,8 +304,7 @@ class CapacityStationController(EventGenerator):
if not self.checkIfProjectConsumesAssemblySpace(entity, entityBuffer): if not self.checkIfProjectConsumesAssemblySpace(entity, entityBuffer):
consideredSpace-=entity.capacityProject.assemblySpaceRequirement consideredSpace-=entity.capacityProject.assemblySpaceRequirement
totalRequestedCapacity+=entity.requiredCapacity totalRequestedCapacity+=entity.requiredCapacity
if pr:
print totalRequestedCapacity
# if there is enough capacity for all the entities set them that they all should move # if there is enough capacity for all the entities set them that they all should move
if totalRequestedCapacity<=totalAvailableCapacity: if totalRequestedCapacity<=totalAvailableCapacity:
availableCapacity=float(totalAvailableCapacity) availableCapacity=float(totalAvailableCapacity)
...@@ -399,12 +390,6 @@ class CapacityStationController(EventGenerator): ...@@ -399,12 +390,6 @@ class CapacityStationController(EventGenerator):
totalRequestedCapacity-=entity.requiredCapacity totalRequestedCapacity-=entity.requiredCapacity
# else break the entity according to rule # else break the entity according to rule
else: else:
if pr:
print 'breaking entity',entity.capacityProject.id
print totalAvailableCapacity
print totalRequestedCapacity
print entity.requiredCapacity
print totalAvailableCapacity*(entity.requiredCapacity)/float(totalRequestedCapacity)
if self.breakEntity(entity, entityBuffer, entityStation, if self.breakEntity(entity, entityBuffer, entityStation,
totalAvailableCapacity, totalRequestedCapacity): totalAvailableCapacity, totalRequestedCapacity):
# reduce the available space if there is need to # reduce the available space if there is need to
......
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