Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Petri-Net Editor Edge Constraints(Searching for the right Precondition Expression for Petri-Net Edges)
Petri-Net Editor Edge Constraints [message #1666365] Wed, 11 March 2015 17:09 Go to next message
Alexander Schledewitz is currently offline Alexander SchledewitzFriend
Messages: 10
Registered: March 2015
Junior Member
Hi everyone,

I'm trying to create a Petri-Net Editor with Sirius. My Ecore Diagram looks like this:

See attached file below.

In a Petri-Net edges can only connect Places with Transitions.

I've added an OCL Constraint:

invariant PetriNetConstraint:
self.source.oclType() <> self.target.oclType();

to my Ecore File and it delivers me the right Error after the validation of an example petri net.

Now I need the right Precondition Expression for my Relation Based Edge. How can I formulate in Acceleo or OCL that the Source Type of an Edge can't be the same as the Target Type?

Thanks for your help!

[Updated on: Thu, 12 March 2015 08:17]

Report message to a moderator

Re: Petri-Net Editor Edge Constraints [message #1668936 is a reply to message #1666365] Thu, 12 March 2015 18:02 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 508
Registered: May 2011
Senior Member
Hello,

I think the same expression should work but you can try [source.eClass() <> target.eClass()/] also.

Regards,
Steve


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Petri-Net Editor Edge Constraints [message #1682555 is a reply to message #1668936] Tue, 17 March 2015 19:42 Go to previous message
Alexander Schledewitz is currently offline Alexander SchledewitzFriend
Messages: 10
Registered: March 2015
Junior Member
Hey,

thank you, this is what I was looking for! I Couldn't find oclType() in the suggestions of the Precondition Expression field.

Regards,
Alex
Previous Topic:Edge centering problem
Next Topic:basicfamily.sample project in the tutorial
Goto Forum:
  


Current Time: Wed Mar 03 22:27:01 GMT 2021

Powered by FUDForum. Page generated in 0.02320 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top