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

attribute name change to solve conflict

parent 2eb6c0b6
...@@ -207,8 +207,8 @@ class Operator(ObjectResource): ...@@ -207,8 +207,8 @@ class Operator(ObjectResource):
processingTime=step.get('processingTime',{}) processingTime=step.get('processingTime',{})
if processingTime: if processingTime:
RPT+=float(processingTime.get('Fixed',{}).get('mean',0)) RPT+=float(processingTime.get('Fixed',{}).get('mean',0))
entity.remainingProcessingTime=RPT entity.totalRemainingProcessingTime=RPT
activeObjectQ.sort(key=lambda x: x.remainingProcessingTime, reverse=True) activeObjectQ.sort(key=lambda x: x.totalRemainingProcessingTime, reverse=True)
#if the schedulingRule is to sort Entities according to longest processing time first in the next station #if the schedulingRule is to sort Entities according to longest processing time first in the next station
elif criterion=="LPT": elif criterion=="LPT":
for entity in activeObjectQ: for entity in activeObjectQ:
...@@ -238,8 +238,8 @@ class Operator(ObjectResource): ...@@ -238,8 +238,8 @@ class Operator(ObjectResource):
processingTime=step.get('processingTime',{}) processingTime=step.get('processingTime',{})
if processingTime: if processingTime:
RPT+=float(processingTime.get('Fixed',{}).get('mean',0)) RPT+=float(processingTime.get('Fixed',{}).get('mean',0))
entity.remainingProcessingTime=RPT entity.totalRemainingProcessingTime=RPT
activeObjectQ.sort(key=lambda x: (x.dueDate-x.remainingProcessingTime)) activeObjectQ.sort(key=lambda x: (x.dueDate-x.totalRemainingProcessingTime))
#if the schedulingRule is to sort Entities based on the length of the following Queue #if the schedulingRule is to sort Entities based on the length of the following Queue
elif criterion=="WINQ": elif criterion=="WINQ":
from Globals import G from Globals import G
......
...@@ -275,8 +275,8 @@ class Queue(CoreObject): ...@@ -275,8 +275,8 @@ class Queue(CoreObject):
processingTime=step.get('processingTime',None) processingTime=step.get('processingTime',None)
if processingTime: if processingTime:
RPT+=float(processingTime.get('Fixed',{}).get('mean',0)) RPT+=float(processingTime.get('Fixed',{}).get('mean',0))
entity.remainingProcessingTime=RPT entity.totalRemainingProcessingTime=RPT
activeObjectQ.sort(key=lambda x: x.remainingProcessingTime, reverse=True) activeObjectQ.sort(key=lambda x: x.totalRemainingProcessingTime, reverse=True)
#if the schedulingRule is to sort Entities according to longest processing time first in the next station #if the schedulingRule is to sort Entities according to longest processing time first in the next station
elif criterion=="LPT": elif criterion=="LPT":
for entity in activeObjectQ: for entity in activeObjectQ:
...@@ -303,8 +303,8 @@ class Queue(CoreObject): ...@@ -303,8 +303,8 @@ class Queue(CoreObject):
processingTime=step.get('processingTime',None) processingTime=step.get('processingTime',None)
if processingTime: if processingTime:
RPT+=float(processingTime.get('Fixed',{}).get('mean',0)) RPT+=float(processingTime.get('Fixed',{}).get('mean',0))
entity.remainingProcessingTime=RPT entity.totalRemainingProcessingTime=RPT
activeObjectQ.sort(key=lambda x: (x.dueDate-x.remainingProcessingTime)) activeObjectQ.sort(key=lambda x: (x.dueDate-x.totalRemainingProcessingTime))
#if the schedulingRule is to sort Entities based on the length of the following Queue #if the schedulingRule is to sort Entities based on the length of the following Queue
elif criterion=="WINQ": elif criterion=="WINQ":
from Globals import G from Globals import G
......
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