Giter Site home page Giter Site logo

Add support for Petri Nets about apollon HOT 7 CLOSED

ls1intum avatar ls1intum commented on July 29, 2024
Add support for Petri Nets

from apollon.

Comments (7)

TobiasPr avatar TobiasPr commented on July 29, 2024

@Garfield96 my first implementation would look like this:
image

For the sake of consistency with the other diagrams, I kept the coloring to black and white. - I will think about a solution to the coloring of the different element types.

Please be aware, that we currently do not support any kind of formula symbols as text input. Would that be a requirement for you?

from apollon.

Garfield96 avatar Garfield96 commented on July 29, 2024

@TobiasPr This looks already great. I would recommend making the tokens a little bit smaller so that they will not touch each other.

I would consider symbols as nice-to-have but its not a requirement.

from apollon.

TobiasPr avatar TobiasPr commented on July 29, 2024

@Garfield96 I included your feedback and deployed a new version to the standalone version to Apollon which includes a beta version of petri nets, so you can test out the new diagram type. Any feedback is welcome

from apollon.

Garfield96 avatar Garfield96 commented on July 29, 2024

@TobiasPr Thank you. I tested it and it worked fine. The last feature missing in order to use it is support for capacities and multiplicities.

from apollon.

TobiasPr avatar TobiasPr commented on July 29, 2024

Edited
Updated once more, looks like this now
image

I did not constraint the amount of tokens in a place to the capacity. In my opinion, that's the responsibility of the student / modeler. I am unsure about whether I chose a good depiction of the capacity for places, since I couldn't find any examples online. Contrary to your initial request, I added a "C=" in front of the capacity for better readability. Capacities are displayed if its's different from the default, which is 1.
For adding multiplicity, you can double click an arc and enter the number (note - free text is also allowed, because it was easier in the current data model). Multiplicities are also only displayed if it is different from the default value, which is now inifinity

I was thinking about boolean petri nets - in my opinion it would also be okay to move the responsibility for modeling it correctly to the modeler/student and just provide the editor to fulfill the task (you can model boolean petri nets already in this diagram type).

from apollon.

Garfield96 avatar Garfield96 commented on July 29, 2024

Thanks for the update.

I did not constraint the amount of tokens in a place to the capacity.

This is fine.

I am unsure about whether I chose a good depiction of the capacity for places,

We normally don't use C=... but it's ok to use it here since it helps with readability.

Capacities are displayed if it's different from the default, which is 1.

The default is infinity and multiplicities have a default value of 1.

I tested it in Firefox and in Chrome and found a few bugs:
image
The token field is wider than the menu, which is inconvenient (only happens in Firefox).

Another bug which was reproducible in both browsers:
image
The infinity sign and a number are displayed on top of each other.

This effect can be triggered by:

  1. Create a new place
  2. Open context menu
  3. Increase capacity by one using the increase button
  4. Click on the infinity symbol
  5. Click again on the increase button

Also reproducible in both browsers:
image
The context menu is not attached to the item it belongs to.

How to reproduce:

  1. Open context menu
  2. Use browser zoom

from apollon.

TobiasPr avatar TobiasPr commented on July 29, 2024

both issues will be fixed in next release

from apollon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.