Browse Source

new release of hintco and shipping mass spring damper example

Claudio Gomes 5 years ago
parent
commit
879f7b55e6

+ 1 - 2
HintCOEngine/HintCO.product

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 <?pde version="3.5"?>
 
 
-<product name="HintCO" uid="HintCO" id="ua.ansymo.HintCO.product" application="ua.ansymo.hintco" version="0.0.2" useFeatures="false" includeLaunchers="true">
+<product name="HintCO" uid="HintCO" id="ua.ansymo.HintCO.product" application="ua.ansymo.hintco" version="0.0.3" useFeatures="false" includeLaunchers="true">
 
 
    <configIni use="default">
    <configIni use="default">
    </configIni>
    </configIni>
@@ -15,7 +15,6 @@
 
 
    <windowImages/>
    <windowImages/>
 
 
-
    <launcher>
    <launcher>
       <win useIco="false">
       <win useIco="false">
          <bmp/>
          <bmp/>

+ 5 - 3
HintCOEngine/META-INF/MANIFEST.MF

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Name: %pluginName
 Bundle-SymbolicName: ua.ansymo.HintCO;singleton:=true
 Bundle-SymbolicName: ua.ansymo.HintCO;singleton:=true
-Bundle-Version: 0.0.2
+Bundle-Version: 0.0.3
 Bundle-ClassPath: .,
 Bundle-ClassPath: .,
  lib/commons-compress-1.18.jar,
  lib/commons-compress-1.18.jar,
  lib/commons-io-2.6.jar,
  lib/commons-io-2.6.jar,
@@ -14,7 +14,9 @@ Bundle-ClassPath: .,
  lib/commons-beanutils-1.9.3.jar,
  lib/commons-beanutils-1.9.3.jar,
  lib/commons-lang3-3.8.1.jar,
  lib/commons-lang3-3.8.1.jar,
  lib/opencsv-4.3.2.jar,
  lib/opencsv-4.3.2.jar,
- lib/nativebinaries/
+ lib/nativebinaries/,
+ lib/jheaps-0.13.jar,
+ lib/jgrapht-core-1.3.1.jar
 Bundle-Vendor: %providerName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-Localization: plugin
 Automatic-Module-Name: ua.ansymo.HintCO
 Automatic-Module-Name: ua.ansymo.HintCO
@@ -23,7 +25,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: org.intocps.fmi,
 Export-Package: org.intocps.fmi,
  ua.ansymo.hintco
  ua.ansymo.hintco
 Bundle-ActivationPolicy: lazy
 Bundle-ActivationPolicy: lazy
-Require-Bundle: HintConfiguration;bundle-version="0.0.2",
+Require-Bundle: HintConfiguration;bundle-version="0.0.3",
  be.uantwerpen.cosys.ContractLang;bundle-version="1.0.0",
  be.uantwerpen.cosys.ContractLang;bundle-version="1.0.0",
  com.google.guava,
  com.google.guava,
  org.eclipse.xtext.xbase.lib,
  org.eclipse.xtext.xbase.lib,

+ 3 - 1
HintCOEngine/build.properties

@@ -22,5 +22,7 @@ bin.includes = META-INF/,\
                lib/slf4j-simple.jar,\
                lib/slf4j-simple.jar,\
                lib/nativebinaries/,\
                lib/nativebinaries/,\
                examples/,\
                examples/,\
-               scripts/
+               scripts/,\
+               lib/jheaps-0.13.jar,\
+               lib/jgrapht-core-1.3.1.jar
 jars.compile.order = .
 jars.compile.order = .

