diff --git a/README.md b/README.md index 5674ed6..03cd9a1 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,94 @@ # Timed Petri Net Editor -[![CI testing](https://github.com/Lecrapouille/TimedPetriNetEditor/actions/workflows/ci.yml/badge.svg)](https://github.com/Lecrapouille/TimedPetriNetEditor/actions/workflows/ci.yml) - -[This project](https://github.com/Lecrapouille/TimedPetriNetEditor) is a -graphical interface for editing and running (timed) Petri nets and specially timed event -graphs which are a subclass of Petri nets with good mathematics properties for -modeling discrete event systems (DES) with [(max,+) -algebra](https://jpquadrat.github.io/). This tool can generate (max,+) code for -[Julia](https://julialang.org/) used in synergy with -[(max,+)](https://github.com/Lecrapouille/MaxPlus.jl) algebra toolbox running -with the [Julia](https://julialang.org/) language. This editor also exports the -net as figures (LaTeX, Graphivz) or to other applications (Symfony, -pn-editor ...) or generate C++ code (GRAFCET aka SFC sequential function chart -that could run i.e. on Arduino). +[TimedPetriNetEditor](https://github.com/Lecrapouille/TimedPetriNetEditor) is a +graphical interface for editing and running Petri nets. It offers some mathematics +tools for timed event graphs which are a subclass of timed Petri nets with good +mathematics properties for modeling discrete event systems with [(max,+) +algebra](https://jpquadrat.github.io/). + +**Note:** An online version is in gestation. +Here is the [link](https://lecrapouille.github.io/TimedPetriNetEditor/TimedPetriNetEditor.html). + +## What are Petri nets, timed Petri nets, timed event graph, GRAFCET? + +You can read this [internal document](doc/petri.md) for more information. Else +you can go to [Related lectures and projects](doc/biblio.md). + +## Application Overview The following picture is an overview of the look of the application. You can -click on it to watch a YouTube showing an example of timed Petri net running. +click on it to watch a YouTube showing an example of timed Petri net running +simulating emergency operators (French 911 call center) responding to people in +distress. Operators of level 1 filter non-critical cases (advice). Operators of +level 2 manage other cases: urgency and critical cases. For urgency cases, the +operator of level 1 hangs up when he makes the victim wait the operator of +level 2. For critical cases, the operator of level 1 waits with the victim until +an operator of level 2 pick up before hanging up. -[![TimedPetri](doc/pics/TimedPetri01.png)](https://youtu.be/hOhunzgFpcA) +[![TimedPetri](doc/pics/911.png)](https://youtu.be/hOhunzgFpcA) *Fig 1 - A timed Petri net (made with this editor).* -**Note:** An online version is in gestation. Here is the [link](https://lecrapouille.github.io/TimedPetriNetEditor/TimedPetriNetEditor.html). - -- [Why developing another Petri editor?](doc/why.md) -- [Work in progress](doc/wip.md) -- [What are Petri nets, timed Petri nets, timed event graph?](doc/petri.md) -- [How to compile and install the project?](doc/install.md) -- [Command line](doc/cli.md) -- [Mouse and key bindings for the graphical interface](doc/gui.md) -- [Controlling the editor through MQTT commands](doc/mqtt.md) -- [Description of the file format used for saving Petri net](doc/save.md) -- [Exporting the net](doc/export.md) -- [Exporting to C++ code](doc/grafcet.md) -- [Interface with Julia](doc/julia.md) -- [Examples](data/examples/README.md) -- [Related lectures and projects](doc/biblio.md) +Why developing another Petri editor? Because: +- This project has started as a continuation of [ScicosLab](http://www.scicoslab.org/)'s + (max,+) toolbox developed at INRIA (which is no longer developed) which missed + a graphical Petri editor associated with (max,+) algebra. +- Many Petri net editors in GitHub are no longer maintained (> 7 years) or that + I cannot personally compile or use (Windows system, Visual Studio compiler, + C#, Java ..) or the code is too complex (no comments) to add my own extensions. This + editor can be used for Julia language. + +## Compilation, Installation + +```sh +git clone https://github.com/Lecrapouille/TimedPetriNetEditor --depth=1 --recursive +cd TimedPetriNetEditor/ +make download-external-libs +make compile-external-libs +make -j8 +sudo make install +``` + +## Usage + +You can pass a Petri net file to the command line. See this [document](doc/save.md) +concerning the description of the file format used for saving Petri net. + +```sh +./build/TimedPetriNetEditor [data/examples/AppelsDurgence.json] +``` + +See: +- this [document](data/examples/README.md) showing some examples offered with this repo. +- ~~this [document](doc/gui.md) describing the mouse and key bindings for the graphical interface.~~ +- ~~this [document](doc/mqtt.md) describing how to control the editor through MQTT commands.~~ +- this [document](doc/export.md) Explaining how to export/import the net to/from other applications. + +## Debug inside Visual Studio Code + +Type F5 key to launch the application with a debugger. +You can modify the `.vscode/launch.json` to indicate + +## Julia integration + +The `make install` is needed for its usage with Julia. Once installed in your operating system, you can directly from +the [Julia](https://github.com/JuliaLang/julia) REPL (this part +is described in detail in a dedicated [document](julia.md)): + +```sh +julia> include("src/julia/TimedPetriNetEditor.jl") +counter (generic function with 1 method) + +julia> pn = petri_net() +PetriNet(0) + +julia> editor!(pn) +``` + +If you do not desire to install TimedPetriNetEditor on your operating system, +you will have to adapt the `DEFINES` in Makefile to indicate the path of the +`data/` folder (to find the fonts). You will also have to manually modify this +Julia file to indicate the correct path of the shared library +`libtimedpetrineteditor.so`. + +You can read this [document](doc/julia.md) concerning the API for Julia. diff --git a/data/examples/AppelsDurgence.json b/data/examples/AppelsDurgence.json index 6032941..68d60a5 100644 --- a/data/examples/AppelsDurgence.json +++ b/data/examples/AppelsDurgence.json @@ -1,36 +1,36 @@ { "revision": 3, - "type": "Timed Petri net", + "type": "Petri net", "nets": [ { "name": "AppelsDurgence", "places": [ - { "id": 0, "caption": "P0", "tokens": 0, "x": 403, "y": 111 }, - { "id": 1, "caption": "P1", "tokens": 0, "x": 523, "y": 259 }, + { "id": 0, "caption": "Filtrage de l'appel", "tokens": 0, "x": 402, "y": 72 }, + { "id": 1, "caption": "Attente d'une conference a 3", "tokens": 0, "x": 523, "y": 259 }, { "id": 2, "caption": "Conference a trois", "tokens": 0, "x": 83, "y": 438 }, { "id": 3, "caption": "Instructions avec operateur de niveau 2", "tokens": 0, "x": -40, "y": 505 }, - { "id": 4, "caption": "Operateur niveau 2", "tokens": 4, "x": 494, "y": 439 }, - { "id": 5, "caption": "Instructions avec operateur de niveau 1", "tokens": 0, "x": 210, "y": 244 }, - { "id": 6, "caption": "Musique attente", "tokens": 0, "x": 158, "y": 360 }, - { "id": 7, "caption": "Instructions avec operateur de niveau 2", "tokens": 0, "x": 808, "y": 440 }, - { "id": 8, "caption": "Instructions avec operateur de niveau 1", "tokens": 0, "x": 201, "y": 46 }, - { "id": 9, "caption": "Operateurs de niveau 1", "tokens": 4, "x": -38, "y": -20 }, - { "id": 10, "caption": "Victimes", "tokens": 7, "x": 403, "y": -109 }, + { "id": 4, "caption": "Centrale d'operateurs de niveau 2", "tokens": 4, "x": 351, "y": 553 }, + { "id": 5, "caption": "Instructions avec operateur de niveau 1", "tokens": 0, "x": 297, "y": 290 }, + { "id": 6, "caption": "Musique d'attente", "tokens": 0, "x": 158, "y": 360 }, + { "id": 7, "caption": "Instructions avec operateur de niveau 2", "tokens": 0, "x": 622, "y": 449 }, + { "id": 8, "caption": "Instructions avec operateur de niveau 1", "tokens": 0, "x": 125, "y": 138 }, + { "id": 9, "caption": "Centrale d'operateurs de niveau 1", "tokens": 4, "x": -38, "y": -20 }, + { "id": 10, "caption": "Victimes appellant les urgences", "tokens": 7, "x": 403, "y": -109 }, { "id": 11, "caption": "Actions urgentes", "tokens": 0, "x": 383, "y": 642 }, - { "id": 12, "caption": "Actions critiques", "tokens": 0, "x": 254, "y": 641 } + { "id": 12, "caption": "Actions critiques", "tokens": 0, "x": 200, "y": 643 } ], "transitions": [ - { "id": 0, "caption": "Critique", "x": 524, "y": 110, "angle": 315 }, - { "id": 1, "caption": "T1", "x": 247, "y": 439, "angle": 270 }, - { "id": 2, "caption": "T2", "x": -39, "y": 361, "angle": 90 }, - { "id": 3, "caption": "T3", "x": -40, "y": 602, "angle": 90 }, - { "id": 4, "caption": "Urgent", "x": 404, "y": 245, "angle": 270 }, - { "id": 5, "caption": "Appel d'urgence", "x": 403, "y": -21, "angle": 90 }, - { "id": 6, "caption": "T6", "x": 36, "y": 243, "angle": 270 }, - { "id": 7, "caption": "T7", "x": 675, "y": 360, "angle": 270 }, - { "id": 8, "caption": "Conseil", "x": 292, "y": 112, "angle": 225 }, - { "id": 9, "caption": "T9", "x": 50, "y": 47, "angle": 270 }, - { "id": 10, "caption": "T10", "x": 660, "y": 509, "angle": 270 } + { "id": 0, "caption": "Situation critique", "x": 524, "y": 110, "angle": 315 }, + { "id": 1, "caption": "Operateur de niveau 2 repond a l'appel", "x": 247, "y": 439, "angle": 270 }, + { "id": 2, "caption": "Operateur de niveau 1 quitte l'appel", "x": -39, "y": 361, "angle": 90 }, + { "id": 3, "caption": "Fin de l'appel", "x": -40, "y": 602, "angle": 90 }, + { "id": 4, "caption": "Situation d'urgence", "x": 404, "y": 181, "angle": 270 }, + { "id": 5, "caption": "Operateur de niveau 1 repond a l'appel", "x": 403, "y": -21, "angle": 90 }, + { "id": 6, "caption": "Transfer l'appel ver moperateur de niveau 2", "x": 36, "y": 243, "angle": 270 }, + { "id": 7, "caption": "Operateur de niveau 2 repond a l'appel", "x": 523, "y": 362, "angle": 270 }, + { "id": 8, "caption": "Situation de conseil", "x": 286, "y": 138, "angle": 225 }, + { "id": 9, "caption": "Fin de l'appel", "x": 50, "y": 47, "angle": 270 }, + { "id": 10, "caption": "Fin de l'appel", "x": 529, "y": 553, "angle": 270 } ], "arcs": [ { "from": "P0", "to": "T0" }, diff --git a/doc/biblio.md b/doc/biblio.md index c58b935..f8b2053 100644 --- a/doc/biblio.md +++ b/doc/biblio.md @@ -1,13 +1,9 @@ # Related lectures and projects -- ![en](https://lecrapouille.github.io/icons/en.png) ![fr](https://lecrapouille.github.io/icons/fr.png) https://jpquadrat.github.io/ Some research based on timed Petri net - and (max,+) algebra. -- ![en](https://lecrapouille.github.io/icons/en.png) ![fr](https://lecrapouille.github.io/icons/fr.png) https://github.com/Lecrapouille/MaxPlus.jl My (max,+) toolbox for - Julia, a portage of the http://www.scicoslab.org/ toolbox (since Scilab is no - longer maintained). -- ![en](https://lecrapouille.github.io/icons/en.png) http://www.cmap.polytechnique.fr/~gaubert/HOWARD2.html is the algorithm used - for computing the (max,+) eigenvalue used in ScicosLab MaxPlus toolbox and - that I reused in this project. +- ![en](https://lecrapouille.github.io/icons/en.png) ![fr](https://lecrapouille.github.io/icons/fr.png) https://jpquadrat.github.io/ Some research based on timed Petri net and (max,+) algebra. +- ![en](https://lecrapouille.github.io/icons/en.png) ![fr](https://lecrapouille.github.io/icons/fr.png) https://github.com/Lecrapouille/MaxPlus.jl My (max,+) toolbox for Julia, a portage of the http://www.scicoslab.org/ toolbox (since Scilab is no longer maintained). +- ![en](https://lecrapouille.github.io/icons/en.png) The book [SYNCHRONIZATION AND LINEARITY: An Algebra for Discrete Event Systems](https://www.rocq.inria.fr/metalau/cohen/SED/book-online.html) can be downloaded for free. The Scilab toolbox is based on this book. +- ![en](https://lecrapouille.github.io/icons/en.png) http://www.cmap.polytechnique.fr/~gaubert/HOWARD2.html is the algorithm used for computing the (max,+) eigenvalue used in ScicosLab MaxPlus toolbox and that I reused in this project. - ![en](https://lecrapouille.github.io/icons/en.png) http://www.unice.fr/dgaffe/recherche/outils_grafcet.html GRAFCET editor. - ![fr](https://lecrapouille.github.io/icons/fr.png) [ENSIAME IMS](https://www.fichier-pdf.fr/2014/06/16/cours-api-ims-2014-v1/) by JC. Popieul. - ![fr](https://lecrapouille.github.io/icons/fr.png) https://sites.google.com/view/apimou/accueil A Grafcet editor and code diff --git a/doc/cli.md b/doc/cli.md deleted file mode 100644 index 00a040b..0000000 --- a/doc/cli.md +++ /dev/null @@ -1,20 +0,0 @@ -# Command line - -The command line is optional. By default type of net is timed Petri. The type of -net is stored inside the file (GRAFCET, timed Petri net ...) but can be changed -(under condition for event graph) later from the editor menu. - -```sh -TimedPetriNetEditor [petri.json] -``` - -Where: -- `[petri.json]` is an optional Petri net file to load (JSON format). The type -of net is stored inside the json file ((timed) Petri net, timed graph event, -GRAFCET ...) but the GUI allows you to swith of type. - -Example: - -```sh -TimedPetriNetEditor data/examples/Howard2.json -``` diff --git a/doc/gui.md b/doc/gui.md deleted file mode 100644 index de807b2..0000000 --- a/doc/gui.md +++ /dev/null @@ -1,52 +0,0 @@ -# Mouse and key bindings for the graphical interface - -The editor does not offer any buttons, therefore all actions are directly made -from the mouse and the keyboard (like Emacs but without the Meta key ^^). -- `Escape` quit the application. The unsaved net will be asked for saving before the - application closes. -- `Left mouse button pressed` on a caption or in duration (*work in progress*) to edit it. - Press the Enter key to validate the content or press the Escape key to abort. -- `Left mouse button pressed`: add a new place. Note: this action is ignored if - you are trying to create a node on an already existing node (place or - transition). -- `Right mouse button pressed`: add a new transition. Note: this action is - ignored if you are trying to create a node on an already existing node (place - or transition). -- `Middle mouse button pressed`: start creating an arc either from an existing - node (place or transition) as the origin or, if no node was selected by the mouse - cursor, the editor will find the correct type depending on the destination - node. -- `Middle mouse button released`: end creating an arc either from the selected - node (place or transition) as the destination or, if no node is selected, the - editor will find the correct type depending on the origin node. In the case - you have tried to link two nodes of the same type (two places or two - transitions) then an intermediate node of the opposite type will be created as - well as an intermediate arc. -- `Middle mouse scroll`: zoom/unzoom the view. -- `Up`, `Down`, `Right`, `Left` keys: move the view. -- `L` key: same action as the middle mouse button. -- `M` key: move the node (place or transition) selected by the mouse cursor. -- Linux: `Delete` key: remove a node (place or transition). Note: since all identifiers - shall be consecutive (no gaps), the unique identifier of the last created node - of the same type will receive the unique identifier of the deleted one. Note: - arcs cannot yet be deleted. -- MacOSX: `\` for deleting node. - -The whole GUI is currently in refacto. The following commands will be removed in next -commits: -- `Z` key: clear the whole Petri net. -- Linux: `+`, `-` keys: add/remove a token on the place selected by the mouse cursor. -- MacOSX: `[`, `]` keys: add/remove a token on the place selected by the mouse cursor. -- `PageUp`, `PageDown` keys: rotate CW or CCW the transition selected by the - mouse cursor. -- `R` or `SPACE`key: start (run) or stop the simulation. Note: if the simulation - is stalled (no possible burning tokens), then the simulation will automatically - stops and returns to the edition mode. -- `S` key: save the Petri net to a JSON file. -- `Shift S` key: save as the Petri net to a JSON file. -- `O` key: load a Petri net from a JSON file. -- `E` key: is the current timed Petri net a timed graph event? -- `C` key: show the first critical circuit if and only if the Petri net is a - graph event. -- `F1` key: take a screenshot of the application. -- `H` key: show this help. diff --git a/doc/install.md b/doc/install.md deleted file mode 100644 index 3f41362..0000000 --- a/doc/install.md +++ /dev/null @@ -1,146 +0,0 @@ -# How to compile and install the project? - -This project is developed in C++14 and compiled with a Makefile (it does not use CMake) -for Linux, Mac OS X and Web(if compiled with Emscripten). - -Here are prerequisites to compile this project are: -- The GUI is made with [Dear ImGui](https://github.com/ocornut/imgui), - [raylib](https://github.com/raysan5/raylib) used as Dear ImGui backend, and other - Dear ImGui widgets (ImPlot). -- [MQTT mosquitto](https://github.com/eclipse/mosquitto): `sudo apt install - libmosquitto-dev mosquitto mosquitto-clients`. -- Optionally, libdwarf: `sudo apt-get install libdw-dev` (needed when compiling - this project in debug mode because it will use - [backward-cpp](https://github.com/bombela/backward-cpp) for showing the stack - trace in case of segfault) else in the Makefile replace `BUILD_TYPE = debug` - by `BUILD_TYPE = release`. - -Optionally, a [Julia 1.x](https://julialang.org/) code binding the C++ API can be -optionally used for working in synergy with my [(max,+) toolbox](https://github.com/Lecrapouille/MaxPlus.jl). -You can install Julia from https://julialang.org/downloads but this does not impact the standalone graphical editor. - -## Clone the project - -```sh -git clone https://github.com/Lecrapouille/TimedPetriNetEditor --depth=1 --recursive -``` - -The recursive argument is important: it allows to clone my Makefile helper. - -## Compile the project for Linux and Mac OS X - -```sh -cd TimedPetriNetEditor/ -make clean -make download-external-libs -make compile-external-libs -make -j8 -``` - -Compiled files are in `build` folder. - -Where: -- `make download-external-libs` is needed to be done once for downloading - third-parts libraries (it replaces older). -- `make compile-external-libs` is needed to be done once for compiling third-parts libraries. -- `-j8` is to be adapted to the number of CPU cores of your computer (8 cores in my case). - -## Compile the project for Emscripten - -Install the Emscripten environament, and type: - -```sh -cd TimedPetriNetEditor/ -make download-external-libs -emmake make compile-external-libs -emmake make -j8 -``` - -## Compile with alternative compiler - -You can change your compiler with `CXX=clang++-13` for example. You can add `V=1` -for verbosity. - -```sh -cd TimedPetriNetEditor/ -make clean -make download-external-libs -make CXX=clang++-13 compile-external-libs -V=1 make CXX=clang++-13 -j8 -``` - -## Installation, execution - -Once compiled, you can run the TimedPetriNetEditor application, you can: -```sh -./build/TimedPetriNetEditor -``` - -For Mac Os X a bundle application is present. - -For Web page: you can do either: -- `make run` (**note:** small but currently it rebuilds the whole project each time). -- `cd build; emrun TimedPetriNetEditor.html` - -For Julia developers, you can use this editor in synergy with my Julia -[(max,+)](https://github.com/Lecrapouille/MaxPlus.jl) toolbox. The easier way to -achieve it is to you install TimedPetriNetEditor on your operating system (this -will install a shared library needed that can be found by Julia **note:** not yet -made with Mac OS X): - -```sh -sudo make install -``` - -For example on Linux: -``` -*** Installing: doc => /usr/share/TimedPetriNetEditor/0.3.0/doc -*** Installing: examples => /usr/share/TimedPetriNetEditor/0.3.0/examples -*** Installing: data => /usr/share/TimedPetriNetEditor/0.3.0/data -*** Installing: libs => /usr/lib -*** Installing: pkg-config => /usr/lib/pkgconfig -*** Installing: headers => /usr/include/TimedPetriNetEditor-0.3.0 -*** Installing: src => /usr/include/TimedPetriNetEditor-0.3.0 -``` - -Once installed, you can call directly the Petri net editor: -```sh -TimedPetriNetEditor -``` - -## Command line - -`TimedPetriNetEditor` takes an optional Petri file in the command line -for example one inside `data/examples`: - -```sh -TimedPetriNetEditor petri.json -``` - -## Debug with Visual Studio Code - -Type F5 key to launch the application inside a debugger. -You can modify the `.vscode/launch.json` for example to modify -with file to start with a differnet Petri file. - -## Julia integration - -Once installed in your operating system, you can directly from -the [Julia](https://github.com/JuliaLang/julia) REPL (this part -is described in detail in a dedicated [document](julia.md)): - -```sh -julia> include("src/julia/TimedPetriNetEditor.jl") -counter (generic function with 1 method) - -julia> pn = petri_net() -PetriNet(0) - -julia> editor!(pn) -``` - -If you do not desire to install TimedPetriNetEditor on your operating system, -you will have to adapt the `DEFINES` in Makefile to indicate the path of the -`data/` folder (to find the fonts). You will also have to manually modify this -Julia file to indicate the correct path of the shared library -`libtimedpetrineteditor.so`. diff --git a/doc/pics/911.png b/doc/pics/911.png new file mode 100644 index 0000000..04e297a Binary files /dev/null and b/doc/pics/911.png differ diff --git a/doc/save.md b/doc/save.md index 389642f..0d6d208 100644 --- a/doc/save.md +++ b/doc/save.md @@ -1,17 +1,16 @@ # Description of the file format used for saving Petri net JSON file format has been chosen for saving Petri net. This was initially made -to be compatible with -[pnet-simulator](https://github.com/igorakim/pnet-simulator) but the format is no longer -compatible. Here, is an example of its content: +to be compatible with [pnet-simulator](https://github.com/igorakim/pnet-simulator) +but the format is no longer compatible. Here, is an example of its content: ```json { - "revision": 2, + "revision": 3, + "type": "Timed Petri net", "nets": [ { "name": "Hello World", - "type": "Timed Petri net", "places": [ { "id": 0, "caption": "P0", "tokens": 1, "x": 184, "y": 295 }, { "id": 1, "caption": "P1", "tokens": 0, "x": 513, "y": 295 } @@ -29,7 +28,7 @@ compatible. Here, is an example of its content: } ``` -Json file has revison number concerning its syntax (here version 2). Currently +Json file has revison number concerning its syntax (currently version 3). Currently only an array with a single net is loaded (`"nets": [ { ... ] ]`). A Petri net is composed of three arrays (the `[ ]`): `Places`, `Transitions` and @@ -37,7 +36,8 @@ A Petri net is composed of three arrays (the `[ ]`): `Places`, `Transitions` and places, one transition, and two arcs. Places and Transitions: -- their unique identifier (unsigned int) i.e. `0`, `1`. +- their unique identifier (unsigned int) i.e. `0`, `1`. All ids shall be + consecutive (no holes). - their caption is a string with spaces accepted. - their X and Y coordinate (float) in the screen i.e. `T0` is placed at `(351,295)`. @@ -46,14 +46,13 @@ Places and Transitions: - for transition only: the angle (in degree) of rotation when displayed. Arcs: -- have no unique identifier. -- are directed links between two nodes of the different types given the unique - identifier (i.e. the first arc links the origin place `P0` to the destination - transition `T0`. Therefore an arc cannot link two places or link two - transitions. +- re directed links between two nodes of the different types (i.e. the first + arc in this example, links the origin place `P0` to the destination transition `T0`). + Therefore an arc cannot link two places or link two transitions. +- have no identifiers because the pair origin and destination nodes make them unique. - has a unit of time (positive value) i.e. the arc `T0 --> P1` has 3 units of times (float). This time is only used for arc `Transition` to `Place` this means that for arc `Place` to `Transition` this value is not used. -Petri net: -- Have a name (here "Hello World") and is typed of "Timed Petri net". +Net: +- Have a name (here "Hello World") and is typed of "Timed Petri net" or . diff --git a/doc/why.md b/doc/why.md deleted file mode 100644 index 81af1f0..0000000 --- a/doc/why.md +++ /dev/null @@ -1,13 +0,0 @@ -# Why developing another Petri editor? - -Because: -- This project has started as a continuation of - [ScicosLab](http://www.scicoslab.org/)'s (max,+) toolbox that my father - developed at INRIA and which is no longer developed. There are no Petri - editors with (max,+) on GitHub. Currently, there is no Petri net editors - available for Julia. -- Many Petri net editors in GitHub are no longer maintained (> 7 years) or that - I cannot personally compile or use (Windows system, Visual Studio compiler, - C#, Java ..) or the code is too complex (no comments) to add my own - extensions. - diff --git a/doc/wip.md b/doc/wip.md deleted file mode 100644 index 72aa790..0000000 --- a/doc/wip.md +++ /dev/null @@ -1,16 +0,0 @@ -# Work in progress - -- The whole GUI is currently in refacto. It will change a lot in next commits. -- Time duration are not yet correctly editable from the net. Use the menu instead. -- Showing critical cycles for graph events does not support having transitions - without predecessors (inputs). For example this Petri net: `T0 -> P0 -> T1`. - *Workaround:* Either modify your net either by removing your inputs or making - inputs cycling to themselves with a `-inf` time (which makes duality issues). -- Not all error messages are displayed on the GUI. Read the logs on your Unix - console. -- We cannot change the color of nodes and arcs. We cannot merge several nodes - into a sub-net for simplifying the net. Cannot delete arcs. Cannot make - undo/redo actions. -- Use bezier to draw arcs. Text and arrows are mixed together. -- Julia API: missing add/remove arcs. -- Code for some export/import files are here but not yet done. diff --git a/tests/HowardTests.cpp b/tests/HowardTests.cpp index 2fdfbf5..fa1f858 100644 --- a/tests/HowardTests.cpp +++ b/tests/HowardTests.cpp @@ -140,7 +140,7 @@ TEST(TestHoward, TestPetriNetSemiSimple) // Load a net that is not event graph ASSERT_STREQ(loadFromFile(net, "../data/examples/AppelsDurgence.json").c_str(), ""); - ASSERT_EQ(net.type(), TypeOfNet::TimedPetriNet); + ASSERT_EQ(net.type(), TypeOfNet::PetriNet); ASSERT_EQ(net.isEmpty(), false); res = findCriticalCycle(net); ASSERT_EQ(res.success, false);