greatspn/SOURCES

(SCPN) How to consume all Colored Tokens in a Place

MarceloJads opened this issue · 4 comments

I've been trying to simulate a phase-type distribution with GreatSPN, but something is not right.


I want to remove all tokens from P1 and from P2 when T2 is fired. Moreover, T2 must be active only when at least one token is in P1 AND at least one token is in P2. But, when a token arrives at place P1, the transition T2 is already becoming available.

Am I doing something wrong?

Use Max[#P2, 1] instead of just #P2 for the arc weight, to avoid zero-weighted arcs.
Beware that this extended syntax is only supported in the editor and in a few of the solvers.

Use Max[#P2, 1] instead of just #P2 for the arc weight, to avoid zero-weighted arcs. Beware that this extended syntax is only supported in the editor and in a few of the solvers.

Thanks for the reply! That works well for places without a Color Domain, but when I put that Multiplicity (Max[#P2, 1]) on the arc between P2 and T2, it is not recognized.

Yes, there is no way in the current expression language to express this with colours.

Yes, there is no way in the current expression language to express this with colours.

Oh, that's okay.