+ 25 - 0
HintCOEngine/examples/deploy/msd_alg_loop.hintco

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<hintco:HintConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hintco="ua.ansymo.hintco">
+  <candidates identifier="Original" stopTime="10.0" stepSize="0.01" outputStepSize="0.01">
+    <cosimunits xsi:type="hintco:CosimUnitInstance" identifier="msd1" declaration="//@csuDeclarations.0">
+      <ports xsi:type="hintco:OutputPortInstance" identifier="x1" valueTo="//@candidates.0/@cosimunits.1/@ports.0"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="v1" valueTo="//@candidates.0/@cosimunits.1/@ports.1"/>
+      <ports xsi:type="hintco:InputPortInstance" identifier="fk" extrapolationCost="10.0" valueFrom="//@candidates.0/@cosimunits.1/@ports.2">
+        <adaptation xsi:type="hintco:InterpolationAdaptation"/>
+      </ports>
+    </cosimunits>
+    <cosimunits xsi:type="hintco:CosimUnitInstance" identifier="msd2" declaration="//@csuDeclarations.1">
+      <ports xsi:type="hintco:InputPortInstance" identifier="x1" valueFrom="//@candidates.0/@cosimunits.0/@ports.0">
+        <adaptation xsi:type="hintco:InterpolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:InputPortInstance" identifier="v1" valueFrom="//@candidates.0/@cosimunits.0/@ports.1">
+        <adaptation xsi:type="hintco:InterpolationAdaptation"/>
+      </ports>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="fk" valueTo="//@candidates.0/@cosimunits.0/@ports.2"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="x2"/>
+      <ports xsi:type="hintco:OutputPortInstance" identifier="v2"/>
+    </cosimunits>
+  </candidates>
+  <csuDeclarations identifier="MassSpringDamper1" path="resources/MassSpringDamper1.fmu" guid="{b9a6f0c4-d497-4270-82bd-b3082ab8b5ed}"/>
+  <csuDeclarations identifier="MassSpringDamper2" path="resources/MassSpringDamper2.fmu" guid="{ae52e3f4-d126-465f-b9d8-691742b11bda}"/>
+</hintco:HintConfiguration>

BIN
HintCOEngine/resources/deploy/MassSpringDamper1.fmu


BIN
HintCOEngine/resources/deploy/MassSpringDamper2.fmu


+ 0 - 1
HintCOEngine/scripts/example.ps1

@@ -1 +0,0 @@
-.\hintco.exe -s .\case_study_double_loop.xmi -o output -d -n 1 -noExit

+ 2 - 2
HintConfiguration.edit/META-INF/MANIFEST.MF

@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Name: %pluginName
 Bundle-SymbolicName: HintConfiguration.edit;singleton:=true
 Bundle-SymbolicName: HintConfiguration.edit;singleton:=true
 Automatic-Module-Name: HintConfiguration.edit
 Automatic-Module-Name: HintConfiguration.edit
-Bundle-Version: 0.0.2
+Bundle-Version: 0.0.3
 Bundle-ClassPath: HintConfiguration.edit.jar
 Bundle-ClassPath: HintConfiguration.edit.jar
 Bundle-Activator: ua.ansymo.hintco.provider.HintConfigurationEditPlugin$Implementation$Activator
 Bundle-Activator: ua.ansymo.hintco.provider.HintConfigurationEditPlugin$Implementation$Activator
 Bundle-Vendor: %providerName
 Bundle-Vendor: %providerName
@@ -11,7 +11,7 @@ Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: ua.ansymo.hintco.provider
 Export-Package: ua.ansymo.hintco.provider
 Require-Bundle: org.eclipse.core.runtime;resolution:=optional;x-installation:=greedy,
 Require-Bundle: org.eclipse.core.runtime;resolution:=optional;x-installation:=greedy,
- HintConfiguration;visibility:=reexport,
+ HintConfiguration;bundle-version="0.0.3";visibility:=reexport,
  org.eclipse.emf.edit;visibility:=reexport,
  org.eclipse.emf.edit;visibility:=reexport,
  org.eclipse.emf.ecore;visibility:=reexport,
  org.eclipse.emf.ecore;visibility:=reexport,
  org.eclipse.emf.ecore.edit;visibility:=reexport
  org.eclipse.emf.ecore.edit;visibility:=reexport

+ 2 - 2
HintConfiguration.editor/META-INF/MANIFEST.MF

@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Name: %pluginName
 Bundle-SymbolicName: HintConfiguration.editor;singleton:=true
 Bundle-SymbolicName: HintConfiguration.editor;singleton:=true
 Automatic-Module-Name: HintConfiguration.editor
 Automatic-Module-Name: HintConfiguration.editor
