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

main script changed so that it can read repairman also for operated machine

parent bd5e4dbd
......@@ -571,13 +571,19 @@ def createObjects():
# machineOperatorPoolList.append(operator) # the machine with ID equal to id
# # if there is no operator assigned then the list will be empty
r='None'
for repairman in G.RepairmanList: # check which repairman in the G.RepairmanList
if(id in repairman.coreObjectIds): # (if any) is assigned to repair
r=repairman # the machine with ID equal to id
OM=OperatedMachine(id, name, 1, distribution=distributionType, failureDistribution=failureDistribution,
MTTF=MTTF, MTTR=MTTR, availability=availability, #repairman=r,
mean=mean,stdev=stdev,min=min,max=max,
operatorPool=machineOperatorPoolList, operationType=operationType,
loadDistribution=loadDistribution, setupDistribution=setupDistribution,
setupMean=setupMean,setupStdev=setupStdev,setupMin=setupMin,setupMax=setupMax,
loadMean=loadMean,loadStdev=loadStdev,loadMin=loadMin,loadMax=loadMax)
loadMean=loadMean,loadStdev=loadStdev,loadMin=loadMin,loadMax=loadMax,
repairman=r)
OM.nextIds=getSuccessorList(id) # update the nextIDs list of the machine
G.OperatedMachineList.append(OM) # add the machine to the operatedMachines List
G.MachineList.append(OM) # add machine to global MachineList
......
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