-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36e9d5c
commit e50a86a
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Water Tank Fault Injection | ||
|
||
## Overview | ||
The co-simulation is composed of a water-tank, and a controller, which aims to maintain the level in the water-tank between ```1``` and ```2```. | ||
More details on this case-study can be found [here](https://github.com/INTO-CPS-Association/example-single_watertank). | ||
|
||
To run an experiment with fault-injection, we inject a fault in the input of the tank (control signal from controller to open or close), such that between time 12 and 20, this signal is always closed, irrespective of the actual level in the tank. | ||
|
||
# Example Diagram | ||
|
||
![Water Tank System](watertank.png) | ||
|
||
# Example Structure | ||
|
||
![Water Tank Structure](watertank_structure.png) | ||
|
||
## Configuration of assets | ||
|
||
This example uses two models and one tool. The specific assets used are: | ||
|
||
| Asset Type | Names of Assets | Visibility | Reuse in Other Examples | | ||
|:---|:---|:---|:---| | ||
| Models | WaterTank1.fmu | Private | Yes | | ||
| | WaterTank2.fmu | Private | Yes | | ||
| Tool | maestro-2.3.0-jar-with-dependencies.jar | Common | Yes | | ||
|
||
## Lifecycle Phases | ||
|
||
| Lifecycle Phase | Completed Tasks | | ||
| -------- | ------- | | ||
| Create | Installs Java Development Kit for Maestro tool | | ||
| Execute | Produces and stores output in data/water_tank_FI/output directory| | ||
| Clean | Clears run logs and outputs | | ||
|
||
## Run the example | ||
|
||
To run the example, change your present directory. | ||
|
||
```bash | ||
cd workspace/examples/digital_twins/water_tank_FI | ||
``` | ||
|
||
If required, change the permission of files you need to execute, for example: | ||
|
||
``` | ||
chmod +x lifecycle/create | ||
``` | ||
|
||
Now, run the following scripts: | ||
|
||
### Create | ||
|
||
``` | ||
lifecycle/create | ||
``` | ||
|
||
### Execute | ||
|
||
``` | ||
lifecycle/execute | ||
``` | ||
|
||
## Examine the results | ||
|
||
The results can be found in the _workspace/examples/data/water_tank_FI/output directory_. | ||
|
||
You can also view run logs in the _workspace/examples/digital_twins/water_tank_FI_. |