question

Clara avatar image
0 Likes"
Clara asked Jeanette F commented

Real-Time Data

Good morning,

I'm trying to make a model with real-time data. To obtain this data I use user command with python. Every 3 minutes, it loads the data, the first time in the model it loads the entire table and then adds new data if there is any.

In my model, boxes enter the queue and I assign the value of a column of the data in order. It works fine as long as there is data, but when boxes enter and there is no more data it returns an error.

I need to know how to do so that, if there is no data, no box appears, but if, for example, 6 new rows of data appear, 6 boxes appear in the queue and those 6 new values are assigned.

I cannot attach the model due to confidentiality, but I am attaching an image of how I made it.


Thank you so much

Version: 24.0.2

1718775508181.png

FlexSim 24.0.2
pythondatarealtime
1718775508181.png (122.5 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.

1 Answer

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

I would try to have a single token that updates the data in a regular interval. It also keeps track of how many rows there were previously. After each update, it checks if the number of rows has increased and if so creates a new item for each (Run Sub Flow activity).

5 |100000

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