Commit ea1511f7 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Sebastien Robin

Dismantle object updated and tested in topologies 13 and 14. Also a bug fixed...

Dismantle object updated and tested in topologies 13 and 14. Also a bug fixed in Machine postProcessing method
parent 0fd36163
*.pyc *.pyc
\ No newline at end of file *.project
*.pydevproject
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ManPy</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/ManPy/src</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>
...@@ -159,8 +159,7 @@ class Assembly(Process): ...@@ -159,8 +159,7 @@ class Assembly(Process):
#if there is an entity that finished processing in Assembly but did not get to reach #if there is an entity that finished processing in Assembly but did not get to reach
#the following Object #the following Object
#till the end of simulation, we have to add this blockage to the percentage of blockage in Machine #till the end of simulation, we have to add this blockage to the percentage of blockage in Assembly
#we should exclude the blockage time in current entity though!
if (len(self.next[0].Res.activeQ)>0) and ((self.nameLastEntityEntered == self.nameLastEntityEnded)): if (len(self.next[0].Res.activeQ)>0) and ((self.nameLastEntityEntered == self.nameLastEntityEnded)):
self.totalBlockageTime+=now()-self.timeLastEntityEnded self.totalBlockageTime+=now()-self.timeLastEntityEnded
......
...@@ -83,8 +83,9 @@ class Dismantle(Process): ...@@ -83,8 +83,9 @@ class Dismantle(Process):
yield waituntil, self, self.canAcceptAndIsRequested #wait until the Assembly can accept a frame yield waituntil, self, self.canAcceptAndIsRequested #wait until the Assembly can accept a frame
#and one "frame" predecessor requests it #and one "frame" predecessor requests it
self.getEntity() #get the Frame with the parts self.getEntity() #get the Frame with the parts
self.timeLastEntityEntered=now()
self.outputTrace(self.Res.activeQ[0].name, " got into "+ self.objName) self.outputTrace(self.Res.activeQ[0].name, "got into "+ self.objName)
startWorkingTime=now() startWorkingTime=now()
yield hold,self,self.rng.generateNumber() #hold for the time the dismantle operation is carried yield hold,self,self.rng.generateNumber() #hold for the time the dismantle operation is carried
...@@ -188,18 +189,15 @@ class Dismantle(Process): ...@@ -188,18 +189,15 @@ class Dismantle(Process):
#actions to be taken after the simulation ends #actions to be taken after the simulation ends
def postProcessing(self, MaxSimtime): def postProcessing(self, MaxSimtime):
'''
#if there is an entity that finished processing in Dismantle but did not get to reach #if there is an entity that finished processing in Dismantle but did not get to reach
#the following Object #the following Object
#till the end of simulation, we have to add this blockage to the percentage of blockage in Machine #till the end of simulation, we have to add this blockage to the percentage of blockage in Dismantle
#we should exclude the blockage time in current entity though! if (len(self.Res.activeQ)>0) and (self.waitToDisposeFrame) or (self.waitToDisposePart):
if (len(self.next[0].Res.activeQ)>0) and ((self.nameLastEntityEntered == self.nameLastEntityEnded)):
self.totalBlockageTime+=now()-self.timeLastEntityEnded self.totalBlockageTime+=now()-self.timeLastEntityEnded
'''
#if Dismantle is currently processing an entity we should count this working time #if Dismantle is currently processing an entity we should count this working time
if(len(self.Res.activeQ)>0) and (not (self.nameLastEntityEnded==self.nameLastFrameWasFull)): if(len(self.Res.activeQ)>0) and (not ((self.waitToDisposeFrame) or (self.waitToDisposePart))):
self.totalWorkingTime+=now()-self.timeLastEntityEnded self.totalWorkingTime+=now()-self.timeLastEntityEntered
self.totalWaitingTime=MaxSimtime-self.totalWorkingTime-self.totalBlockageTime self.totalWaitingTime=MaxSimtime-self.totalWorkingTime-self.totalBlockageTime
......
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": "1"
}, },
"successorPartList": ["E1"], "successorPartList": ["E2"],
"successorFrameList": ["E2"], "successorFrameList": ["E1"],
"predecessorList": ["M1"] "predecessorList": ["M1"]
}, },
{"_class": "Dream.Exit", {"_class": "Dream.Exit",
......
{"_class": "Dream.Simulation",
"general": {
"_class": "Dream.Configuration",
"numberOfReplications": "1",
"maxSimTime": "1440",
"trace": "Yes",
"confidenceLevel": "0.95"
},
"modelResource": [
],
"coreObject": [
{"_class": "Dream.Source",
"id": "S1",
"name": "Parts",
"interarrivalTime":
{
"distributionType": "Fixed",
"mean": "0.5"
},
"entity": "Part",
"successorList": ["Α1"]
},
{"_class": "Dream.Source",
"id": "S2",
"name": "Frames",
"interarrivalTime":
{
"distributionType": "Fixed",
"mean": "2"
},
"entity": "Frame",
"successorList": ["Α1"]
},
{"_class": "Dream.Assembly",
"id": "A1",
"name": "Assembly",
"processingTime": {
"distributionType": "Fixed",
"mean": "2"
},
"predecessorPartList": ["S1"],
"predecessorFrameList": ["S2"],
"successorList": ["M1"]
},
{"_class": "Dream.Machine",
"id": "M1",
"name": "Moulding",
"processingTime": {
"distributionType": "Fixed",
"mean": "0.25"
},
"failures":{
"failureDistribution": "Fixed",
"MTTF": "60",
"MTTR": "5",
"repairman": "None"
},
"predecessorList": ["A1"],
"successorList": ["D1"]
},
{"_class": "Dream.Dismantle",
"id": "D1",
"name": "Dismantle",
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"successorPartList": ["M3"],
"successorFrameList": ["M2"],
"predecessorList": ["M1"]
},
{"_class": "Dream.Machine",
"id": "M2",
"name": "Frame Wash",
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"failures":{
"failureDistribution": "No",
"MTTF": "60",
"MTTR": "5",
"repairman": "None"
},
"predecessorList": ["D1"],
"successorList": ["E1"]
},
{"_class": "Dream.Machine",
"id": "M3",
"name": "Part Wash",
"processingTime": {
"distributionType": "Fixed",
"mean": "0.20"
},
"failures":{
"failureDistribution": "No",
"MTTF": "60",
"MTTR": "5",
"repairman": "None"
},
"predecessorList": ["D1"],
"successorList": ["E2"]
},
{"_class": "Dream.Exit",
"id": "E1",
"name": "Parts Stock",
"predecessorList": ["M2"]
},
{"_class": "Dream.Exit",
"id": "E2",
"name": "Frames Stock",
"predecessorList": ["M3"]
}
]
}
...@@ -205,8 +205,8 @@ def setTopology(): ...@@ -205,8 +205,8 @@ def setTopology():
if G.ObjList[q].id==G.ObjList[i].previousFrameIds[j]: if G.ObjList[q].id==G.ObjList[i].previousFrameIds[j]:
previousFrame.append(G.ObjList[q]) previousFrame.append(G.ObjList[q])
G.ObjList[i].defineRouting(previousPart, previousFrame, next) G.ObjList[i].defineRouting(previousPart, previousFrame, next)
#Assembly should be changed to identify what the entity that it receives is. #Dispatch should be changed to identify what the the successor is.
#previousPart and previousFrame will become problematic #nextPart and nextFrame will become problematic
elif G.ObjList[i].type=="Dismantle": elif G.ObjList[i].type=="Dismantle":
nextPart=[] nextPart=[]
nextFrame=[] nextFrame=[]
......
...@@ -302,12 +302,10 @@ class Machine(Process): ...@@ -302,12 +302,10 @@ class Machine(Process):
#the following Object #the following Object
#till the end of simulation, we have to add this blockage to the percentage of blockage in Machine #till the end of simulation, we have to add this blockage to the percentage of blockage in Machine
#we should exclude the failure time in current entity though! #we should exclude the failure time in current entity though!
if (len(self.next[0].Res.activeQ)>0) and ((self.nameLastEntityEntered == self.nameLastEntityEnded)): if (len(self.Res.activeQ)>0) and (len(self.next[0].Res.activeQ)>0) and ((self.nameLastEntityEntered == self.nameLastEntityEnded)):
self.totalBlockageTime+=now()-(self.timeLastEntityEnded+self.downTimeInTryingToReleaseCurrentEntity) self.totalBlockageTime+=now()-(self.timeLastEntityEnded+self.downTimeInTryingToReleaseCurrentEntity)
#X=now()-(self.timeLastEntityEnded+self.downTimeInTryingToReleaseCurrentEntity)
if self.Up==False: if self.Up==False:
self.totalBlockageTime-=now()-self.timeLastFailure self.totalBlockageTime-=now()-self.timeLastFailure
#X-=now()-self.timeLastFailure
alreadyAdded=True alreadyAdded=True
#if Machine is currently processing an entity we should count this working time #if Machine is currently processing an entity we should count this working time
......
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