Commit 7dc0cc78 authored by Jérome Perrin's avatar Jérome Perrin

Output queues in results

This is mostly to have an id in the result json and be able to display it as a
station for gantt by station
parent 7bca22bf
......@@ -381,7 +381,7 @@
$.each(data['success'].elementList, function (idx, obj) {
if (obj.results.working_ratio !== undefined) {
if (obj.results !== undefined && obj.results.working_ratio !== undefined) {
/* when there is only one replication, the ratio is given as a float,
otherwise we have a mapping avg, min max */
if (obj.results.blockage_ratio !== undefined) {
......
......@@ -278,3 +278,9 @@ class Queue(CoreObject):
else:
assert False, "Unknown scheduling criterion %r" % (criterion, )
def outputResultsJSON(self):
from Globals import G
json = {'_class': 'Dream.%s' % self.__class__.__name__,
'id': str(self.id),
'schedulingRule': self.schedulingRule}
G.outputJSON['elementList'].append(json)
{
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......@@ -29,6 +34,11 @@
"waiting_ratio": 3.888888888888889
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Repairman",
"id": "W1",
......
{
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......
{
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......@@ -29,6 +34,11 @@
"waiting_ratio": 0.0
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Repairman",
"id": "W1",
......
......@@ -37,6 +37,11 @@
"failure_ratio": 19.444444444444443,
"waiting_ratio": 18.368055555555557
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
{
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......@@ -39,6 +44,11 @@
"waiting_ratio": 18.680555555555557
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Repairman",
"id": "W1",
......
......@@ -38,6 +38,11 @@
"failure_ratio": 0.0,
"waiting_ratio": 1.875
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -48,6 +48,11 @@
"failure_ratio": 0.0,
"waiting_ratio": 0.017361111111111112
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -48,6 +48,11 @@
"failure_ratio": 0.0,
"waiting_ratio": 0.052083333333333336
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
{
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......@@ -39,6 +44,11 @@
"waiting_ratio": 0.10416666666666667
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Repairman",
"id": "W1",
......
{
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......@@ -49,6 +54,11 @@
"waiting_ratio": 0.1388888888888889
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Repairman",
"id": "W1",
......
......@@ -9,6 +9,11 @@
"waiting_ratio": 6.887731481480949
}
},
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......
......@@ -9,6 +9,11 @@
"waiting_ratio": 6.601851851851579
}
},
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......
{
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......@@ -28,6 +33,11 @@
"failure_ratio": 19.444444444444443,
"waiting_ratio": 3.1944444444444446
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -143,6 +143,21 @@
"failure_ratio": 0.0,
"waiting_ratio": 50.0
}
},
{
"_class": "Dream.QueueJobShop",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.QueueJobShop",
"id": "Q2",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.QueueJobShop",
"id": "Q3",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -248,6 +248,21 @@
"failure_ratio": 0.0,
"waiting_ratio": 69.23076923076923
}
},
{
"_class": "Dream.QueueJobShop",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.QueueJobShop",
"id": "Q2",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.QueueJobShop",
"id": "Q3",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -396,6 +396,21 @@
"failure_ratio": 0.0,
"waiting_ratio": 78.26086956521739
}
},
{
"_class": "Dream.QueueJobShop",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.QueueJobShop",
"id": "Q2",
"schedulingRule": "MC"
},
{
"_class": "Dream.QueueJobShop",
"id": "Q3",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -18,6 +18,11 @@
"failure_ratio": 0.0,
"waiting_ratio": 20.03472222222222
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -38,6 +38,16 @@
"failure_ratio": 0.0,
"waiting_ratio": 75.06944444444444
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Queue",
"id": "Q2",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -38,6 +38,16 @@
"failure_ratio": 0.0,
"waiting_ratio": 75.06944444444444
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.LineClearance",
"id": "Q2",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
{
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
......@@ -28,6 +33,11 @@
"failure_ratio": 0.0,
"waiting_ratio": 1.7361111111111112
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -38,6 +38,21 @@
"failure_ratio": 0.0,
"waiting_ratio": 7.566666666666668
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.LineClearance",
"id": "Q2",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Queue",
"id": "Q3",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -263,6 +263,21 @@
"failure_ratio": 0.0,
"waiting_ratio": 32.432432432432435
}
},
{
"_class": "Dream.QueueJobShop",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.QueueJobShop",
"id": "Q2",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.QueueJobShop",
"id": "Q3",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
......@@ -28,6 +28,16 @@
"failure_ratio": 0.0,
"waiting_ratio": 25.125
}
},
{
"_class": "Dream.Queue",
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Queue",
"id": "Q2",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
......
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