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

test dums corrected after correction in sortOperators method

parent 9759fb64
......@@ -361,7 +361,6 @@ class Router(ObjectInterruption):
op.waitingTime=self.env.now-op.schedule[-1][-1]
elif self.env.now>0:
op.waitingTime=self.env.now
print 'before', [[x.id, x.waitingTime] for x in self.candidateOperators]
self.candidateOperators.sort(key=lambda x: x.waitingTime, reverse=True)
#===========================================================================
......
......@@ -90,8 +90,8 @@
"family": "Operator",
"id": "O1",
"results": {
"waiting_ratio": 100.0,
"working_ratio": 0.0
"waiting_ratio": 66.66666666666667,
"working_ratio": 33.333333333333336
}
},
{
......@@ -99,8 +99,8 @@
"family": "Operator",
"id": "O2",
"results": {
"waiting_ratio": 50.0,
"working_ratio": 50.0
"waiting_ratio": 83.33333333333333,
"working_ratio": 16.666666666666668
}
},
{
......
......@@ -87,8 +87,8 @@
"family": "Operator",
"id": "O1",
"results": {
"waiting_ratio": 100.0,
"working_ratio": 0.0
"waiting_ratio": 50.0,
"working_ratio": 50.0
}
},
{
......@@ -96,8 +96,8 @@
"family": "Operator",
"id": "O2",
"results": {
"waiting_ratio": 0.0,
"working_ratio": 100.0
"waiting_ratio": 50.0,
"working_ratio": 50.0
}
},
{
......
......@@ -264,8 +264,8 @@
"family": "Operator",
"id": "O1",
"results": {
"waiting_ratio": 68.75,
"working_ratio": 31.25
"waiting_ratio": 62.5,
"working_ratio": 37.5
}
},
{
......@@ -273,8 +273,8 @@
"family": "Operator",
"id": "O2",
"results": {
"waiting_ratio": 25.0,
"working_ratio": 75.0
"waiting_ratio": 31.25,
"working_ratio": 68.75
}
},
{
......
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