For the MDETools workshop @ MODELS'18, a challenge was posed to use a MDD tool - that generates fully functional code - to design a control system. The control system was supposed to make a follower
rover track a leader
rover at a safe distance, in a simulated Mars-looking environment.
This repository contains a solution to the challenge based on ThingML, a textual modeling language that implements a sub-set of the UML (components and state-machines) and complements it with a first-class action language. The ThingML language is supported by a set of tools, which include editors, transformations (e.g. export to UML) and an advanced multi-platform code generation framework, which support multiple target programming languages (C, Java, Javascript).
The solution is described in more detail in:
J. Høgenes and B. Morin.
Implementing the MDETools'18 Challenge with ThingML
MDETools'18 Workshop at ACM/IEEE MODELS, Copenhagen, Danmark.
The research leading to these results has received funding from the European Commission's H2020 programme under grant agreement no 780351 (ENACT).
Note: this code has only been tested using the Windows version of the challenge. Slight modifications might be required to run the code on another platform.
- Dowload the compiled binaries from the challenge problem website, and extract the archive into
./Challenge problem/
in the root of this repository. - Download the compiled binaries for the Go and Java controllers from the MDEtools release.
- Start the Unity simulator located at
./Challenge problem/Windows/Challenge-Win64.exe
. Choose display settings, and wait for the window to load. - Run the Unity observer located at
./Challenge problem/UnityObserver.jar
using a terminal andjava -jar ...
. - Run the
RoverControllerGo
orRoverControllerJava
programs in the downloaded binaries from the release.
To compile the program from source, follow the guide on the official ThingML repository. The Go and Java version main files to compile are located in ./_go/main.thingml
and ./_java/main.thingml
respectively.
Detailed component diagrams and state machine diagrams describing the solution is located in the ./docs/uml/
directory.
To validate the proposed solution, both the Go and Java controllers were run multiple times, and the applied power and distance from the leader
rover was logged. The results of that experiment can be found in the MDEtools release.
The experiment1.zip
consist of five Scenarios, each corresponding to a random path of the leader
rover, generated by the challenge software. For each scenario, both the Go and Java controllers were run five times, and the output of each is logged in the Runs.