-Bundle-Version: 0.0.2
+Bundle-Version: 0.0.3
 Bundle-ClassPath: HintConfiguration.editor.jar
 Bundle-ClassPath: HintConfiguration.editor.jar
 Bundle-Activator: ua.ansymo.hintco.presentation.HintConfigurationEditorPlugin$Implementation
 Bundle-Activator: ua.ansymo.hintco.presentation.HintConfigurationEditorPlugin$Implementation
 Bundle-Vendor: %providerName
 Bundle-Vendor: %providerName
@@ -12,7 +12,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: ua.ansymo.hintco.presentation
 Export-Package: ua.ansymo.hintco.presentation
 Require-Bundle: org.eclipse.core.runtime,
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.core.resources;visibility:=reexport,
  org.eclipse.core.resources;visibility:=reexport,
- HintConfiguration.edit;visibility:=reexport,
+ HintConfiguration.edit;bundle-version="0.0.3";visibility:=reexport,
  org.eclipse.emf.ecore.xmi;visibility:=reexport,
  org.eclipse.emf.ecore.xmi;visibility:=reexport,
  org.eclipse.emf.edit.ui;visibility:=reexport,
  org.eclipse.emf.edit.ui;visibility:=reexport,
  org.eclipse.jface.text,
  org.eclipse.jface.text,

+ 1 - 1
HintConfiguration/META-INF/MANIFEST.MF

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Name: %pluginName
 Bundle-SymbolicName: HintConfiguration;singleton:=true
 Bundle-SymbolicName: HintConfiguration;singleton:=true
-Bundle-Version: 0.0.2
+Bundle-Version: 0.0.3
 Bundle-ClassPath: .
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-Localization: plugin

+ 13 - 1
deploy/README.md

@@ -1,4 +1,6 @@
-To run the watertanks example:
+# Water Tanks Example
+
+To run the water tanks example:
 
 
 ```
 ```
 .\hintco.exe -s .\examples\watertanks.xmi -o output -n 1
 .\hintco.exe -s .\examples\watertanks.xmi -o output -n 1
@@ -12,3 +14,13 @@ python .\scripts\plot_results.py .\output\
 
 
 Plots will be available at: [outputs](output\) 
 Plots will be available at: [outputs](output\) 
 
 
+## Mass Spring Damper Example
+
+The adaptations used in this example introduce an algebraic loop. So, to run, one has to activate the algebraic loop optimization, which tries to find the best way to break the algebraic loop.
+
+```
+.\hintco.exe -s .\examples\msd_alg_loop.hintco -o output -n 1 -loopOpt
+```
+
+The follow the above procedure to plots the results.
+

+ 2 - 6
deploy_examples.ps1

@@ -1,10 +1,6 @@
-$Examples = "HintCOEngine\examples\deploy"
-$Resources = "HintCOEngine\resources\deploy"
-$Scripts = "HintCOEngine\scripts"
-$Other = "deploy"
 $TargetDir = "snapshot\hintco"
 $TargetDir = "snapshot\hintco"
 
 
-Copy-Item "HintCOEngine\examples\deploy\" -Destination "$TargetDir\examples" -Recurse -Force
-Copy-Item "HintCOEngine\resources\deploy\" -Destination "$TargetDir\resources" -Recurse -Force
+Copy-Item "HintCOEngine\examples\deploy\" -Destination "$TargetDir\examples\" -Recurse -Force
+Copy-Item "HintCOEngine\resources\deploy\" -Destination "$TargetDir\resources\" -Recurse -Force
 Copy-Item "HintCOEngine\scripts" -Destination "$TargetDir\" -Recurse -Force
 Copy-Item "HintCOEngine\scripts" -Destination "$TargetDir\" -Recurse -Force
 Copy-Item "deploy\*" -Destination "$TargetDir\" -Recurse -Force
 Copy-Item "deploy\*" -Destination "$TargetDir\" -Recurse -Force