|
@@ -4,7 +4,50 @@ This framework is a automated co-simulation program which is based on hints.
|
|
|
The co-simulation user define some hints in the framework, then the framework automatically try to find best master algorithm in order to satisfy user hints.
|
|
|
It runs numerous simulations, using the past results to improve next simulation with new master algorithm.
|
|
|
|
|
|
-## Getting Started
|
|
|
+## Download
|
|
|
+
|
|
|
+We provide precompiled binaries for windows.
|
|
|
+
|
|
|
+For Linux and macOS platforms, see [Getting Started in Development](#Getting-Started-in-Development).
|
|
|
+
|
|
|
+## Usage Instructions
|
|
|
+
|
|
|
+There are two main tasks in running a co-simulation with HintCO:
|
|
|
+
|
|
|
+1. Configure a co-simulation scenario file. This is an xml file that can be easily edited with Eclipse and the editor plugin shipped with HintCO.
|
|
|
+1. Compute the co-simulation results.
|
|
|
+
|
|
|
+#### Configuring Co-simulation Scenarios
|
|
|
+
|
|
|
+Co-simulation scenario are just xml files. See [watertanks.xmi](HintCO\examples\watertanks.xmi) for an example.
|
|
|
+
|
|
|
+HintCO provides EMF Editor Plugins to edit such files. To use them, install the `HintCO.edit_*.jar` and `HintCO.editor_*.jar` files into your favorite eclipse distribution.
|
|
|
+
|
|
|
+#### Running Co-simulations
|
|
|
+
|
|
|
+HintCO provides some example co-simulations. The scenario files are available in the [examples](HintCO\examples\) directory and the FMUs are available in the [resources](HintCO\resources\) directory.
|
|
|
+
|
|
|
+If `hintco` denotes the HintCO binary, then run
|
|
|
+
|
|
|
+```
|
|
|
+hintco -s .\examples\watertanks.xmi -o output -n 1
|
|
|
+```
|
|
|
+
|
|
|
+Where `.\examples\watertanks.xmi` can be found in [examples](HintCO\examples\), and `output` is where the results will be generated.
|
|
|
+The fmus are assumed to be in a `resources` folder, in the same directory as the binary `hintco`.
|
|
|
+A helper script under [scripts](HintCO\scripts\) is provided, to create pdfs for the plots produced:
|
|
|
+
|
|
|
+```
|
|
|
+python plot_results.py ./output/0_1
|
|
|
+```
|
|
|
+
|
|
|
+To get help on the API:
|
|
|
+
|
|
|
+```
|
|
|
+hintco -h
|
|
|
+```
|
|
|
+
|
|
|
+## Getting Started in Development
|
|
|
|
|
|
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
|
|
|
|
|
@@ -38,38 +81,17 @@ mvn install
|
|
|
Then you have to test application in Eclipse environment with JUnit.
|
|
|
We recommend running the Eclipse JUnit plug-in tests as well.
|
|
|
|
|
|
-Maven command:
|
|
|
-
|
|
|
-```
|
|
|
-mvn install
|
|
|
-```
|
|
|
-
|
|
|
### Exporting an Application
|
|
|
|
|
|
-The file `HintCO.product` contains all the information.
|
|
|
-Click on Exporting and Eclipse product.
|
|
|
-The binaries are exported as an Eclipse RCP Application.
|
|
|
-
|
|
|
-## Running the Application
|
|
|
+The easiest way to export the application is to run:
|
|
|
|
|
|
-Copy FMUs and XMI file in the exported directory.
|
|
|
-To get help on the API:
|
|
|
```
|
|
|
-hintco -h
|
|
|
+mvn package
|
|
|
```
|
|
|
|
|
|
-To run a single co-simulation, you need a scenario configuration, which points to the location of the FMUs:
|
|
|
-```
|
|
|
-hintco -s .\watertanks.xmi -o output -n 1
|
|
|
-```
|
|
|
-Where `.\watertanks.xmi` can be found in `examples`, and `output` is where the results will be generated.
|
|
|
-The fmus are assumed to be in a `resources` folder, in the same directory as the binary `hintco`.
|
|
|
-We recommend using `eclipsec.exe` by copying it from Eclipse IDE for RCP and RAP Developers folder and paste it in the export directory.
|
|
|
+The main jar file will be in `./HintCO/target/`.
|
|
|
|
|
|
-An helper script under `scripts` is provided, to create pdfs for the plots produced:
|
|
|
-```
|
|
|
-python plot_results.py ./output/0_1
|
|
|
-```
|
|
|
+Alternative, use eclipse to export the eclipse product with the [HintCO.product](HintCO\HintCO.product) file.
|
|
|
|
|
|
## Contributing
|
|
|
|