Commit f6869dbb authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Jérome Perrin

Topology34 updated according the new notation - agreement with ulbranch

parent e6a09767
......@@ -36,7 +36,7 @@ from Exit import Exit
class ExitJobShop(Exit):
# =======================================================================
# set all the objects in previous
# ===========================================================================
# =======================================================================
def initialize(self):
from Globals import G
self.previous=G.ObjList
......
......@@ -45,7 +45,9 @@
"route": [
{
"stepNumber": "0",
"stationId": "Q1",
"stationIdsList": [
"Q1"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
......@@ -53,7 +55,9 @@
},
{
"stepNumber": "1",
"stationId": "M1",
"stationIdsList": [
"M1"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0.25"
......@@ -61,7 +65,9 @@
},
{
"stepNumber": "2",
"stationId": "Q2",
"stationIdsList": [
"Q2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
......@@ -69,7 +75,9 @@
},
{
"stepNumber": "3",
"stationId": "M2",
"stationIdsList": [
"M2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
......@@ -94,7 +102,9 @@
"route": [
{
"stepNumber": "0",
"stationId": "Q2",
"stationIdsList": [
"Q2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
......@@ -102,7 +112,9 @@
},
{
"stepNumber": "1",
"stationId": "M2",
"stationIdsList": [
"M2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
......
......@@ -57,18 +57,19 @@ class MachinePreemptive(MachineJobShop):
else:
remainingProcessingTime=self.procTime-(now()-self.timeLastEntityEntered)
#update the remaining route of activeEntity
activeEntity.remainingRoute.insert(0, {'stationIdsList':str([self.id]),\
activeEntity.remainingRoute.insert(0, {'stationIdsList':[str(self.id)],\
'processingTime':\
{'distributionType':'Fixed',\
'mean':str(remainingProcessingTime)}})
# activeEntity.remainingRoute.insert(0, [self.id, remainingProcessingTime])
activeEntity.remainingRoute.insert(0, {'stationIdsList':str([self.lastGiver.id]),\
activeEntity.remainingRoute.insert(0, {'stationIdsList':[str(self.lastGiver.id)],\
'processingTime':\
{'distributionType':'Fixed',\
'mean':'0'}})
# activeEntity.remainingRoute.insert(0, [self.lastGiver.id, 0])
#set the receiver as the object where the active entity was preempted from
self.receiver=self.lastGiver
self.next=[self.receiver]
self.waitToDispose=True #set that I have to dispose
reactivate(self)
......
......@@ -74,7 +74,7 @@ class QueueJobShop(Queue):
activeObject.receiver=activeObject.next[0]
return len(activeObjectQueue)>0\
and thecaller==activeObject.receiver
#give the entity to the possible receiver that is waiting for the most time.
#plant does not do this in every occasion!
maxTimeWaiting=0
......@@ -106,9 +106,4 @@ class QueueJobShop(Queue):
activeEntity.remainingRoute.pop(0) #remove data from the remaining route of the entity
return activeEntity
\ No newline at end of file
......@@ -5,35 +5,43 @@
"isCritical": "1",
"route": [
{
"stationIdsList": [
"Q1"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stationId": "Q1",
"stepNumber": "0"
},
{
"stationIdsList": [
"M1"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0.25"
},
"stationId": "M1",
"stepNumber": "1"
},
{
"stationIdsList": [
"Q2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stationId": "Q2",
"stepNumber": "2"
},
{
"stationIdsList": [
"M2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"stationId": "M2",
"stepNumber": "3"
}
],
......@@ -77,19 +85,23 @@
"isCritical": "0",
"route": [
{
"stationIdsList": [
"Q2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stationId": "Q2",
"stepNumber": "0"
},
{
"stationIdsList": [
"M2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"stationId": "M2",
"stepNumber": "1"
}
],
......
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