Nav apraksta

Yentl Van Tendeloo e2e64dbd6a Updated README specifically to live modelling 8 gadi atpakaļ
bootstrap 10633dcc22 Fixed bootstrap file 8 gadi atpakaļ
doc 9090a37313 Added execute_model.py command 8 gadi atpakaļ
hybrid_server 90e9fb2ef3 Be more tolerant when a lot of data is transmitted 8 gadi atpakaļ
integration 2b60d7d576 Fixed state selection 8 gadi atpakaļ
interface c3e9b2ae69 Working simulation of FSA 8 gadi atpakaļ
kernel dd46c28b2d Debugging FSA semantics 8 gadi atpakaļ
model a6d3f0dedf Fixed referencing problem in model 8 gadi atpakaļ
scripts dd46c28b2d Debugging FSA semantics 8 gadi atpakaļ
state dd2a7f4c48 Fixed CBD semantics (without algebraic loops!) 8 gadi atpakaļ
.gitattributes 4998e5b904 Updated bootstrap with code for import_node; also made *.m files binary to git 9 gadi atpakaļ
.gitignore 2099d1bf39 Added all files created by fix_files automatically 9 gadi atpakaļ
README.md e2e64dbd6a Updated README specifically to live modelling 8 gadi atpakaļ

README.md

Installation

Installing the Modelverse is unnecessary, as it is mere Python code and doesn't use installation scripts. All scripts which are generally useful are found in the 'scripts' directory, and are written in OS-independent Python code.

You will, however, need to install a dependency: the SCCD compiler and runtime.

Next we specifically focus on using the Modelverse for live modelling. Note that these GUIs are mostly a proof of concept and therefore not very intuitive or user friendly. Nonetheless, they support live modelling of systems in their respective formalism.

Live Modelling of CBDs

To start live modelling of CBDs, start up the Modelverse with the following command.

python scripts/run_local_modelverse.sh 8001

When this has started, compile all CBD related files and its execution semantics with the following command.

python scripts/execute_model.sh http://localhost:8001 test bootstrap/*.alc integration/code/cbd_*.mvc integration/code/cbd_*.alc

After the previous command has finished, start up the GUI with the following command. Any other GUI, or even textual, is also possible. Only this GUI and a very minimal textual prompt are provided out-of-the-box.

cd interface/CBD
python main.py

In the GUI, you select the desired block in the top bar, and then create it by left-clicking in the canvas. Links can be created by selecting "Link" in the top bar, and dragging between two blocks while holding the right mouse button. Blocks can be deleted by middle clicking. To modify attributes of a block, such as the value of the constant block, left click it again.

Modifications can be done even during simulation, and will immediately be taken into account. If the background colours red, the model is not conforming and something is wrong (e.g., a constant block doesn't have a value). The background will turn grey again when the problem was resolved.

Live Modelling of FSAs

Live modelling of FSAs is identical to the live modelling of CBDs. Instead of loading CBD files, now load FSA files with the command shown below.

python scripts/execute_model.sh http://localhost:8001 test bootstrap/*.alc integration/code/fsa_*.mvc integration/code/fsa_*.alc

The GUI can be started similarly with the files in the folder interface/FSA. Commands are very similar, but there is no need to select the required kind of state and transition in the top bar, as there are only two options. To turn a state into the initial state, control-left-click the new initial state. Events can be injected by typing in the name of the event in the top right entry box, and clicking the event button.