Visualizing Petri-nets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Visualizing Petri-nets

SergeStinckwich
Dear all,

I'm currently working on a process mining tool that should allow the
extraction of processes from events log. I will present this work
during the next MOOSEDAY at Paris.

At the moment, thanks to the Moose-Algo-Graph package, I'm able to
build Petri-nets from an event log.

I would like to able to visualize the resulting Petri-net with ROASSAL.
In a MOOSE 5.0 image :

===========================================================
Gofer it
         url: 'http://smalltalkhub.com/mc/SergeStinckwich/Moose-XES/main';
         package: 'Moose-XES'; load.
| graph view |
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
view := ROMondrianViewBuilder new.
view shape rectangle withText: [ :n | n model printString ].
view nodes: graph nodes.
view edges: graph edges from: #from to: #to.
view interaction.
view treeLayout.
view open
===========================================================
See the picture include.

Show I use a GraphBuilder in order to have something better ?

======================================================================
b := RTGraphBuilder new.
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).
b addAll: graph nodes.
b layout use: RTTreeLayout   new.
b
======================================================================

How I could add the edges and a layout that is more similar to the
following one ?

Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

Screen Shot 2014-05-19 at 15.02.53.png (139K) Download Attachment
Screen Shot 2014-05-19 at 15.09.56.png (72K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Visualizing Petri-nets

abergel
Hi Serge!

You pinpointed something that was missing and that Doru was not happy about the graph builder.

-=-=-=-=-=-=-=-=-=-=
| graph b |
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
b := RTGraphBuilder new.
b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).

b edges
seed: graph edges;
connectFrom: #from; 
connectTo: #to;
useInLayout.
b layout forceCharge: -200.
b addAll: graph nodes.
b open
-=-=-=-=-=-=-=-=-=-=

Gives the following:


Using a tree layout gives you this:


Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On May 19, 2014, at 9:25 AM, Serge Stinckwich <[hidden email]> wrote:

Dear all,

I'm currently working on a process mining tool that should allow the
extraction of processes from events log. I will present this work
during the next MOOSEDAY at Paris.

At the moment, thanks to the Moose-Algo-Graph package, I'm able to
build Petri-nets from an event log.

I would like to able to visualize the resulting Petri-net with ROASSAL.
In a MOOSE 5.0 image :

===========================================================
Gofer it
        url: 'http://smalltalkhub.com/mc/SergeStinckwich/Moose-XES/main';
        package: 'Moose-XES'; load.
| graph view |
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
view := ROMondrianViewBuilder new.
view shape rectangle withText: [ :n | n model printString ].
view nodes: graph nodes.
view edges: graph edges from: #from to: #to.
view interaction.
view treeLayout.
view open
===========================================================
See the picture include.

Show I use a GraphBuilder in order to have something better ?

======================================================================
b := RTGraphBuilder new.
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).
b addAll: graph nodes.
b layout use: RTTreeLayout   new.
b
======================================================================

How I could add the edges and a layout that is more similar to the
following one ?

Regards,
-- 
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/
<Screen Shot 2014-05-19 at 15.02.53.png><Screen Shot 2014-05-19 at 15.09.56.png>_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Visualizing Petri-nets

SergeStinckwich
Thank you Alex for your help !

I made a short video about extracting process models from an event log and visualization with ROASSAL:



On Mon, May 19, 2014 at 8:12 PM, Alexandre Bergel <[hidden email]> wrote:
Hi Serge!

You pinpointed something that was missing and that Doru was not happy about the graph builder.

-=-=-=-=-=-=-=-=-=-=
| graph b |

graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
b := RTGraphBuilder new.

b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).

b edges
seed: graph edges;
connectFrom: #from; 
connectTo: #to;
useInLayout.
b layout forceCharge: -200.
b addAll: graph nodes.
b open
-=-=-=-=-=-=-=-=-=-=

Gives the following:


Using a tree layout gives you this:


Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On May 19, 2014, at 9:25 AM, Serge Stinckwich <[hidden email]> wrote:

Dear all,

I'm currently working on a process mining tool that should allow the
extraction of processes from events log. I will present this work
during the next MOOSEDAY at Paris.

At the moment, thanks to the Moose-Algo-Graph package, I'm able to
build Petri-nets from an event log.

I would like to able to visualize the resulting Petri-net with ROASSAL.
In a MOOSE 5.0 image :

===========================================================
Gofer it
        url: 'http://smalltalkhub.com/mc/SergeStinckwich/Moose-XES/main';
        package: 'Moose-XES'; load.
| graph view |
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
view := ROMondrianViewBuilder new.
view shape rectangle withText: [ :n | n model printString ].
view nodes: graph nodes.
view edges: graph edges from: #from to: #to.
view interaction.
view treeLayout.
view open
===========================================================
See the picture include.

Show I use a GraphBuilder in order to have something better ?

======================================================================
b := RTGraphBuilder new.
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).
b addAll: graph nodes.
b layout use: RTTreeLayout   new.
b
======================================================================

How I could add the edges and a layout that is more similar to the
following one ?

Regards,
-- 
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/
<Screen Shot 2014-05-19 at 15.02.53.png><Screen Shot 2014-05-19 at 15.09.56.png>_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Visualizing Petri-nets

Tudor Girba-2
Beautiful!

Doru


On Tue, May 20, 2014 at 3:40 PM, Serge Stinckwich <[hidden email]> wrote:
Thank you Alex for your help !

