CPN Tools, ML Language: Compile Error when generating code

813 Views Asked by At

I am trying to implement Token Bucket algorithm with the use of CPN Tools. I must say that I am very pleased with the tools and the results it provides.

Now, concerning my problem.

Firstly, I tried to build a token bucket model with just the use of black tokens and integers. So far it worked flawlessly.

Secondly, I tried to change black tokens with actual data to send (I used the Simple protocol example sending the message: "Modelling and Analysis by Means of Coloured Petri Nets.) The problem I am having is when I try to send multiple data packets (see the model image I attached). The arc from place "Bucket" to Transmit k" and the arc from "Bucket" to "Transmit n" are where to problem is arising and I do not know how to fix it. On the arc I have inscriptions which send multiple packets (kx to send k packets and n x to send n packets)

Sometimes I would get error "Cannot bind from large color set" or the" InternalError Compile Error when generating code ... " IMAGE: https://i.stack.imgur.com/HghTS.png

Both errors arise in the transitions "Transmit n" and "Transmit k".

Just for a reference, I also attached image where I change the arc inscription from place Bucket to Transmit transitions, so I am sending only one packet. Then it works but it is not TokenBucket then anymore. IMAGE: https://i.stack.imgur.com/hjY1x.png

If you could help, I would very much appreciate it.

I can also upload my CPN model if you wanna see it for youself.

0

There are 0 best solutions below