Git Product home page Git Product logo

pipecore's People

Contributors

sjdayday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pipecore's Issues

Interfaces!

Now that PIPECore is pretty stable design some good interfaces :)

Get random enabled conflict - is missing one transition when selecting out of possible

When multiple transitions can be fired (I tested for choice, conflict: one place goes out to two transitions), always one transition is ignored and never fired (no matter how often you repeat).

Problem is: in PetriNetAnimator.java (in pipe.animation) in getRandomEnabledTransition the correct index is produced - but this is in [0, number_possible_fired_transitions - 1], but the for loop used for getting to the transition at that specific index starts at 1 - therefore it can never reach the last element of the Collection of fire-able transitions (line 80, should be corrected to for (int i = 0; i < index; i++) )

Index out of bounds trying to open an existing Petri net

Stacktrace:

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
at uk.ac.imperial.pipe.models.PetriNetHolder.getNet(PetriNetHolder.java:41)
at uk.ac.imperial.pipe.io.PetriNetIOImpl.read(PetriNetIOImpl.java:78)
at uk.ac.imperial.pipe.models.manager.PetriNetManagerImpl.createFromFile(PetriNetManagerImpl.java:95)
at pipe.controllers.application.PipeApplicationController.createNewTabFromFile(PipeApplicationController.java:169)

The real problem is that there are no messages given when errors are found while reading the pnml. If an error prevents the Petri net from being built, we next attempt to read the first (non-existent) PN, causing this exception.

Java library?

Is there some API (.jar library) in order to use PIPE utilities in java?

Embedding data in petrinets?

For my use case, I'd like to add data to the petrinets so as to make integration with a client application easier. Ideally, it would be possible to make annotations in the GUI and use them programatically after loading the petri net using the java api. Thus the client application can query the petri net about enabled transitions and marked places and use the annotations on those items to interpret them and decide which transitions to fire.

Is there any way to embed data that can be accessed via the java api? So far, the only solution I see is to use the id field (the 'name' is not shown/accessible in the GUI), which is ok as long as there are no duplicates in the data I want to annotate, and as long as a simple ID is all I need (but I am thinking about a solution that would require more data to be embedded).

InvalidRateException opening a Petri net with rate parameter referencing a place

A rate parameter can be created whose value is "#(P0)", i.e., referencing the number of tokens in place P0. If the Petri net is saved and then re-opened from the xml file, I get:

InvalidRateException: Rate of #(P0) is invalid (this message is only visible after the fix for issue 22)

Processing stops and the Petri net is not built.

I can't run the source code through the 'maven build' in the eclipse?

The error is as follows:
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.029 sec <<< FAILURE! - in PipeTest
verifyExampleNetLoadsAndAnimates(PipeTest) Time elapsed: 0.025 sec <<< ERROR!
java.lang.reflect.InvocationTargetException: null
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1288)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1263)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at Pipe.runPipeForTesting(Pipe.java:37)
at PipeTest.setUp(PipeTest.java:31)
Caused by: java.lang.NullPointerException: null
at javax.swing.ImageIcon.(ImageIcon.java:205)
at pipe.views.PipeApplicationView.(PipeApplicationView.java:129)
at pipe.views.PipeApplicationBuilder.build(PipeApplicationBuilder.java:54)
at Pipe.(Pipe.java:17)
at Pipe.(Pipe.java:9)
at Pipe$1.run(Pipe.java:31)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

verifyMenusAddedToGui(PipeTest) Time elapsed: 0.004 sec <<< ERROR!
java.lang.reflect.InvocationTargetException: null
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1288)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1263)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at Pipe.runPipeForTesting(Pipe.java:37)
at PipeTest.setUp(PipeTest.java:31)
Caused by: java.lang.NullPointerException: null
at javax.swing.ImageIcon.(ImageIcon.java:205)
at pipe.views.PipeApplicationView.(PipeApplicationView.java:129)
at pipe.views.PipeApplicationBuilder.build(PipeApplicationBuilder.java:54)
at Pipe.(Pipe.java:17)
at Pipe.(Pipe.java:9)
at Pipe$1.run(Pipe.java:31)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Results :

Tests in error:
PipeTest.setUp:31 ? InvocationTarget
PipeTest.setUp:31 ? InvocationTarget

Tests run: 207, Failures: 0, Errors: 2, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PIPE Parent Project ................................ SUCCESS [ 0.262 s]
[INFO] pipe-module-gui .................................... SUCCESS [01:34 min]
[INFO] PIPE-gui ........................................... FAILURE [ 4.700 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:39 min
[INFO] Finished at: 2016-01-18T13:07:03+08:00
[INFO] Final Memory: 35M/372M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project PIPE-gui: There are test failures.
[ERROR]
[ERROR] Please refer to F:\github\PIPE\pipe-gui\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :PIPE-gui

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.