本文整理汇总了Python中CoreObject.CoreObject.initialize方法的典型用法代码示例。如果您正苦于以下问题:Python CoreObject.initialize方法的具体用法?Python CoreObject.initialize怎么用?Python CoreObject.initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoreObject.CoreObject
的用法示例。
在下文中一共展示了CoreObject.initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
CoreObject.initialize(self)
self.waitToDispose=False #flag that shows if the object waits to dispose an entity
self.waitToDisposePart=False #flag that shows if the object waits to dispose a part
self.waitToDisposeFrame=False #flag that shows if the object waits to dispose a frame
self.Up=True #Boolean that shows if the object is in failure ("Down") or not ("up")
self.currentEntity=None
self.totalFailureTime=0 #holds the total failure time
self.timeLastFailure=0 #holds the time that the last failure of the object started
self.timeLastFailureEnded=0 #holds the time that the last failure of the object Ended
self.downTimeProcessingCurrentEntity=0 #holds the time that the object was down while processing the current entity
self.downTimeInTryingToReleaseCurrentEntity=0 #holds the time that the object was down while trying
#to release the current entity
self.downTimeInCurrentEntity=0 #holds the total time that the object was down while holding current entity
self.timeLastEntityLeft=0 #holds the last time that an entity left the object
self.processingTimeOfCurrentEntity=0 #holds the total processing time that the current entity required
self.totalBlockageTime=0 #holds the total blockage time
self.totalWaitingTime=0 #holds the total waiting time
self.totalWorkingTime=0 #holds the total working time
self.completedJobs=0 #holds the number of completed jobs
self.timeLastEntityEnded=0 #holds the last time that an entity ended processing in the object
self.timeLastEntityEntered=0 #holds the last time that an entity ended processing in the object
self.timeLastFrameWasFull=0 #holds the time that the last frame was full, ie that assembly process started
self.nameLastFrameWasFull="" #holds the name of the last frame that was full, ie that assembly process started
self.nameLastEntityEntered="" #holds the name of the last frame that entered processing in the object
self.nameLastEntityEnded="" #holds the name of the last frame that ended processing in the object
self.Res=simpy.Resource(self.env, capacity='inf')
self.Res.users=[]
示例2: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
CoreObject.initialize(self) # using the default CoreObject Functionality
self.Res=simpy.Resource(self.env, self.numberOfSubBatches) # initialize the Internal resource (Queue) functionality
self.expectedSignals['isRequested']=1
self.expectedSignals['interruptionStart']=1
self.expectedSignals['initialWIP']=1
示例3: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
# using the Process __init__ and not the CoreObject __init__
CoreObject.initialize(self)
# initialise the internal Queue (type Resource) of the Queue object
self.Res=simpy.Resource(self.env, self.capacity)
# event used by router
self.loadOperatorAvailable=self.env.event()
示例4: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
# Process.__init__(self)
CoreObject.initialize(self)
self.Res=simpy.Resource(self.env, capacity='inf')
self.position=[] #list that shows the position of the corresponding element in the conveyer
self.timeLastMoveHappened=0 #holds the last time that the move was performed (in reality it is
#continued, in simulation we have to handle it as discrete)
#so when a move is performed we can calculate where the entities should go
self.conveyerMover=ConveyerMover(self) #process that is triggered at the times when an entity reached the end or
#a place is freed. It performs the move at this point,
#so if there are actions to be carried they will
self.entityLastReachedEnd=None #the entity that last reached the end of the conveyer
self.timeBlockageStarted=self.env.now #the time that the conveyer reached the blocked state
#plant considers the conveyer blocked even if it can accept just one entity
#I think this is false
self.wasFull=False #flag that shows if the conveyer was full. So when an entity is disposed
#if this is true we count the blockage time and set it to false
self.currentRequestedLength=0 #the length of the entity that last requested the conveyer
self.currentAvailableLength=self.length #the available length in the end of the conveyer
self.predecessorIndex=0 #holds the index of the predecessor from which the Conveyer will take an entity next
self.successorIndex=0 #holds the index of the successor where the Queue Conveyer dispose an entity next
self.requestingEntities=[] # list of the entities requesting space on the conveyer
# signal that notifies the conveyer that its move is completed
self.moveEnd=self.env.event()
示例5: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
self.previous=G.ObjList
self.next=[]
CoreObject.initialize(self) # using the default CoreObject Functionality
self.Res=simpy.Resource(self.env, 'inf') # initialize the Internal resource (Queue) functionality. This is a dummy object so
# infinite capacity is assumed
self.newlyCreatedComponents=[] # a list to hold components just after decomposition
self.orderToBeDecomposed=None
示例6: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
# using the Process __init__ and not the CoreObject __init__
CoreObject.initialize(self)
# initialize the internal Queue (type Resource) of the Source
self.Res=Resource(capacity=infinity)
self.Res.activeQ=[]
self.Res.waitQ=[]
示例7: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
from Globals import G
G.BatchWaitingList = [] # batches waiting to be reassembled
CoreObject.initialize(self) # using the default CoreObject Functionality
self.Res=simpy.Resource(self.env, self.numberOfSubBatches) # initialize the Internal resource (Queue) functionality
self.expectedSignals['isRequested']=1
self.expectedSignals['interruptionStart']=1
self.expectedSignals['initialWIP']=1
示例8: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
# using the Process __init__ and not the CoreObject __init__
CoreObject.initialize(self)
# initialise the internal Queue (type Resource) of the Queue object
self.Res=simpy.Resource(self.env, self.capacity)
# event used by router
self.loadOperatorAvailable=self.env.event()
self.expectedSignals['isRequested']=1
self.expectedSignals['canDispose']=1
self.expectedSignals['loadOperatorAvailable']=1
示例9: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
Process.__init__(self)
CoreObject.initialize(self)
self.Res=Resource(capacity=infinity)
self.Up=True #Boolean that shows if the object is in failure ("Down") or not ("up")
self.currentEntity=None
self.totalBlockageTime=0 #holds the total blockage time
self.totalFailureTime=0 #holds the total failure time
self.totalWaitingTime=0 #holds the total waiting time
self.totalWorkingTime=0 #holds the total working time
self.completedJobs=0 #holds the number of completed jobs
self.timeLastEntityEnded=0 #holds the last time that an entity ended processing in the object
self.nameLastEntityEnded="" #holds the name of the last entity that ended processing in the object
self.timeLastEntityEntered=0 #holds the last time that an entity entered in the object
self.nameLastEntityEntered="" #holds the name of the last entity that entered in the object
self.timeLastFailure=0 #holds the time that the last failure of the object started
self.timeLastFailureEnded=0 #holds the time that the last failure of the object Ended
self.downTimeProcessingCurrentEntity=0 #holds the time that the object was down while processing the current entity
self.downTimeInTryingToReleaseCurrentEntity=0 #holds the time that the object was down while trying
#to release the current entity
self.downTimeInCurrentEntity=0 #holds the total time that the object was down while holding current entity
self.timeLastEntityLeft=0 #holds the last time that an entity left the object
self.processingTimeOfCurrentEntity=0 #holds the total processing time that the current entity required
self.waitToDispose=False #shows if the object waits to dispose an entity
self.position=[] #list that shows the position of the corresponding element in the conveyer
self.timeLastMoveHappened=0 #holds the last time that the move was performed (in reality it is
#continued, in simulation we have to handle it as discrete)
#so when a move is performed we can calculate where the entities should go
self.timeToReachEnd=0 #if the conveyer has entities but none has reached the end of it, this calculates
#the time when the first entity will reach the end and so it will be ready to be disposed
self.timeToBecomeAvailable=0 #if the conveyer has entities on its back this holds the time that it will be again free
#for an entity. of course this also depends on the length of the entity who requests it
self.conveyerMover=ConveyerMover(self) #process that is triggered at the times when an entity reached the end or
#a place is freed. It performs the move at this point,
#so if there are actions to be carried they will
self.call=False #flag that shows if the ConveyerMover should be triggered
self.entityLastReachedEnd=None #the entity that last reached the end of the conveyer
self.timeBlockageStarted=now() #the time that the conveyer reached the blocked state
#plant considers the conveyer blocked even if it can accept just one entity
#I think this is false
self.wasFull=False #flag that shows if the conveyer was full. So when an entity is disposed
#if this is true we count the blockage time and set it to false
self.currentRequestedLength=0 #the length of the entity that last requested the conveyer
self.currentAvailableLength=self.length #the available length in the end of the conveyer
self.predecessorIndex=0 #holds the index of the predecessor from which the Conveyer will take an entity next
self.successorIndex=0 #holds the index of the successor where the Queue Conveyer dispose an entity next
示例10: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
# using the Process __init__ and not the CoreObject __init__
CoreObject.initialize(self)
# initialize the internal Queue (type Resource) of the Exit
self.Res=simpy.Resource(self.env, capacity=float('inf'))
# The number of resource that exited through this exit.
# XXX bug: cannot output as json when nothing has exited.
self.numOfExits=0
self.totalNumberOfUnitsExited=0
self.totalLifespan=0
self.totalTaktTime=0 # the total time between to consecutive exits
self.intervalThroughPutList=[]
示例11: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
# using the Process __init__ and not the CoreObject __init__
CoreObject.initialize(self)
# initialize the internal Queue (type Resource) of the Source
# self.Res=Resource(capacity=infinity)
self.Res=simpy.Resource(self.env, capacity=float('inf'))
self.Res.users=[]
self.entityGenerator=EntityGenerator(victim=self) # the EntityGenerator of the Source
self.numberOfArrivals = 0
# self.entityGenerator.initialize()
# activate(self.entityGenerator,self.entityGenerator.run())
self.env.process(self.entityGenerator.run())
# self.entityCreated=SimEvent('an entity is created')
self.entityCreated=self.env.event()
# event used by router
# self.loadOperatorAvailable=SimEvent('loadOperatorAvailable')
self.loadOperatorAvailable=self.env.event()
self.scheduledEntities=[] # list of creations that are scheduled
示例12: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
CoreObject.initialize(self)
# queue to hold the entities all through the stay of an entity in the composite object
self.Res = Resource(self.capacity)
# the inner Giver that will feed the compound object receiver
self.innerGiver = None
# the inner object that will receive the object most recently added to the self.Res.activeQ
self.innerReceiver = None
# entity that will passed on to the innerReceiver
self.entityForInternalProc = None
# # inner queues that buffer the entities before they are handed in to the inner objects
# # and receive them again after the internal processing
# self.entryRes = Resource(self.capacity)
# self.exitRes = Resource(self.capacity)
# initialize all resources
# will have to reconsider as some of the resources may have been already initialized
for resource in self.resources:
if not resource.isInitialized():
resource.initialize()
# initialize all objects - and the entrance object
# self.firstObject.initialize()
for object in self.coreObjects:
object.initialize()
示例13: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
from Globals import G
G.BatchWaitingList = [] # batches waiting to be reassembled
CoreObject.initialize(self) # using the default CoreObject Functionality
self.Res=Resource(self.numberOfSubBatches) # initialize the Internal resource (Queue) functionality
示例14: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
CoreObject.initialize(self) # using the default CoreObject Functionality
self.Res=Resource(self.numberOfSubBatches) # initialize the Internal resource (Queue) functionality
示例15: initialize
# 需要导入模块: from CoreObject import CoreObject [as 别名]
# 或者: from CoreObject.CoreObject import initialize [as 别名]
def initialize(self):
# using the Process __init__ and not the CoreObject __init__
CoreObject.initialize(self)
# initialise the internal Queue (type Resource) of the Queue object
self.Res=Resource(self.capacity)