Commit bd3c2d7f authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

naming convention in scheduling rules changed and also LPT and SPT were added....

naming convention in scheduling rules changed and also LPT and SPT were added. Documentation also updated to this
parent 638bc147
No preview for this file type
......@@ -76,17 +76,17 @@ Below are initial lists of scheduling rules to be considered for each of the que
I believe the ability to attribute each of these lists to a queue object is the only requirements at GUI level. Everything henceforth is a ManPy and Optimization business.
'''
#M1Options = ['EDD','WINQ','LPT','SPT','SRR','ERD','PCO','MS'] #initial list of scheduling rules that are to be randomly used for each of the machines
#M2Options = ['EDD','WINQ','LPT','SPT','SRR','ERD','PCO','MS']
#M3Options = ['EDD','WINQ','LPT','SPT','SRR','ERD','PCO','MS']
#M4Options = ['EDD','WINQ','LPT','SPT','SRR','ERD','PCO','MS']
#M5Options = ['EDD','WINQ','LPT','SPT','SRR','ERD','PCO','MS']
M1Options = ['EDD','WINQ','LPT','SPT','ERD','PCO','MS'] #initial list of scheduling rules that are to be randomly used for each of the machines
M2Options = ['EDD','WINQ','LPT','SPT','ERD','PCO','MS']
M3Options = ['EDD','WINQ','LPT','SPT','ERD','PCO','MS']
M4Options = ['EDD','WINQ','LPT','SPT','ERD','PCO','MS']
M5Options = ['EDD','WINQ','LPT','SPT','ERD','PCO','MS']
M1Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages'] #initial list of scheduling rules that are to be randomly used for each of the machines
M2Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages']
M3Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages']
M4Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages']
M5Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages']
#M1Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages'] #initial list of scheduling rules that are to be randomly used for each of the machines
#M2Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages']
#M3Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages']
#M4Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages']
#M5Options = ['EDD','NextStage','EOD','Priority','RPC','MinSlack','NumStages']
#Optimization takes over from here and it calls ManPy simulation at intervals using the sim function
def main():
......
......@@ -236,9 +236,21 @@ class Queue(CoreObject):
for step in entity.remainingRoute:
RPT+=step[1]
entity.remainingProcessingTime=RPT
activeObjectQ.sort(key=lambda x: x.remainingProcessingTime, reverse=True)
activeObjectQ.sort(key=lambda x: x.remainingProcessingTime, reverse=True)
#if the schedulingRule is to sort Entities according to longest processing time first in the next station
elif criterion=="LPT":
for entity in activeObjectQ:
LPT=0
entity.processingTimeInNextStation=entity.remainingRoute[0][1]
activeObjectQ.sort(key=lambda x: x.processingTimeInNextStation, reverse=True)
#if the schedulingRule is to sort Entities according to shortest processing time first in the next station
elif criterion=="SPT":
for entity in activeObjectQ:
LPT=0
entity.processingTimeInNextStation=entity.remainingRoute[0][1]
activeObjectQ.sort(key=lambda x: x.processingTimeInNextStation)
#if the schedulingRule is to sort Entities based on the minimum slackness
elif criterion=="MinSlack":
elif criterion=="MS":
for entity in activeObjectQ:
RPT=0
for step in entity.remainingRoute:
......@@ -246,13 +258,13 @@ class Queue(CoreObject):
entity.remainingProcessingTime=RPT
activeObjectQ.sort(key=lambda x: (x.dueDate-x.remainingProcessingTime))
#if the schedulingRule is to sort Entities based on the length of the following Queue
elif criterion=="NextStage":
elif criterion=="WINQ":
from Globals import G
for entity in activeObjectQ:
nextObjId=entity.remainingRoute[1][0]
for obj in G.ObjList:
if obj.id==nextObjId:
nextObject=obj
entity.nextQueueLength=len(nextObject.Res.activeQ)
entity.nextQueueLength=len(nextObject.getActiveObjectQueue())
activeObjectQ.sort(key=lambda x: x.nextQueueLength)
\ No newline at end of file
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