question

Alexis B avatar image
0 Likes"
Alexis B asked Raja Sekaran commented

Round Robin restart at 0

Hello everyone.

Is it possible to make a round robin distribution which restart for each sequence ?

Here is explain what I want : Here

Thank you

FlexSim 18.1.1
round robinrestart
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Raja Sekaran avatar image
2 Likes"
Raja Sekaran answered Alexis B commented
@Alexis B

Attached the model with changes.

In this attached model, I have assigned the row number to each created token and reset the output stats of the "Decide?" activity based on the token row number.

Using the below code in "Decide?" activity to reset the output stats

  1. if(current.curTokenIndex != current.preTokenIndex)
  2. {
  3. model().find("Tools/ProcessFlow/ProcessFlow/Decide?").as(Object).stats.output.reset();
  4. }
  5. int output = getstat(activity, "Output", STAT_CURRENT, current);
  6. return (output % nrop(activity)) + 1;

alexis-support.fsm

Hope this helps

Thanks


alexis-support.fsm (27.7 KiB)
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.