question

kauan pedroso avatar image
0 Likes"
kauan pedroso asked Jason Lightfoot edited

Consume the time of a list

Hello !

I would like to take the time from my column called difference and transform my operating time of my robot. It is possible ? and yes, how to continue a line flow?


FlexSim 21.2.4
global tabledatabasesql server
· 1
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 ·
That's not enough information for an answer - please explain more about the process and data; upload your model; explain what the difference column should be used for (transform how?); include a snapshot that actually includes the difference.
0 Likes 0 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

When you import your data use standard SQL to filter the range of values.

Once the data is in a FlexSim table you can use (via a Table query) ARRAY_AGG(difference) to create an array of values which you put on the processing object/robot (as a label) when the model starts and then you can just put in the time field:

current.differences.shift()
· 6
5 |100000

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

kauan pedroso avatar image kauan pedroso commented ·

Hello @Jason Lightfoot

I managed to filter the data, but I didn't understand how I can use this in my robot's time. Can you show me an example of this ?

1680117924570.png

1. Table("GlobalTable1")[duniform(1, Table("GlobalTable1").numRows)][7]

I tried to do it that way, but when it reaches 32 cycles it ends up crashing.

0 Likes 0 ·
1680117924570.png (24.0 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ kauan pedroso commented ·

That looks more like you're wanting to sample the process time rather than replicate the process time sequence you had in data. For that you can use the Empirical Distribution.

To get the data in there from your global table use something like this:

Table.query("SELECT difference as Data FROM GlobalTable1").cloneTo(Model.find("Tools/EmpiricalDistributions/EmpiricalDistribution1>variables/data"));
0 Likes 0 ·
kauan pedroso avatar image kauan pedroso Jason Lightfoot ♦ commented ·

Sorry for my English, but actually I want to replicate the process time and not a sample, but I don't know how I can do that. I'm trying with your code above, I'm getting an error.

1680173292751.png

1680173343733.png

0 Likes 0 ·
1680173292751.png (12.2 KiB)
1680173343733.png (1.2 KiB)
Show more comments
Yumi Nishijima avatar image
0 Likes"
Yumi Nishijima answered kauan pedroso edited

Hi kauan, i think you can use the calculated table to put the difference time of your columns.
1680027184760.png
Probably you can use subset or partitions to filter by day and time.
The Calculated Table (flexsim.com)


1680027184760.png (48.2 KiB)
· 1
5 |100000

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

kauan pedroso avatar image kauan pedroso commented ·

Hello @Yumi Nishijima

So I already have the difference value in my table but I was wondering how can I use the difference column values for my robot and the other would be how to filter my InputTimestamp by seconds or date. I saw that you put the Calculated Table option, how can I consume this calculated table and how to filter the seconds or date I want.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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