This example illustrates the use of several models of computation in a model of a system, and the semantic adaptation between parts of the model which use different models of computation.
The overall structure of the model is as follows:
Paper and presentation
This example is described in the following paper:
[1] 2011SemAdaptACSDSemantic Adaptation for Models of Computations , Proceedings of the 11th International Conference on Application of Concurrency to System Design, 2011, (Benoît Caillaud,Josep Carmona,Kunihiko Hiraishi, Ed.), IEEE Computer Society, pages 153-162(URL), (BibTeX)
The slides of the presentation
Heterogeneous ModHel'X model of the power window
This model uses a new implementation of ModHel'X, which relies on a cleaner model of time to specify the semantic adaptation of control and time between heterogeneous part of the model.
2013-09-05_ModHelX_PowerWindow.zip
This zip file is an archive of an Eclipse Java project which contains ModHel'X (in the modhelxs package), the TESL model of time used by this implementation of ModHel'X (in the tesl package), and some demos (in the demos package). The models of the power window are in the demos.powerwindow package:
- PowerWindow.java is a text only demo using a fixed scenario
- PowerWindowDisplay.java also uses a fixed scenario, but display the results of the simulation in a graphical window
- PowerWindowWithGUI.java uses a graphical user interface to run the simulation with the user in the loop
Heterogeneous model of the power window in Ptolemy II
In order to illustrate the semantic adaptation issue, we have made two models of the power window in Ptolemy II:
- Ptolemy II model of the power window without semantic adaptation
- Ptolemy II model of the power window with semantic adaptation
What follows on this page is of historical interest only
Executable JAR file of the demo (requires Java 1.6 runtime)
This model is the original demo of the power window and uses a now obsolete implementation of ModHel'X
You can execute this demo by launching the JAR archive (double-click the file), or in a terminal, by issuing the following command:
java -jar ModHelXPowerWindow.jar
In the window that should appear on your screen, click the "Run" button to execute the model. A GUI should pop up, with a display of the power window, two triangular buttons to raise or lower the window, a check box to put an obstacle (a hand) in the window, and a checkbox for getting tinted windows ;-)
Pressing the up button and releasing it when it turns green should raise the window in automatic mode. If you keep the button depressed, the window will raise in manual mode and stop as soon as the button is released. The down button works in a similar way.
If you check the obstacle check box while the window is raising in automatic mode, the window will stop and go down a bit to release the pressure on the obstacle.
The model is animated during the execution. Use the scroll bar to view the state machine of the controller and the data flow model of the electro-mechanical subsystem.
You can examine how ModHel'X executes the model by using the "Next Snapshot", "Next update" and "Next step" buttons.
- "Next Snapshot" stops the execution at each snapshot.
- "Next update" stops the execution each time a block is updated.
- "Next step" stops after each step of the execution engine of ModHel'X.
Eclipse project and source code of the demo
You can import this archive as a project into your Eclipse workspace. The class to run is:
fr.supelec.modhelx.tests.powerwindow.SimpleWindowWithGUI
A run configuration with that name already exists in the project.