question

ighiri-mehdi avatar image
0 Likes"
ighiri-mehdi asked ighiri-mehdi commented

Using an Event Triggered Source with a Global Table in FlexSim

Hello everyone, I'm new to FlexSim. I'm trying to use an Event Triggered Source based on a Global Table, but I can't find a way to check the entire column of the table. My example is as follows: I have several storage zones that vary depending on the products. I want to create a token once one of the products reaches the minimum tonnage. Attached is an example of the table.

1743001155353.png

FlexSim 25.0.2
processflowglobal tableevent-triggered source
1743001155353.png (7.3 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered ighiri-mehdi commented

You can set the table cells to contain tracked variables and then listen to those, but only individually. I think it would be better to implement a check in the same code that changes the table values. If the new value is below the safety level, the code creates a token.

In the attached model this is done in the OnExit trigger of the queue.

create-token-example.fsm


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

ighiri-mehdi avatar image ighiri-mehdi commented ·

Thank you Felix

That's what I thought, so we can't check multiple values at the same time in a table within the 'Event-Triggered Source' object. I wanted to use a Watch Logic, Because the table could change through several codes elsewhere in the model, that's why I wanted a Watch logic.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann ighiri-mehdi commented ·

Then you will have to use the tracked variable option and have one event per row. In the attached model I wrote an experimental script to automate adding the events to an Event-Triggered Source. You have to add the event for the first row manually, then the script can copy that and only needs to adjust which node it listens to and the threshold.

auto-add-events.fsm

1 Like 1 ·
auto-add-events.fsm (31.7 KiB)
ighiri-mehdi avatar image ighiri-mehdi Felix Möhlmann commented ·

Thank you, this perfectly meets my needs!

0 Likes 0 ·