question

Ajay Bhesaniya avatar image
2 Likes"
Ajay Bhesaniya asked JUanGarcia commented

Pull Strategy for Sink using Global Table for Demand

FlexSim 16.0.1
global tablepull strategy
· 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.

Sam Stubbs avatar image Sam Stubbs ♦ commented ·
1 Like 1 ·
Ajay Bhesaniya avatar image Ajay Bhesaniya commented ·
1 Like 1 ·
extrastorage.fsm (32.4 KiB)
JUanGarcia avatar image JUanGarcia commented ·

In our model the ItemCounts doesn´t counts. For that reason in the second 0 the sink takes all at once.

0 Likes 0 ·
JUanGarcia avatar image JUanGarcia JUanGarcia commented ·
0 Likes 0 ·
ddmrp-question.fsm (71.4 KiB)
Sam Stubbs avatar image
2 Likes"
Sam Stubbs answered Ben Wilson commented

· 3
5 |100000

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

Ajay Bhesaniya avatar image Ajay Bhesaniya commented ·
0 Likes 0 ·
Sam Stubbs avatar image Sam Stubbs ♦ Ajay Bhesaniya commented ·
0 Likes 0 ·
Ajay Bhesaniya avatar image Ajay Bhesaniya commented ·
0 Likes 0 ·
Helen avatar image
0 Likes"
Helen answered Sam Stubbs commented

Thank you for this thread, it's being really helpful. Nevertheless, I have additional questions on it @Sam Stubbs. In this code, you compare the parts that have been shipped (I guess that the value is reset every hour but don't see how) with the items that should be shipped hourly. The second part of the equation is clear, it seeks for row Current hour and column item type for the column in the table demand. But it's not clear for me what does the first part do.

gettablenum(label(current, "ItemCounts"),getitemtype(item),1) >= gettablenum("demand",CurrentHour,getitemtype(item))

Thanks a lot!

Helen


· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

The sink possesses a label called "ItemCounts". This label contains a table that tracks how many items of each type the sink has received by incrementing the respective value whenever an item enters the sink (first function in the On Entry trigger).
The first part of the condition reads the value for the current item's type from that table label which then gets compared to the target value from the global table.

You can see the table view of the label by rightclicking on it and choosing "Explore -> As Table".

1673852924025.png

1673852932955.png

The reset of the values happens in the User Event "Track Current Hour".

1673853013532.png

3 Likes 3 ·
1673852924025.png (5.3 KiB)
1673852932955.png (6.5 KiB)
1673853013532.png (8.5 KiB)
Helen avatar image Helen commented ·

Thank you @Felix Möhlmann

0 Likes 0 ·