Support for weights on all arcs
Bug #1232486 reported by
Mathias Grund Sørensen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
verifypn |
Fix Released
|
Critical
|
Unassigned |
Bug Description
For full compatibility with TAPAAL, VerifyPN should support weight on all arcs. Currently, weights/
Transport Arcs:
Weights on transport arcs are currently disregarded when decomposing into in- and outgoing arcs in the model parser and the weight is fixed to 1. The weight of the transport arc should be propagated to both replacing arcs.
Inhibitor Arcs:
TAPAAL supports weighted inhibitor arcs as well. Is it possible to add this support to VerifyPN?
Changed in verifypn: | |
status: | New → Incomplete |
Changed in verifypn: | |
status: | Triaged → Fix Committed |
Changed in verifypn: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Okay, so please provide two minimum examples... With associated queries that are not answered correctly.
This thing is definitely something we can add to the current test suite.
Weighted Transport Arcs ======= ======
=======
Also please document how weight are written on transport arcs, as well as their untimed semantics. Just to be clear, from looking at the code, it looks like a transport arc goes into a transition and out of the transition. Where as a normal arc is either a in-arc or a out-arc. Is it correct that a transport arc is both.
And is it possible to have both transport arc and normal arcs between the same transition and place, in both the output and input case?
As Mathias says, this looks like an easy hack, just adding the part from `parseArc` that handles inscription to `parseTransport Arc`.
Assuming the semantics are correct. Ie. transport arc from p1 to t1 to p2 with weight k, is equivalent to in-arc from p1 to t1 and out-arc from t1 to p2, where both in- and out-arcs have weight 2.
Weighted Inhibitor Arcs
===================
Again, I need semantics refreshed :)
So is it correct that an inhibitor arc with weight k from p1 to t1, inhibits the firing of t1, if p1 has k or more tokens?
Thus, unweighted inhibitor arcs have weight 1 and requires that the place has zero tokens before the transition can fire.
And a k-weighted inhibitor arc requires that the place has strictly less than k tokens before the transition can fire.
I think this is easily implemented too... By extending the `InhibitorArc` structure with a weight field and using this for construction of the transition pre-condition in `PNMLParser: :parse` .
Anyways, if you can write some examples that will make it easy for me to verify that it works, I might be able to get this done before I relocate on Tuesday, otherwise it might take another week or so...