"Using Global Lookup Table" not working

"Using Global Lookup Table" not working

lucas_braga1
Not applicable
48 Views
9 Replies
Message 1 of 10

"Using Global Lookup Table" not working

lucas_braga1
Not applicable

[ FlexSim 7.5.4 ]

I have a processor, a queue and a sink. I want the sink to pull a certain quantity of items (that is already written on a Global Table cell) of the queue. I'm using the "Global Lookup Table" option, but even when the cell number is 0, all items go straight to the sink.

So is there some option/code that can do what I'm trying to do (receive/pull a exact quantity of items)? It doesn't necessarily has to be a sink...

Accepted solutions (1)
49 Views
9 Replies
Replies (9)
Message 2 of 10

jing_chen
Not applicable

"the cell number is 0" means Sendtoport trigger of the queue will return 0, while return 0 in this trigger means "First Available", and it still send items to downstream.

If you do not want to send items, you will make the cell number be "-1".

Message 3 of 10

lucas_braga1
Not applicable

For example, the tablecell is now 2, 4 items were processed at total... but all of them went straight to the Sink. I don't understand

0 Likes
Message 4 of 10

philboboADSK
Autodesk
Autodesk
Accepted solution

Please post a model showing the issue. We can't explain what is happening unless we can duplicate the issue.



Phil BoBo
Sr. Manager, Software Development
Message 5 of 10

lucas_braga1
Not applicable

model-global-lookup.fsm Don't understand how the function works, the quantity of items that go to the Sink is the not the same as the number on the table cell.

0 Likes
Message 6 of 10

philboboADSK
Autodesk
Autodesk

The "By Global Table Lookup" pick option in the Pull Strategy is looking up what port to pull from out of a table. It doesn't control the quantity of items to pull.

The return value of the Pull Strategy is which input port to receive the next item from.

From the User Manual documentation on the Pull Strategy trigger:

"Pull Strategy - This parameter is only visible if "Pull" is checked. This picklist returns the input port number connected to the object that the next flowitem is to be pulled from. This field is evaluated only on reset of the model and when the pulling object becomes ready to receive its next flowitem."



Phil BoBo
Sr. Manager, Software Development
Message 7 of 10

lucas_braga1
Not applicable

Oh, got it. Thanks for explaning this pick option 🙂

So there's some option/code that can do what I'm trying to do (receive/pull a exact quantity of items)? It doesn't necessarily has to be a sink...

0 Likes
Message 8 of 10

philboboADSK
Autodesk
Autodesk

Close your input after you've received a certain number of objects:

2067-close-inputs.png



Phil BoBo
Sr. Manager, Software Development
Message 9 of 10

joerg_vogel_HsH
Mentor
Mentor

If you set an item to be hold (return -1), you have to release this item explicitly by releaseitem(obj item, port). obj item is a reference to the item to release.

Message 10 of 10

lucas_braga1
Not applicable

Thank you! 🙂

0 Likes