question

Vinay S avatar image
0 Likes"
Vinay S asked Andrew O commented

Based on Global Table value Quantity flow item should be create

Name of the model log creation.fsm

In this model flow items should be creating based on "Globaltable1" (Consider Time and Quantity while creating also assign Alloy and Diameter label to created object) on the Queue1

FlexSim 22.2.1
proces flow
log-creation.fsm (35.2 KiB)
· 2
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

token Label Time need to get assigned a value of next creation time as a difference to current runtime. This means you compute the difference of row value + 1 and row value of your time column. This will delay your token until next creation time.

0 Likes 0 ·
Andrew O avatar image Andrew O commented ·

Hi @Shibananda C2, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann edited

Your current process flow is almost working, but you are always resetting the Row label to 1 and only create one item per row. You also don't need to write the values from the table to the token first. They can be read directly in "Create Objects" activity.

1664354502782.png

You could also copy the table to the Schedule source and create one token per item.

1664354561539.png

If you change the column order of the global table to reflect that of the source, you can even automate this with the following code (for example in the "On Model Reset" trigger)

treenode sourceSchedule = Model.find("/Tools/ProcessFlow/ProcessFlow/Source>variables/arrivals");
treenode globalTableData = Model.find("/Tools/GlobalTables/GlobalTable1>variables/data");
treenode copy = createcopy(globalTableData, sourceSchedule, 0, 0, 0, 1);
copy.name = "arrivals";

log-creation-fm.fsm


1664354502782.png (32.4 KiB)
1664354561539.png (20.3 KiB)
log-creation-fm.fsm (38.2 KiB)
5 |100000

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