Giter VIP home page Giter VIP logo

pnes-v3's Introduction

PNES - The Petri Net System

Cel

🇺🇸 EN

The Petri Net System (PNeS for short) is an integrated graphical computer tool for building, modifying, analyzing many types of Petri nets (including fuzzy Petri nets), as well as controlling a mobile robot. The aim of the lecture is to present the main functionalities of PNeS, with particular emphasis on the functionality related to the possibility of controlling mobile robots. The current version of PNeS allows us to control the Lego Mindstorms mobile robot performing various tasks, including avoiding obstacles, reaching the target, following an obstacle, finding an exit from the labyrinth and influencing the environment by selecting the appropriate manipulators. In fact, the list of tasks for the robot can be more extensive, it depends mainly on the hardware configuration of the available robot in the control mode.

🇵🇱 PL

TODO

Materiały

Instalacja i uruchomienie

TODO

Konfiguracja środowiska programistycznego

Dodawanie JMetro

Aby dodać bibliotekę JMetro należy pobrać .jar, gdyż repozytorium Maven nie instaluje poprawnie (zobacz ten post). Żeby to zrobić, pobierz plik jmetro-11.6.15.jar z GitHuba i dodaj jako bibliotekę do projektu, lub dodaj do własnego repozytorium maven - w sposób opisany we wspomnianym wcześniej poście.

Uruchamianie

Klasą główną jest klasa Main App.java

TODO

Wymagania

Java

  • Java 17 (w projekcie załączona Liberica)
  • Maven 3
  • JavaFX 17

Biblioteki

pnes-v3's People

Contributors

adiop55550 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

pnes-v3's Issues

Rewrite default mouse manager in visualizer

The default mouse manager used in the GraphStream graph view is hard to base from and its missing few features we would love to use.

TODO

  • Selecting single element (ui.selected attribute)
  • Selecting area of elements
  • Extending/ selection when holding shift (both single/area; RTS-like)
  • Moving single element
  • Moving selection of elements (would be impossible without the rewrite)
  • Clicking single element (ui.clicked attribute)
  • Hover detection (ui.mouseOver attribute)
  • Prevent unselecting on right click
  • Mark preselected elements (ui.preselected attribute)

Other

  • Snaping to grids
  • Rotate selected elements positions around the point (while holding R?)
  • Spread selected elements positions on line (while holding L?)
  • Scale selected elements positions away from the point (while holding S?)
  • Gravity move selected elements positions towards the point (while holding G?)
  • There might be way to implement a bit smoother scaling and moving around the graph (as the mouse manager runs on the thread used to display graph)

Arc name bug

Nazwy łuków mogą być przeciągane tylko wzdłuż nich, mimo ze pojawiają się poza nimi.
Gdy nazwę łuku przeciągniemy na Place bądź Transition nie da się ponownie zmienić jego położenia.

Przykład:

Jak widać powyżej nazwa łuku wchodzi na Place uniemożliwiając zmianę jej miejsca. Przemieszczenie Place'a nic nie daje gdyż nazwa jest zbyt blisko niego.

Możliwe rozwiązania:
-uniemożliwić przemieszczanie nazwy łuku(-),
-uniemożliwić przemieszczanie nazwy łuku tak blisko Place bądź Transition(+),
-umożliwić "chwytanie" nazwy łuku gdy jest tak blisko(-),

UPDATE 1:
Po ostatnim hotfixie Adriana nazwy łuków można schować pod Place. Co do Transition to nazwy są na nich. W obu przypadkach nie ma opcji "wyciągnięcia" ich stamtąd.(Oczywiście jest opcja kliknięcie leyaut ale to zmienia ułożenie całości)

Przykład:

Editor

In editor mode, user can add, delete and modify net elements.
These actions can be performed using assigned buttons in the toolbar.

RUN / EDIT mode

CenterPanel class has a field called ObjectProperty<EditorMode> editorMode. It is observable and can be bound to.

User can only interact with tools in the toolbar if editorMode is EditorMode.EDIT!

Add and delete

Tools

  • Place (create new Place)
  • Transition (create new Transition)
  • Arc (connect Place with Transition (or Transition with Place) with an Arc)
  • Delete (??) (delete existing Places, Arcs and Transitions)
  • Cursor (no tool)

Create tools

User should have an indication that the tool is active. Preferably a Ghost should appear on the screen showing where the new Element would be inserted.

Adding Arc

One (or both) of two options:

  1. User clicks input Node, then output Node.
  2. User clicks input Node, then output Node. After successful Arc creation, output Node becomes new input Node.

User should have an visual indicator (graph bg / cursor shape / other) that he is in add Arc mode. After clicking the first Node, Arc (Arrow) ghost appears and is following mouse. Nodes that can be connected highlight on hover. If user clicks a Node that cannot be connected, nothing happens OR he is prompted about it.

Option 2.

This is useful when user wants to connect multiple Nodes one after another. Maybe have a toggle for this mode?

Delete tools

User must have a clear visual indication that the action he is about to perform is potentially destructive.
Possible indicators:

  • Graph bg
  • Graph area outline
  • Cursor shape

When user deletes an Element of the net, all inputs and outputs should be updated to reflect these changes
When user deletes Place or Transition with inputs and/or outputs, those Arcs should be also deleted.

Modify

When user selects (clicks or box select) one or more Elements, then in the Properties Tab a list of the common properties should appear.

User should be able to see a list of selected Elements and deselect them using mouse.

In the Properties Tab, user should be able to modify selected Elements' properties. If more than one is selected, all are modified simultaneously.

Alpha release

I think we should release current state as v3.0.0-alpha
What do you think?

Undo/Redo system

Any editor need this essential thing.

TODO

  • System to store changes (hybrid generative and save state1)
  • Menu "Edit" with "Undo" and "Redo" (possibly with minimalistic description what about)
  • Keyboard shortcuts
  • Basic usage (moving nodes for now)
  • Allow grouping undoable actions (will come handy for cumulative actions)
Known issues

(checked = fixed)

  • Keyboard shortcuts doesn't work all the time
  • Limit undo history length (or group old actions into larger chunks using save state) to prevent higher memory usage in intensive session
  • Prevent undo while network is being simulated (running).
Extra features
  • Sound alert when no more actions to undo/redo.

Classes

  • UndoHistory
  • UndoableAction (provides way to undo it)
  • HardlyUndoableAction (can't provide way to undo it, state needs to be read from saved)
  • MoveNodeAction
  • UndoableGroup

Useful resources

Footnotes

  1. https://stackoverflow.com/questions/3541383/undo-redo-implementation

Adding Arcs in continuous mode

Adding Arcs do not work in continuous mode.
After the first Arc is added, next cannot be created until the Arc button is deselected and selected again.

issue.mp4

Net display layout

Nets need to be easy to be made easy to read without user moving each node pixel perfect...

TODO

  • "Net layout" menu (or submenu in "View" or "Organize"/"Edit" menu)
  • Automatic layout strategies
  • Grids
  • Direction
  • Distances
  • Minimalizing edges, bends
  • Grouping elements by type (places and transitions)
  • Allow partial layout applying (only to selection)
  • Push layout employment to history stack to allow Ctrl+Z (grouped, not as individual node moves)
  • Grouping elements by tags (or common styles? common names?)

Layout strategies ideas

  • TBA

Useful resources

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.