To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.

Getting predecessors and successors of the node in a Petri net

Hi all, 

I am trying to develop a code that allows me to edit a Petri net according to the log (ie: alignments).

I need methods that can return all predecessors and successors of a given node. 

Are there any implemented methods that I can use? or I need to develop my own?

if there are ones, I need the name of .jar, package and class that contains these methods.

Thank you =)

H.
Tagged:

Comments

  • hverbeekhverbeek Posts: 455
    Hi,

    If you have a Petri net in ProM, then you can get the incoming.outgoing edges through the methods getInEdges()/getOutEdges(). By visiting the target/source nodes of these edges, you can collect the predecessor/successors.

    The Petri nets are implemented in the PetriNets package (PetriNets.jar, see http://ais-hudson.win.tue.nl:8080/job/PetriNets/javadoc/), the underlying DirectedGraph in the ProM framework (ProM-Models.jar, see http://www.promtools.org/prom6/nightly/doc/).

    Kind regards,
    Eric.

  • hfkhammashhfkhammash Posts: 10
    Hi Eric.

    I used getPostSet()/getPreSet() in DirectedGraphUtils class and they work. :wink: 
    Thank you very much, I appreciate your help :smiley: 

    H.
Sign In or Register to comment.