Browse Source

refactor directories, to avoid build problems in IDE

Cláudio Gomes 3 years ago
parent
commit
c78ec12056

+ 27 - 22
SemanticAdaptationForFMI/Experiments/power_window_case_study/.cproject

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
 	<storageModule moduleId="org.eclipse.cdt.core.settings">
-		<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.1448012205">
-			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.1448012205" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+		<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.1419127168">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.1419127168" moduleId="org.eclipse.cdt.core.settings" name="Debug">
 				<externalSettings/>
 				<extensions>
 					<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
@@ -12,31 +12,35 @@
 				</extensions>
 			</storageModule>
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.1448012205" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
-					<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.1448012205." name="/" resourcePath="">
-						<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.312389558" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
-							<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.328503688" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
-							<builder buildPath="${workspace_loc:/PowerWindowCaseStudy}/Debug" id="cdt.managedbuild.tool.gnu.builder.mingw.base.682906468" managedBuildOn="true" name="CDT Internal Builder.Debug" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
-							<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.465108158" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
-								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.639298349" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.1419127168" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
+					<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.1419127168." name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.126550853" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
+							<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1625619098" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
+							<builder buildPath="${workspace_loc:/PowerWindowScenario}/Debug" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1280997537" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+							<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2081267675" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1171154479" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
 							</tool>
-							<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1713618997" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
-							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.248945580" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
-								<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1688987668" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
-								<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1365749827" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+							<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.546602966" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.213358955" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
+								<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1102790604" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+								<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.2093439267" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
 							</tool>
-							<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.549426107" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
-								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.28288312" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
-								<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.2553783" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
-								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1715046612" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.125534481" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
+								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.440549743" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
+								<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.613055960" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+								<option id="gnu.c.compiler.option.dialect.std.1080027259" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
+								<option id="gnu.c.compiler.option.include.paths.237765408" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/fmi2}&quot;"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.244194487" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
 							</tool>
-							<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.1389313021" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
-								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.2139646375" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.577377484" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
+								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.994609589" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
 									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
 									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
 								</inputType>
 							</tool>
-							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.734349612" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.948595103" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
 						</toolChain>
 					</folderInfo>
 				</configuration>
@@ -45,13 +49,14 @@
 		</cconfiguration>
 	</storageModule>
 	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-		<project id="PowerWindowCaseStudy.cdt.managedbuild.target.gnu.mingw.exe.834444844" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
+		<project id="PowerWindowScenario.cdt.managedbuild.target.gnu.mingw.exe.1857024898" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
 	</storageModule>
 	<storageModule moduleId="scannerConfiguration">
 		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.1448012205;cdt.managedbuild.config.gnu.mingw.exe.debug.1448012205.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.549426107;cdt.managedbuild.tool.gnu.c.compiler.input.1715046612">
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.1419127168;cdt.managedbuild.config.gnu.mingw.exe.debug.1419127168.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.125534481;cdt.managedbuild.tool.gnu.c.compiler.input.244194487">
 			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
 		</scannerConfigBuildInfo>
 	</storageModule>
 	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+	<storageModule moduleId="refreshScope"/>
 </cproject>

+ 1 - 1
SemanticAdaptationForFMI/Experiments/power_window_case_study/.project

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>PowerWindowCaseStudy</name>
+	<name>PowerWindowScenario</name>
 	<comment></comment>
 	<projects>
 	</projects>

+ 3 - 5
SemanticAdaptationForFMI/Experiments/power_window_case_study/build.ps1

@@ -3,13 +3,11 @@ mingw32-make exe makefile
 
 pause
 
-
-
 $LibAbsolutionPath = (Get-Item -Path ".\lib" -Verbose).FullName
 
 Echo "Building FMUs and getting their dlls..."
 
-Push-Location .\fmus
+Push-Location ..\fmus
     $FMUSources = Get-ChildItem -Filter FMI_*
     ForEach ($fmu In $FMUSources){
         Push-Location $fmu
@@ -25,7 +23,7 @@ Pop-location
 Echo "Building FMUs and getting their dlls... DONE."
 
 Echo "Gettings dlls from third party FMUs..."
-Push-Location .\fmus\ThirdParty
+Push-Location ..\fmus\ThirdParty
     $FMUSources = Get-ChildItem -dir -Filter FMI_*
     ForEach ($fmu In $FMUSources){
         Push-Location $fmu\binaries\win32
@@ -35,4 +33,4 @@ Push-Location .\fmus\ThirdParty
 Pop-location
 Echo "Gettings dlls from third party FMUs... DONE."
 
-pause
+pause

SemanticAdaptationForFMI/Experiments/power_window_case_study/fmi2/fmi2.h → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/fmi2/fmi2.h


SemanticAdaptationForFMI/Experiments/power_window_case_study/fmi2/fmi2FunctionTypes.h → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/fmi2/fmi2FunctionTypes.h


SemanticAdaptationForFMI/Experiments/power_window_case_study/fmi2/fmi2Functions.h → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/fmi2/fmi2Functions.h


SemanticAdaptationForFMI/Experiments/power_window_case_study/fmi2/fmi2TypesPlatform.h → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/fmi2/fmi2TypesPlatform.h


SemanticAdaptationForFMI/Experiments/power_window_case_study/lib/.gitignore → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/lib/.gitignore


+ 14 - 12
SemanticAdaptationForFMI/Experiments/power_window_case_study/main.c

@@ -13,8 +13,8 @@
 #include "sim_support.h"
 
 #define START_TIME 0.0
-#define STOP_TIME 3.0
-#define STEP_SIZE 0.00001
+#define STOP_TIME 9.0
+#define STEP_SIZE 0.001
 
 FMU fmu_env, fmu_control_sa, fmu_power_sa, fmu_loop_sa;
 
@@ -223,18 +223,20 @@ int main(void) {
     	//r_in_power_from_loop[0] = -7000;
 
     	int redoStep  = 0;
-    	for(int i=0; i<2; i++)
-    	if (fmi2Flag[i] == fmi2Discard){
-    		redoStep = 1;
-    		fmi2Real newtime;
-
-    		fmu_control_sa.getRealStatus(c_control_sa, lst, &newtime);
-    		fmi2Real the_FMU_new_step = newtime - currentTime;
-    		if(the_FMU_new_step < next_step_size){
-    			next_step_size = the_FMU_new_step;
-    		}
+    	for(int i=0; i<2; i++){
+    		if (fmi2Flag[i] == fmi2Discard){
+				redoStep = 1;
+				fmi2Real newtime;
+
+				fmu_control_sa.getRealStatus(c_control_sa, lst, &newtime);
+				fmi2Real the_FMU_new_step = newtime - currentTime;
+				if(the_FMU_new_step < next_step_size){
+					next_step_size = the_FMU_new_step;
+				}
+			}
     	}
 
+
     	if(redoStep){ // should be a while loop!
     		// Recover all FMUs and do step again
     		printf("recover not yet implemented\n");

SemanticAdaptationForFMI/Experiments/power_window_case_study/makefile → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/makefile


SemanticAdaptationForFMI/Experiments/power_window_case_study/plot_csv.py → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/plot_csv.py


SemanticAdaptationForFMI/Experiments/power_window_case_study/sim_support.c → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/sim_support.c


SemanticAdaptationForFMI/Experiments/power_window_case_study/sim_support.h → SemanticAdaptationForFMI/Experiments/power_window_case_study/top_level_scenario/sim_support.h