From d575804ca9f165e0885ff6844eaac3a46b20dd8f Mon Sep 17 00:00:00 2001 From: pritchardn <21726929@student.uwa.edu.au> Date: Tue, 20 Sep 2022 09:43:07 +0800 Subject: [PATCH 1/4] Removes 'simple' algorithm option (it does not exist in DALiuGE) --- src/Config.ts | 3 +-- templates/translation_menu.html | 32 -------------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/src/Config.ts b/src/Config.ts index 9f7abc084..a0a75269b 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -36,8 +36,7 @@ export class Config { "metis", "mysarkar", "min_num_parts", - "pso", - "simple" + "pso" ]; static readonly DALIUGE_PARAMETER_NAMES = [ diff --git a/templates/translation_menu.html b/templates/translation_menu.html index e5a1cddb2..44ee335c5 100644 --- a/templates/translation_menu.html +++ b/templates/translation_menu.html @@ -223,38 +223,6 @@
- -
-
-
- -
-
-
-
- -
-
- No. of nodes -
- -
-
-
- No. of parallel task streams -
- -
- -

- - - -
-
-
Rmode From 9692e70ae4d8e8cd22c093041c367124374fcfab Mon Sep 17 00:00:00 2001 From: pritchardn <21726929@student.uwa.edu.au> Date: Tue, 20 Sep 2022 10:10:02 +0800 Subject: [PATCH 2/4] Adds node option to all translation algorithms. --- templates/translation_menu.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/templates/translation_menu.html b/templates/translation_menu.html index 44ee335c5..e09643ae6 100644 --- a/templates/translation_menu.html +++ b/templates/translation_menu.html @@ -86,6 +86,12 @@
+
+
+ No. of nodes +
+ +
Partition label @@ -125,6 +131,12 @@
+
+
+ No. of nodes +
+ +
Greediness of deadline pursuit @@ -182,6 +194,12 @@
+
+
+ No. of nodes +
+ +
Swarm size From c422c525d9d075cf62454e01e30d7d30a924952a Mon Sep 17 00:00:00 2001 From: pritchardn <21726929@student.uwa.edu.au> Date: Tue, 20 Sep 2022 10:54:18 +0800 Subject: [PATCH 3/4] Removes 'None' algorithm option, it cannot be shown in GOJS or launched without partition data. --- templates/translation_menu.html | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/templates/translation_menu.html b/templates/translation_menu.html index e09643ae6..39eb57cbb 100644 --- a/templates/translation_menu.html +++ b/templates/translation_menu.html @@ -2,24 +2,6 @@
- -
-
-
- -
-
-
-
-

Base PGT Generation

- - -
-
-
-
From 882e9f563651cc129aa0899fda89336350ab489f Mon Sep 17 00:00:00 2001 From: pritchardn <21726929@student.uwa.edu.au> Date: Tue, 20 Sep 2022 14:29:01 +0800 Subject: [PATCH 4/4] Replaces algorithm index notation for genGPT calls with strings directly. --- src/Config.ts | 9 --------- src/Translator.ts | 15 ++++++++------- templates/translation_menu.html | 16 ++++++++-------- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/Config.ts b/src/Config.ts index b14f8e70d..2bfae5c7a 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -30,15 +30,6 @@ export class Config { static readonly paletteNodeHeight : number = 22; static readonly paletteNodeWidth : number = 130; - // translation algorithms - static readonly translationAlgorithms = [ - "none", - "metis", - "mysarkar", - "min_num_parts", - "pso" - ]; - static readonly DALIUGE_PARAMETER_NAMES = [ "data_volume", "execution_time", diff --git a/src/Translator.ts b/src/Translator.ts index ee8de2a5c..4d48dc485 100644 --- a/src/Translator.ts +++ b/src/Translator.ts @@ -24,7 +24,6 @@ import * as ko from "knockout"; -import {Config} from './Config'; import {Eagle} from './Eagle'; import {LogicalGraph} from './LogicalGraph'; import {Setting} from './Setting'; @@ -108,9 +107,11 @@ export class Translator { //----------------- Physical Graph Generation -------------------------------- /** * Generate Physical Graph Template. - * @param algorithmIndex Algorithm number. + * @param algorithmName + * @param testingMode + * @param format */ - genPGT = (algorithmIndex : number, testingMode: boolean, format: Eagle.DALiuGESchemaVersion) : void => { + genPGT = (algorithmName : string, testingMode: boolean, format: Eagle.DALiuGESchemaVersion) : void => { const eagle: Eagle = Eagle.getInstance(); if (eagle.logicalGraph().getNumNodes() === 0) { @@ -124,7 +125,7 @@ export class Translator { } const translatorURL : string = Setting.findValue(Utils.TRANSLATOR_URL); - console.log("Eagle.getPGT() : algorithm index:", algorithmIndex, "algorithm name:", Config.translationAlgorithms[algorithmIndex], "translator URL", translatorURL); + console.log("Eagle.getPGT() : ", "algorithm name:", algorithmName, "translator URL", translatorURL); // set the schema version format = Eagle.DALiuGESchemaVersion.OJS; @@ -146,10 +147,10 @@ export class Translator { this._genPGT(eagle, translatorURL, algorithmIndex, testingMode, format); } */ - this._genPGT(eagle, translatorURL, algorithmIndex, testingMode, format); + this._genPGT(eagle, translatorURL, algorithmName, testingMode, format); } - private _genPGT = (eagle: Eagle, translatorURL: string, algorithmIndex : number, testingMode: boolean, format: Eagle.DALiuGESchemaVersion) : void => { + private _genPGT = (eagle: Eagle, translatorURL: string, algorithmName : string, testingMode: boolean, format: Eagle.DALiuGESchemaVersion) : void => { // get json for logical graph let json; switch (format){ @@ -173,7 +174,7 @@ export class Translator { } const translatorData = { - algo: Config.translationAlgorithms[algorithmIndex], + algo: algorithmName, lg_name: eagle.logicalGraph().fileInfo().name, json_data: JSON.stringify(json), test: testingMode.toString() diff --git a/templates/translation_menu.html b/templates/translation_menu.html index e302578c0..39f3a6263 100644 --- a/templates/translation_menu.html +++ b/templates/translation_menu.html @@ -44,8 +44,8 @@

- - + +
@@ -89,8 +89,8 @@

- - + + @@ -152,8 +152,8 @@

- - + + @@ -218,8 +218,8 @@

- - + +