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

Priority and NextStage scheduling rule changed to work in ascending order...

Priority and NextStage scheduling rule changed to work in ascending order (i.e. lowest priority value first). This should be reflected to documentation! In Topology20 input all the priority values p have been changed to -p so that it gives the same result and passes the test
parent 238f044e
......@@ -92,7 +92,7 @@
"J1": {
"_class": "Dream.Job",
"name": "Job1",
"priority": "-1",
"priority": "1",
"dueDate": "900",
"orderDate": "0",
"route": [
......@@ -133,7 +133,7 @@
"J2": {
"_class": "Dream.Job",
"name": "Job2",
"priority": "7",
"priority": "-7",
"dueDate": "100",
"orderDate": "-1",
"route": [
......@@ -174,7 +174,7 @@
"J3": {
"_class": "Dream.Job",
"name": "Job3",
"priority": "12",
"priority": "-12",
"dueDate": "60",
"orderDate": "2",
"route": [
......
......@@ -222,7 +222,7 @@ class Queue(CoreObject):
pass
#if the schedulingRule is based on a pre-defined priority
elif criterion=="Priority":
activeObjectQ.sort(key=lambda x: x.priority, reverse=True)
activeObjectQ.sort(key=lambda x: x.priority)
#if the schedulingRule is earliest due date
elif criterion=="EDD":
activeObjectQ.sort(key=lambda x: x.dueDate)
......@@ -257,7 +257,7 @@ class Queue(CoreObject):
if obj.id==nextObjId:
nextObject=obj
entity.nextQueueLength=len(nextObject.Res.activeQ)
activeObjectQ.sort(key=lambda x: x.nextQueueLength, reverse=True)
activeObjectQ.sort(key=lambda x: x.nextQueueLength)
#outputs message to the trace.xls. Format is (Simulation Time | Entity Name | message)
......
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