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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Clara,

Thank you for contributing to our community! We couldn't identify a maintained license or subscription linked to your account.

You may need to update your profile information to identify yourself as a license owner or their associate. Check out our article for how to ensure you receive timely support. If you update your profile comment back to let us know - we'll adjust the priority of your post accordingly.

If your current license is expired, please contact your local distributor to renew.

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Clara, 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 comment back to reopen your question.

0 Likes 0 ·

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.