[x] I documented the TypeScript code using JSDoc style.
[x] I added multiple screenshots/screencasts of my UI changes
[x] I translated all the newly inserted strings into German and English
Motivation and Context
This change introduces a new diagram type, namely reachability graphs in the context of Petri nets, a diagram type that is already implemented in Apollon. The final goal is to create a new exercise type in Artemis where students of the GBS (Grundlagen: Betriebssysteme und Systemsoftware) course are asked to construct the reachability graph of a given Petri net, or vice-versa, to construct the Petri net for a given reachability graph. This change resolves #130.
Description
A new diagram type was added: reachability graphs. They only consist of a single ElementType: markings. Markings are connected using arcs, the one and only RelationshipType within this diagram. New popups or rather update components have been added for markings and arcs. Two translated strings have been added to the respective translation files. Markings have a two properties (a name and a flag that indicates whether a marking is the initial marking). Arcs only have a name and their direction may be changed in the popup. Tests have been added for both components. The tests cover all changes that are possible in the respective popups.
Steps for Testing
Select the new diagram type "Reachability Graph".
Draw a set of markings. Assign different "names" to each marking (this actually is not the name of the marking but rather a comma separated list of integers, optionally surrounded by (), [] or {}, but that is irrelevant for testing the functionality). Define one marking as the initial marking (click on a marking and toggle the checkbox).
Connect the markings using arcs. Assign different names to each arc.
Make sure your graph gets saved correctly and reappears unchanged if you reload the page.
Screenshots
A reachability graph where a marking is currently selected. It is possible to change the text inside the node and to define a marking as the initial marking. This draws an arrow towards the selected marking, as shown in the top left of the screenshot.
The same graph in German language. The checkbox defines whether a marking is the initial marking.
An arc being edited. Arcs have a name and their direction can be toggled.
The new graph in the menu on the right. This diagram type only has one type of node/element, namely markings.
Checklist
Motivation and Context
This change introduces a new diagram type, namely reachability graphs in the context of Petri nets, a diagram type that is already implemented in Apollon. The final goal is to create a new exercise type in Artemis where students of the GBS (Grundlagen: Betriebssysteme und Systemsoftware) course are asked to construct the reachability graph of a given Petri net, or vice-versa, to construct the Petri net for a given reachability graph. This change resolves #130.
Description
A new diagram type was added: reachability graphs. They only consist of a single
ElementType
: markings. Markings are connected using arcs, the one and onlyRelationshipType
within this diagram. New popups or rather update components have been added for markings and arcs. Two translated strings have been added to the respective translation files. Markings have a two properties (a name and a flag that indicates whether a marking is the initial marking). Arcs only have a name and their direction may be changed in the popup. Tests have been added for both components. The tests cover all changes that are possible in the respective popups.Steps for Testing
()
,[]
or{}
, but that is irrelevant for testing the functionality). Define one marking as the initial marking (click on a marking and toggle the checkbox).Screenshots
A reachability graph where a marking is currently selected. It is possible to change the text inside the node and to define a marking as the initial marking. This draws an arrow towards the selected marking, as shown in the top left of the screenshot. The same graph in German language. The checkbox defines whether a marking is the initial marking. An arc being edited. Arcs have a name and their direction can be toggled. The new graph in the menu on the right. This diagram type only has one type of node/element, namely markings.