Browse Source

removed extra spaces for counting the lines and updated instructions

Cláudio Gomes 4 years ago
parent
commit
fef0e33a77

+ 7 - 15
DSL_SemanticAdaptation/README.txt

@@ -1,26 +1,18 @@
 Installation Instructions:
 - Download Eclipse NEON (64 bits) installer.
 - Run it, and select "Eclipse DSL Tools" environment.
-or if you already have Eclipse NEON then just install the xText plugins
-- repo http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
--  plugins `Xtend IDE` and `Xtend Complete SDK`
+or if you already have Eclipse DSL Tools, then just install the xText plugins as follows:
+	http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
+		select plugins `Xtend IDE` and `Xtend Complete SDK`, and install
 
-BEFORE MAVEN
-Generation and Compilation
-- Import all projects in this folder.
-- Right click in be.uantwerpen.ansymo.semanticadaptation/src/be/uantwerpen/ansymo/semanticadaptation/SemanticAdaptation.xtext   and select "run as -> generate xtext artifacts"
-- Check that the console log is similar to the one in File "first_generation_sucessful_log.txt".
-AFTER MAVEN
 - In CONSOLE run "mvn package" in DSL_SemanticAdaptation
 - In eclipse choose import -> Maven -> Existing Maven Projects and choose the LEAF nodes
 - Might be necessary to right click on a project -> Maven -> Update project
 
-Building maven:
-mvn package
-Cleaning maven:
+Build Instructions:
 mvn clean
+mvn package
 
 Other tasks:
-	Run the tests: right-click be.uantwerpen.ansymo.semanticadaptation.tests/src/be/uantwerpen/ansymo/semanticadaptation/tests/SemanticAdaptationParsingTest.xtend -> run as -> J-Unit test
-	
-	Run the plugin: After building everything, right-click /be.uantwerpen.ansymo.semanticadaptation -> run as -> eclipse application
+	Run the plugin: 
+		After building everything, right-click /be.uantwerpen.ansymo.semanticadaptation -> run as -> eclipse application

+ 0 - 2
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmus/FMI_controller_sa/FMI_GM.c

@@ -20,8 +20,6 @@ Template for a  FMU
 #include "fmi2.h"
 #include "sim_support.h"
 
-
-
 #define NUMBER_OF_REALS 1
 #define NUMBER_OF_STRINGS 0
 #define NUMBER_OF_BOOLEANS 11

+ 0 - 1
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmus/FMI_loop_sa/FMI_loop_sa.c

@@ -18,7 +18,6 @@ Template for a  FMU
 #include "fmi2.h"
 #include "sim_support.h"
 
-
 #define MAX 100000
 
 #define NUMBER_OF_REALS 4

+ 0 - 3
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmus/FMI_power_sa/FMI_power_sa.c

@@ -9,7 +9,6 @@ Template for a  FMU
 #define MODEL_GUID "{41f87101-edf2-4eef-90f3-42db56d4565f}"
 #define FMI2_FUNCTION_PREFIX POWER_SA_
 
-
 #include <stdio.h>
 #include "string.h"
 #include "fmi2Functions.h"
@@ -19,7 +18,6 @@ Template for a  FMU
 #include "fmi2.h"
 #include "sim_support.h"
 
-
 #define MAX 100000
 
 #define NUMBER_OF_REALS 6
@@ -110,7 +108,6 @@ fmi2Status fmi2SetReal(fmi2Component fc, const fmi2ValueReference vr[], size_t n
 
 fmi2Status fmi2GetReal(fmi2Component fc, const fmi2ValueReference vr[], size_t nvr, fmi2Real value[])
 {
-
 	FMUInstance* comp = (FMUInstance *)fc;
 
 	int isEmpty = 1;

+ 5 - 9
SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/plot_results.r

@@ -7,12 +7,13 @@ library(reshape)
 library(plotly)
 library(stringr)
 
-sizeAxisLabel <- 26
+sizeAxisLabel <- 22
 
 # Plot environment
   env <- read.csv("result_ENV.csv")
   
   # Drop columns that will not be plotted
+  env$dup_stop <- NULL
   env$ddown <- NULL
   env$ddown_stop <- NULL
   env$pup <- NULL
@@ -25,8 +26,7 @@ sizeAxisLabel <- 26
   
   pdf("results_Env.pdf", width=10, height=5)
   
-  pallete <- c("#89cbaf",
-               "#be5440")
+  pallete <- c("#89cbaf")
   penv <- ggplot(data=env_molten) +
             geom_line(aes(x=t, y=value, color=variable), size=2) +
             scale_x_continuous("Time (s)") +
@@ -99,11 +99,7 @@ sizeAxisLabel <- 26
   
   pdf("results_loop_sa.pdf", width=10, height=5)
   
-  pallete <- c("#89cbaf",
-               "#be5440",
-               "#9699c3",
-               "#cca956",
-               "#4f314e")
+  pallete <- c("#be5440")
   ploop <- ggplot(data=loop_molten) +
             geom_line(aes(x=t, y=value, color=variable), size=1) +
             scale_x_continuous("Time (s)") +
@@ -122,5 +118,5 @@ sizeAxisLabel <- 26
   
 # Make multi-grid plot
   row_plot <- plot_grid(penv, pcontrol, ppower, ploop, nrow = 4, ncol = 1, align = "v")
-  save_plot("vertical_plot.pdf", row_plot, nrow = 4, ncol = 1, base_aspect_ratio = 2)
+  save_plot("vertical_plot.pdf", row_plot, nrow = 4, ncol = 1, base_aspect_ratio = 3)
   

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/results_Control_sa.pdf


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/results_Env.pdf


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/results_loop_sa.pdf


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/results_power_sa.pdf


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/vertical_plot.pdf