Closed MartinRepo closed 3 months ago
For 4 algorithms
After, combine all results into a json and return to front-end.
JSON should looks like
[ [ { "algorithm": "Feasible graph", "dataset": "scenario1 dataset1", "Total Power Cost": 72 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario1 dataset1", "Total Power Cost": 66 }, { "algorithm": "Genetic", "dataset": "scenario1 dataset1", "Total Power Cost": 75 }, { "algorithm": "Greedy", "dataset": "scenario1 dataset1", "Total Power Cost": 63 }, { "algorithm": "Feasible graph", "dataset": "scenario2 dataset1", "Total Power Cost": 75 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario2 dataset1", "Total Power Cost": 59 }, { "algorithm": "Genetic", "dataset": "scenario2 dataset1", "Total Power Cost": 63 }, { "algorithm": "Greedy", "dataset": "scenario2 dataset1", "Total Power Cost": 50 }, { "algorithm": "Feasible graph", "dataset": "scenario3 dataset1", "Total Power Cost": 66 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario3 dataset1", "Total Power Cost": 44 }, { "algorithm": "Genetic", "dataset": "scenario3 dataset1", "Total Power Cost": 69 }, { "algorithm": "Greedy", "dataset": "scenario3 dataset1", "Total Power Cost": 47 }, { "algorithm": "Feasible graph", "dataset": "scenario4 dataset1", "Total Power Cost": 114 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario4 dataset1", "Total Power Cost": 102 }, { "algorithm": "Genetic", "dataset": "scenario4 dataset1", "Total Power Cost": 98 }, { "algorithm": "Greedy", "dataset": "scenario4 dataset1", "Total Power Cost": 92 } ], [ { "algorithm": "Feasible graph", "dataset": "scenario1 dataset1", "Peak Power Cost": 14 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario1 dataset1", "Peak Power Cost": 12 }, { "algorithm": "Genetic", "dataset": "scenario1 dataset1", "Peak Power Cost": 11 }, { "algorithm": "Greedy", "dataset": "scenario1 dataset1", "Peak Power Cost": 9 }, { "algorithm": "Feasible graph", "dataset": "scenario2 dataset1", "Peak Power Cost": 20 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario2 dataset1", "Peak Power Cost": 15 }, { "algorithm": "Genetic", "dataset": "scenario2 dataset1", "Peak Power Cost": 13 }, { "algorithm": "Greedy", "dataset": "scenario2 dataset1", "Peak Power Cost": 10 }, { "algorithm": "Feasible graph", "dataset": "scenario3 dataset1", "Peak Power Cost": 13 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario3 dataset1", "Peak Power Cost": 14 }, { "algorithm": "Genetic", "dataset": "scenario3 dataset1", "Peak Power Cost": 11 }, { "algorithm": "Greedy", "dataset": "scenario3 dataset1", "Peak Power Cost": 9 }, { "algorithm": "Feasible graph", "dataset": "scenario4 dataset1", "Peak Power Cost": 23 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario4 dataset1", "Peak Power Cost": 19 }, { "algorithm": "Genetic", "dataset": "scenario4 dataset1", "Peak Power Cost": 11 }, { "algorithm": "Greedy", "dataset": "scenario4 dataset1", "Peak Power Cost": 16 } ], [ { "algorithm": "Feasible graph", "dataset": "scenario1 dataset1", "Running Time /ms": 66 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario1 dataset1", "Running Time /ms": 59 }, { "algorithm": "Genetic", "dataset": "scenario1 dataset1", "Running Time /ms": 110 }, { "algorithm": "Greedy", "dataset": "scenario1 dataset1", "Running Time /ms": 30 }, { "algorithm": "Feasible graph", "dataset": "scenario2 dataset1", "Running Time /ms": 33 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario2 dataset1", "Running Time /ms": 44 }, { "algorithm": "Genetic", "dataset": "scenario2 dataset1", "Running Time /ms": 75 }, { "algorithm": "Greedy", "dataset": "scenario2 dataset1", "Running Time /ms": 28 }, { "algorithm": "Feasible graph", "dataset": "scenario3 dataset1", "Running Time /ms": 44 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario3 dataset1", "Running Time /ms": 56 }, { "algorithm": "Genetic", "dataset": "scenario3 dataset1", "Running Time /ms": 78 }, { "algorithm": "Greedy", "dataset": "scenario3 dataset1", "Running Time /ms": 36 }, { "algorithm": "Feasible graph", "dataset": "scenario4 dataset1", "Running Time /ms": 70 }, { "algorithm": "Fixed Param Tractable", "dataset": "scenario4 dataset1", "Running Time /ms": 48 }, { "algorithm": "Genetic", "dataset": "scenario4 dataset1", "Running Time /ms": 121 }, { "algorithm": "Greedy", "dataset": "scenario4 dataset1", "Running Time /ms": 44 } ], ]
Total cost - done ✅
Peak cost, Running time, summary - done ✅
For 4 algorithms
After, combine all results into a json and return to front-end.
JSON should looks like