Commit 4b470bb7 authored by Georgios Dagkakis's avatar Georgios Dagkakis

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 a1556795
*.pyc
\ No newline at end of file
*.pyc
*.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):
#if there is an entity that finished processing in Assembly but did not get to reach
#the following Object
#till the end of simulation, we have to add this blockage to the percentage of blockage in Machine
#we should exclude the blockage time in current entity though!
#till the end of simulation, we have to add this blockage to the percentage of blockage in Assembly
if (len(self.next[0].Res.activeQ)>0) and ((self.nameLastEntityEntered == self.nameLastEntityEnded)):
self.totalBlockageTime+=now()-self.timeLastEntityEnded
......
......@@ -83,8 +83,9 @@ class Dismantle(Process):
yield waituntil, self, self.canAcceptAndIsRequested #wait until the Assembly can accept a frame
#and one "frame" predecessor requests it
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()
yield hold,self,self.rng.generateNumber() #hold for the time the dismantle operation is carried
......@@ -188,18 +189,15 @@ class Dismantle(Process):
#actions to be taken after the simulation ends
def postProcessing(self, MaxSimtime):
'''
#if there is an entity that finished processing in Dismantle but did not get to reach
#the following Object
#till the end of simulation, we have to add this blockage to the percentage of blockage in Machine
#we should exclude the blockage time in current entity though!
if (len(self.next[0].Res.activeQ)>0) and ((self.nameLastEntityEntered == self.nameLastEntityEnded)):
#till the end of simulation, we have to add this blockage to the percentage of blockage in Dismantle
if (len(self.Res.activeQ)>0) and (self.waitToDisposeFrame) or (self.waitToDisposePart):
self.totalBlockageTime+=now()-self.timeLastEntityEnded
'''
#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)):
self.totalWorkingTime+=now()-self.timeLastEntityEnded
if(len(self.Res.activeQ)>0) and (not ((self.waitToDisposeFrame) or (self.waitToDisposePart))):
self.totalWorkingTime+=now()-self.timeLastEntityEntered
self.totalWaitingTime=MaxSimtime-self.totalWorkingTime-self.totalBlockageTime
......
......@@ -65,8 +65,8 @@
"distributionType": "Fixed",
"mean": "1"
},
"successorPartList": ["E1"],
"successorFrameList": ["E2"],
"successorPartList": ["E2"],
"successorFrameList": ["E1"],
"predecessorList": ["M1"]
},
{"_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():
if G.ObjList[q].id==G.ObjList[i].previousFrameIds[j]:
previousFrame.append(G.ObjList[q])
G.ObjList[i].defineRouting(previousPart, previousFrame, next)
#Assembly should be changed to identify what the entity that it receives is.
#previousPart and previousFrame will become problematic
#Dispatch should be changed to identify what the the successor is.
#nextPart and nextFrame will become problematic
elif G.ObjList[i].type=="Dismantle":
nextPart=[]
nextFrame=[]
......
......@@ -302,12 +302,10 @@ class Machine(Process):
#the following Object
#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!
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)
#X=now()-(self.timeLastEntityEnded+self.downTimeInTryingToReleaseCurrentEntity)
if self.Up==False:
self.totalBlockageTime-=now()-self.timeLastFailure
#X-=now()-self.timeLastFailure
alreadyAdded=True
#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