I made a short video about extracting process models from an event log and visualization with ROASSAL:



On Mon, May 19, 2014 at 8:12 PM, Alexandre Bergel <[hidden email]> wrote:
Hi Serge!

You pinpointed something that was missing and that Doru was not happy about the graph builder.

-=-=-=-=-=-=-=-=-=-=
| graph b |

graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
b := RTGraphBuilder new.

b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).

b edges
seed: graph edges;
connectFrom: #from; 
connectTo: #to;
useInLayout.
b layout forceCharge: -200.
b addAll: graph nodes.
b open
-=-=-=-=-=-=-=-=-=-=

Gives the following:


Using a tree layout gives you this:


Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On May 19, 2014, at 9:25 AM, Serge Stinckwich <[hidden email]> wrote:

Dear all,

I'm currently working on a process mining tool that should allow the
extraction of processes from events log. I will present this work
during the next MOOSEDAY at Paris.

At the moment, thanks to the Moose-Algo-Graph package, I'm able to
build Petri-nets from an event log.

I would like to able to visualize the resulting Petri-net with ROASSAL.
In a MOOSE 5.0 image :

===========================================================
Gofer it
        url: 'http://smalltalkhub.com/mc/SergeStinckwich/Moose-XES/main';
        package: 'Moose-XES'; load.
| graph view |
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
view := ROMondrianViewBuilder new.
view shape rectangle withText: [ :n | n model printString ].
view nodes: graph nodes.
view edges: graph edges from: #from to: #to.
view interaction.
view treeLayout.
view open
===========================================================
See the picture include.

Show I use a GraphBuilder in order to have something better ?

======================================================================
b := RTGraphBuilder new.
graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
new example1)) run.
b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).
b addAll: graph nodes.
b layout use: RTTreeLayout   new.
b
======================================================================

How I could add the edges and a layout that is more similar to the
following one ?

Regards,
-- 
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/
<Screen Shot 2014-05-19 at 15.02.53.png><Screen Shot 2014-05-19 at 15.09.56.png>_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Visualizing Petri-nets

jfabry
In reply to this post by SergeStinckwich

That looks cool :-)

On May 20, 2014, at 9:40 AM, Serge Stinckwich <[hidden email]> wrote:

> Thank you Alex for your help !
>
> I made a short video about extracting process models from an event log and visualization with ROASSAL:
> https://www.youtube.com/watch?v=wdf80t32v-0
>
>
>
> On Mon, May 19, 2014 at 8:12 PM, Alexandre Bergel <[hidden email]> wrote:
> Hi Serge!
>
> You pinpointed something that was missing and that Doru was not happy about the graph builder.
>
> -=-=-=-=-=-=-=-=-=-=
> | graph b |
>
> graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
> new example1)) run.
> b := RTGraphBuilder new.
>
> b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
> b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).
>
> b edges
> seed: graph edges;
> connectFrom: #from;
> connectTo: #to;
> useInLayout.
> b layout forceCharge: -200.
> b addAll: graph nodes.
> b open
> -=-=-=-=-=-=-=-=-=-=
>
> Gives the following:
> <Screen Shot 2014-05-19 at 2.11.02 PM.png>
>
>
> Using a tree layout gives you this:
>
> <Screen Shot 2014-05-19 at 2.11.15 PM.png>
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On May 19, 2014, at 9:25 AM, Serge Stinckwich <[hidden email]> wrote:
>
>> Dear all,
>>
>> I'm currently working on a process mining tool that should allow the
>> extraction of processes from events log. I will present this work
>> during the next MOOSEDAY at Paris.
>>
>> At the moment, thanks to the Moose-Algo-Graph package, I'm able to
>> build Petri-nets from an event log.
>>
>> I would like to able to visualize the resulting Petri-net with ROASSAL.
>> In a MOOSE 5.0 image :
>>
>> ===========================================================
>> Gofer it
>>         url: 'http://smalltalkhub.com/mc/SergeStinckwich/Moose-XES/main';
>>         package: 'Moose-XES'; load.
>> | graph view |
>> graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
>> new example1)) run.
>> view := ROMondrianViewBuilder new.
>> view shape rectangle withText: [ :n | n model printString ].
>> view nodes: graph nodes.
>> view edges: graph edges from: #from to: #to.
>> view interaction.
>> view treeLayout.
>> view open
>> ===========================================================
>> See the picture include.
>>
>> Show I use a GraphBuilder in order to have something better ?
>>
>> ======================================================================
>> b := RTGraphBuilder new.
>> graph := (XESAlphaAlgorithm on: (XESParser parseString: XESParserTest
>> new example1)) run.
>> b nodes if:[:m| m type = #transition]; shape:(RTEllipse new size: 20).
>> b nodes if:[:m| m type = #place]; shape:(RTBox new size: 20).
>> b addAll: graph nodes.
>> b layout use: RTTreeLayout   new.
>> b
>> ======================================================================
>>
>> How I could add the edges and a layout that is more similar to the
>> following one ?
>>
>> Regards,
>> --
>> Serge Stinckwich
>> UCBN & UMI UMMISCO 209 (IRD/UPMC)
>> Every DSL ends up being Smalltalk
>> http://www.doesnotunderstand.org/
>> <Screen Shot 2014-05-19 at 15.02.53.png><Screen Shot 2014-05-19 at 15.09.56.png>_______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> Serge Stinckwich
> UCBN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://www.doesnotunderstand.org/
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev