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

if(current.curTokenIndex != current.preTokenIndex)
{
model().find("Tools/ProcessFlow/ProcessFlow/Decide?").as(Object).stats.output.reset();
}
int output = getstat(activity, "Output", STAT_CURRENT, current);
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.

Alexis B avatar image Alexis B commented ·

@Raja Sekaran

Hello. Thank you for answer.

Your model look like what I want but the token id:4 and id:5 should be reverse.

Can you change that ?

0 Likes 0 ·
Raja Sekaran avatar image Raja Sekaran Alexis B commented ·

@Alexis B

I have reattached the model with the changes. Hopefully, this will work the way you wanted to.

alexis-support-v10.fsm

Thanks

1 Like 1 ·
Alexis B avatar image Alexis B Raja Sekaran commented ·

@Raja Sekaran

Thank you Raja. This is exactly what I want.

1 Like 1 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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