Commit 6bbaeaf2 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

naming conventions for skilledOperator flag and checkForSkilledOperators changed

parent be502b94
......@@ -370,7 +370,7 @@ class CoreObject(object):
# check if the any of the operators are skilled (having a list of skills regarding the machines)
#===========================================================================
@staticmethod
def checkForSkilledOperators():
def checkForDedicatedOperators():
from Globals import G
# XXX this can also be global
# flag used to inform if the operators assigned to the station are skilled (skillsList)
......@@ -412,7 +412,7 @@ class CoreObject(object):
self.preemptReceiver()
# TODO if the station is operated, and the operators have skills defined then the SkilledOperatorRouter should be signalled
# XXX: there may be a case where one machine is not assigned an operator, in that case we do not want to invoke the allocation routine
if self.checkForSkilledOperators():
if self.checkForDedicatedOperators():
allocationNeeded=False
for nextObj in self.next:
if nextObj.operatorPool!='None':
......@@ -460,7 +460,7 @@ class CoreObject(object):
def signalRouter(receiver=None):
# if an operator is not assigned to the receiver then do not signal the receiver but the Router
try:
# XXX in the case of skilledOperators assignedOperators must be always True in order to avoid invoking the Router
# XXX in the case of dedicatedOperator assignedOperators must be always True in order to avoid invoking the Router
if not receiver.assignedOperator or\
(receiver.isPreemptive and len(receiver.Res.users)>0):
if receiver.isLoadRequested():
......
......@@ -90,7 +90,7 @@ class Machine(CoreObject):
self.MTTR=MTTR
self.availability=availability
# check whether the operators are provided with a skills set
self.skilledOperators=self.checkForSkilledOperators()
self.dedicatedOperator=self.checkForDedicatedOperators()
# create an operatorPool if needed
self.createOperatorPool(operatorPool)
# holds the Operator currently processing the Machine
......@@ -211,7 +211,7 @@ class Machine(CoreObject):
# otherwise
else:
# if there are operators with skillList
if self.skilledOperators:
if self.dedicatedOperator:
id = self.id+'_OP'
name=self.objName+'_operatorPool'
self.operatorPool=OperatorPool(id,name,operatorsList=[])
......@@ -241,8 +241,8 @@ class Machine(CoreObject):
from Globals import G
# if there is no router
if not G.Router:
# TODO if the skilledOperators flag is raised then create a SkilledRouter (temp)
if self.skilledOperators:
# TODO if the dedicatedOperator flag is raised then create a SkilledRouter (temp)
if self.dedicatedOperator:
self.router=SkilledRouter()
else:
self.router=Router()
......@@ -257,8 +257,8 @@ class Machine(CoreObject):
# initialise the operator pool if any
if (self.operatorPool!="None"):
self.operatorPool.initialize()
# if the flag skilledOperators is true then reset/empty the operators list of the pool
if self.skilledOperators:
# if the flag dedicatedOperator is true then reset/empty the operators list of the pool
if self.dedicatedOperator:
self.operatorPool.operators=[]
# otherwise update the coreObjectIds/coreObjects list of the operators
else:
......@@ -876,7 +876,7 @@ class Machine(CoreObject):
self.outputTrace(self.currentOperator.objName, "released from "+ self.objName)
# set the flag operatorAssignedTo to None
# XXX in case of skilled operators which stay at the same station should that change
if not self.checkForSkilledOperators():
if not self.checkForDedicatedOperators():
self.currentOperator.unAssign()
self.broker.invoke()
self.toBeOperated = False
......
......@@ -85,7 +85,7 @@ class Broker(ObjectInterruption):
# if the victim already holds an entity that means that the machine's operation type
# is no Load or setup, in that case the router is already invoked and the machine is already assigned an operator
from Globals import G
if not self.victim.checkForSkilledOperators():
if not self.victim.checkForDedicatedOperators():
if not self.victimQueueIsEmpty():
# add the currentEntity to the pendingEntities
if not self.victim.currentEntity in G.pendingEntities:
......@@ -134,7 +134,7 @@ class Broker(ObjectInterruption):
self.isCalled=self.env.event()
# The operator is released (the router is not called in the case of skilled ops that work constantly on the same machine)
if not self.victim.checkForSkilledOperators():
if not self.victim.checkForDedicatedOperators():
if not self.victim.isOperated():
self.victim.currentOperator.totalWorkingTime+=self.env.now-self.victim.currentOperator.timeLastOperationStarted
# signal the other brokers waiting for the same operators that they are now free
......
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