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
...@@ -570,6 +570,11 @@ def createObjects(): ...@@ -570,6 +570,11 @@ def createObjects():
# if(id in operator.coreObjectIds): # (if any) is assigned to operate # if(id in operator.coreObjectIds): # (if any) is assigned to operate
# machineOperatorPoolList.append(operator) # the machine with ID equal to id # machineOperatorPoolList.append(operator) # the machine with ID equal to id
# # if there is no operator assigned then the list will be empty # # 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, OM=OperatedMachine(id, name, 1, distribution=distributionType, failureDistribution=failureDistribution,
MTTF=MTTF, MTTR=MTTR, availability=availability, #repairman=r, MTTF=MTTF, MTTR=MTTR, availability=availability, #repairman=r,
...@@ -577,7 +582,8 @@ def createObjects(): ...@@ -577,7 +582,8 @@ def createObjects():
operatorPool=machineOperatorPoolList, operationType=operationType, operatorPool=machineOperatorPoolList, operationType=operationType,
loadDistribution=loadDistribution, setupDistribution=setupDistribution, loadDistribution=loadDistribution, setupDistribution=setupDistribution,
setupMean=setupMean,setupStdev=setupStdev,setupMin=setupMin,setupMax=setupMax, 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 OM.nextIds=getSuccessorList(id) # update the nextIDs list of the machine
G.OperatedMachineList.append(OM) # add the machine to the operatedMachines List G.OperatedMachineList.append(OM) # add the machine to the operatedMachines List
G.MachineList.append(OM) # add machine to global MachineList 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