6.3. Animate a Model

The executable MarkedGraph Language is now defined with a graphical visualization. We can come back to the MarkedGraph Modeling Workbench to run it.

6.3.1. Restart the MarkedGraph Modeling WorkBench

First of all, we need to restart (File > restart) the MarkedGraph Modeling Workbench to take into account the modifications of the MarkedGraph xDSML.

6.3.2. Add the MarkedGraphAnimationViewpoint to wikipedia.aird

Right click on wikipedia.aird and select Viewpoints Selection. If Viewpoints Selection is not in the menu, double-click on the file wikipedia.aird.

Select Viewpoint Selection. Select Viewpoint Selection

Select MarkedGraphAnimationViewpoint. Select MarkedGraphAnimationViewpoint

You can now open the wikipedia graphical representation (wikipedia.air / Representation per category / markedgraph / MarkedGraph diagram / wikipedia MarkedGraph diagram). On the visualization, all places should be with a yellow background.

6.3.3. Update the "run wikipedia example" configuration

Open the "run wikipedia example" configuration" (Debug > Debug Configuration…​). Complete the "Animator" field with "/org.gemoc.sample.markedgraph.sample/wikipedia.aird" (use Browse to select it).

First, we will create a run configuration. Select "run / run Configurations"

6.3.4. Launch the execution of the model

We can now run the "gemoc" configuration (using debug). It opens the different views we have already seen but also the graphical visualization on the model.