diff --git a/package.json b/package.json
index 174b854..f56b1fd 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
"vis-util": "^4.0.0",
"vue": "^2.6.10",
"vue-axios": "^2.1.5",
+ "vue-carousel": "^0.18.0",
"vue-chartjs": "^3.4.0",
"vue-cli": "^2.9.6",
"vue-codemirror": "^4.0.6",
diff --git a/public/img/Routing/clark/Step1.gif b/public/img/Routing/clark/Step1.gif
new file mode 100644
index 0000000..6f72c15
Binary files /dev/null and b/public/img/Routing/clark/Step1.gif differ
diff --git a/public/img/Routing/clark/Step2.gif b/public/img/Routing/clark/Step2.gif
new file mode 100644
index 0000000..882ad6c
Binary files /dev/null and b/public/img/Routing/clark/Step2.gif differ
diff --git a/public/img/Routing/clark/Step3.gif b/public/img/Routing/clark/Step3.gif
new file mode 100644
index 0000000..cee7fe0
Binary files /dev/null and b/public/img/Routing/clark/Step3.gif differ
diff --git a/public/img/Routing/clark/Step4.gif b/public/img/Routing/clark/Step4.gif
new file mode 100644
index 0000000..72b2808
Binary files /dev/null and b/public/img/Routing/clark/Step4.gif differ
diff --git a/public/img/Routing/sweep/Step1.gif b/public/img/Routing/sweep/Step1.gif
new file mode 100644
index 0000000..6f72c15
Binary files /dev/null and b/public/img/Routing/sweep/Step1.gif differ
diff --git a/public/img/Routing/sweep/Step2.gif b/public/img/Routing/sweep/Step2.gif
new file mode 100644
index 0000000..3443f0e
Binary files /dev/null and b/public/img/Routing/sweep/Step2.gif differ
diff --git a/public/img/Routing/sweep/Step3.gif b/public/img/Routing/sweep/Step3.gif
new file mode 100644
index 0000000..64961fc
Binary files /dev/null and b/public/img/Routing/sweep/Step3.gif differ
diff --git a/public/img/Routing/tsp/Step1.gif b/public/img/Routing/tsp/Step1.gif
new file mode 100644
index 0000000..8d6d1fc
Binary files /dev/null and b/public/img/Routing/tsp/Step1.gif differ
diff --git a/public/img/Routing/tsp/Step2.gif b/public/img/Routing/tsp/Step2.gif
new file mode 100644
index 0000000..a11f371
Binary files /dev/null and b/public/img/Routing/tsp/Step2.gif differ
diff --git a/public/img/Routing/tsp/Step3.gif b/public/img/Routing/tsp/Step3.gif
new file mode 100644
index 0000000..609e7c3
Binary files /dev/null and b/public/img/Routing/tsp/Step3.gif differ
diff --git a/src/pages/Starter/SampleLayout.vue b/src/pages/Starter/SampleLayout.vue
index 1d763a9..26cbc9d 100644
--- a/src/pages/Starter/SampleLayout.vue
+++ b/src/pages/Starter/SampleLayout.vue
@@ -149,29 +149,30 @@
}"
>
-
+
+
-
+
diff --git a/src/repositories/Modules/Routing/Routing.js b/src/repositories/Modules/Routing/Routing.js
index 5a260c2..e014e15 100644
--- a/src/repositories/Modules/Routing/Routing.js
+++ b/src/repositories/Modules/Routing/Routing.js
@@ -14,6 +14,10 @@ class Routing{
solveClarkAndWright(NodesDTO){
return axios.post(`${this.basePath}/routingModule/solveClarkAndWright`,NodesDTO);
}
+
+ solveSweep(NodesDTO){
+ return axios.post(`${this.basePath}/routingModule/solveSweep`,NodesDTO);
+ }
}
export default new Routing();
\ No newline at end of file
diff --git a/src/routes/starterRouter.js b/src/routes/starterRouter.js
index 5389a3d..a71a8df 100644
--- a/src/routes/starterRouter.js
+++ b/src/routes/starterRouter.js
@@ -28,6 +28,11 @@ import NearestNeighbour from 'src/views/Modules/Routing/NearestNeighbor';
import ClarkeAndWright from 'src/views/Modules/Routing/ClarkeAndWright';
import Opt3Move from 'src/views/Modules/Routing/Opt3Move';
import Sweep from 'src/views/Modules/Routing/Sweep';
+import TSP from 'src/views/Modules/Routing/TSPMainPage';
+
+import VRP from 'src/views/Modules/Routing/VRPMainPage';
+
+import KMeans from 'src/views/Modules/Clustering/KMeans';
Vue.use(Router);
@@ -151,6 +156,21 @@ export default new Router({
name: 'sp',
components: { default: Sweep }
},
+ {
+ path: 'K-Means',
+ name: 'km',
+ components: {default: KMeans}
+ },
+ {
+ path: 'TSP',
+ name: 'tsp',
+ components: {default: TSP}
+ },
+ {
+ path: 'VRP',
+ name: 'vrp',
+ components: { default: VRP}
+ }
]
}
],
diff --git a/src/views/Modules/Clustering/KMeans.vue b/src/views/Modules/Clustering/KMeans.vue
new file mode 100644
index 0000000..9285ad6
--- /dev/null
+++ b/src/views/Modules/Clustering/KMeans.vue
@@ -0,0 +1,39 @@
+
+
+
Hello World!
+
{{ nombre }}
+
+
+
+
ID: {{i}}, Num: {{ num }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Modules/Routing/ClarkeAndWright.vue b/src/views/Modules/Routing/ClarkeAndWright.vue
index 81f0bb5..a5bcc55 100644
--- a/src/views/Modules/Routing/ClarkeAndWright.vue
+++ b/src/views/Modules/Routing/ClarkeAndWright.vue
@@ -1,10 +1,24 @@
CLARK AND WRIGHT ALGORITHM
+
+
+
+
+
+
+
How it works?
+
+
+
+
+
+
+
-
+
@@ -15,14 +29,25 @@
import RRepository from './../../../repositories/Modules/Routing/Routing';
import NodesTable from './NodesTable.vue';
import RoutingSolution from './RoutingSolution.vue';
+import {Carousel, Slide} from 'vue-carousel';
export default {
-
+
name: "ck",
-
+
data() {
return {
- nodes: [
+ tutorial:{
+ value : false,
+ msg : "What is Clarke And Wright?",
+ imgs: [
+ "/img/Routing/clark/Step1.gif",
+ "/img/Routing/clark/Step2.gif",
+ "/img/Routing/clark/Step3.gif"
+
+ ],
+ },
+ nodes: [
{
id: 0,
x: 1,
@@ -44,7 +69,7 @@ export default {
this.solveStatus = true;
var no = {nodes: nodes};
-
+
RRepository.solveClarkAndWright(no).then((response) => {
if(response.status < 400){
let r = response.data
@@ -54,15 +79,22 @@ export default {
}
);
+ },
+ changeTuto(){
+ this.tutorial.value = !this.tutorial.value;
+ if (this.tutorial.value) this.tutorial.msg = "Hide";
+ else this.tutorial.msg = "What is Nearest Neighbour?";
}
},
components: {
'nodes-table': NodesTable,
- 'routing-solution': RoutingSolution
+ 'routing-solution': RoutingSolution,
+ 'carousel':Carousel,
+ 'slide':Slide,
}
}
\ No newline at end of file
+
diff --git a/src/views/Modules/Routing/LoadFileComponent.vue b/src/views/Modules/Routing/LoadFileComponent.vue
new file mode 100644
index 0000000..17bcab3
--- /dev/null
+++ b/src/views/Modules/Routing/LoadFileComponent.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Modules/Routing/NearestNeighbor.vue b/src/views/Modules/Routing/NearestNeighbor.vue
index 2278d18..7c81a64 100644
--- a/src/views/Modules/Routing/NearestNeighbor.vue
+++ b/src/views/Modules/Routing/NearestNeighbor.vue
@@ -1,39 +1,68 @@
-
-
NEAREST NEIGHBOR ALGORITHM
+
+
NEAREST NEIGHBOR ALGORITHM
+
+
+
+
+
+
+
+
+
+
How it works?
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
+
diff --git a/src/views/Modules/Routing/NodesRouteTable.vue b/src/views/Modules/Routing/NodesRouteTable.vue
deleted file mode 100644
index ae40d31..0000000
--- a/src/views/Modules/Routing/NodesRouteTable.vue
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
Load File
-
Drag and Drop here
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/Modules/Routing/NodesTable.vue b/src/views/Modules/Routing/NodesTable.vue
index ae40d31..a7df802 100644
--- a/src/views/Modules/Routing/NodesTable.vue
+++ b/src/views/Modules/Routing/NodesTable.vue
@@ -1,71 +1,132 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ Load File
+
+
+
+
+
+ Add Node
+
+
+
+
+
+ Remove Node
+
+
+
+
+
+
+
+
+
+
-
-
-
Load File
-
Drag and Drop here
-
-
+
+
+
Load File
+
Drag and Drop here
+
+
-
-
+
+
+ Nothing loaded yet
+ {{ loaded }}
+
+
-
-
+
\ No newline at end of file
+.md-ico{
+ display: none;
+}
+
+@media(max-width: 950px){
+ .md-ico{
+ display: block;
+ }
+ .md-text{
+ display: none !important;
+ }
+}
+
diff --git a/src/views/Modules/Routing/Opt3Move.vue b/src/views/Modules/Routing/Opt3Move.vue
index 3d41a81..83a8fb7 100644
--- a/src/views/Modules/Routing/Opt3Move.vue
+++ b/src/views/Modules/Routing/Opt3Move.vue
@@ -13,7 +13,7 @@
@@ -64,4 +96,4 @@ export default {
\ No newline at end of file
+
diff --git a/src/views/Modules/Routing/TSPMainPage.vue b/src/views/Modules/Routing/TSPMainPage.vue
new file mode 100644
index 0000000..6848cd8
--- /dev/null
+++ b/src/views/Modules/Routing/TSPMainPage.vue
@@ -0,0 +1,109 @@
+
+
+
Traveling salesman problem
+
+
+
+
+
+
+
+
+
+ Clark and Wright
+
+
+
+
+
+
+ Nearest Neighbour
+
+
+
+
+
+
+ Sweep
+
+
+
+
+
+
+ Opt-3-Move
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Modules/Routing/VRPCapacitive.vue b/src/views/Modules/Routing/VRPCapacitive.vue
new file mode 100644
index 0000000..b846e90
--- /dev/null
+++ b/src/views/Modules/Routing/VRPCapacitive.vue
@@ -0,0 +1,87 @@
+
+
+
+
VRP Capacitive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Modules/Routing/VRPInputTable.vue b/src/views/Modules/Routing/VRPInputTable.vue
new file mode 100644
index 0000000..e2914ff
--- /dev/null
+++ b/src/views/Modules/Routing/VRPInputTable.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Add Truck
+
+
+
+ Remove Truck
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add Node
+
+
+
+ Remove Node
+
+
+
+
+
+ Load File
+
+ Solve
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/Modules/Routing/VRPMainPage.vue b/src/views/Modules/Routing/VRPMainPage.vue
new file mode 100644
index 0000000..77f766f
--- /dev/null
+++ b/src/views/Modules/Routing/VRPMainPage.vue
@@ -0,0 +1,65 @@
+
+
+
Vehicle Routing Problem
+
+
+
+
+
+
+
+
+
+ Capacitive 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Modules/Routing/fileReader.js b/src/views/Modules/Routing/fileReader.js
new file mode 100644
index 0000000..465d890
--- /dev/null
+++ b/src/views/Modules/Routing/fileReader.js
@@ -0,0 +1,75 @@
+var f = document.getElementById("file");
+var fileList;
+//var fs = document.getElementById("fs");
+var customButton = document.getElementById("customBTN");
+var customText = document.getElementById("customTXT");
+
+customButton.addEventListener("click",function(e){
+ f.click();
+});
+
+f.addEventListener("change",function(e){
+ if (f.value){
+ customTXT.innerHTML = f.value;
+ }else{
+ customTXT.innerHTML = "Nothing loaded yet";
+ }
+});
+
+
+
+
+f.addEventListener('change', (event) => {
+ fileList = event.target.files;
+ console.log(fileList);
+ getMetadataForFileList(fileList);
+ });
+
+ const dropArea = document.getElementById('DropArea');
+
+ dropArea.addEventListener('dragover', (event) => {
+ event.stopPropagation();
+ event.preventDefault();
+ // Style the drag-and-drop as a "copy file" operation.
+ event.dataTransfer.dropEffect = 'copy';
+ });
+
+ dropArea.addEventListener('drop', (event) => {
+ event.stopPropagation();
+ event.preventDefault();
+ fileList = event.dataTransfer.files;
+ console.log(fileList);
+ getMetadataForFileList(fileList);
+ });
+
+
+ function getMetadataForFileList(data) {
+ for (const file of fileList) {
+ // Not supported in Safari for iOS.
+ const name = file.name ? file.name : 'NOT SUPPORTED';
+ // Not supported in Firefox for Android or Opera for Android.
+ const type = file.type ? file.type : 'NOT SUPPORTED';
+ // Unknown cross-browser support.
+ const size = file.size ? file.size : 'NOT SUPPORTED';
+ console.log({file, name, type, size});
+
+ readFile(file);
+
+ }
+ }
+
+ function readFile(file) {
+ var reader = new FileReader();
+ reader.addEventListener('load', (event) => {
+ console.log(event.target.result);
+ customTXT.innerHTML = file.name;
+ });
+
+ reader.addEventListener('progress', (event) => {
+ if (event.loaded && event.total) {
+ const percent = (event.loaded / event.total) * 100;
+ console.log(`Progress: ${Math.round(percent)}`);
+ }
+ });
+ reader.readAsText(file);
+}