Abhay Bajpai avatar image
Abhay Bajpai asked Jason Lightfoot commented

Make database of various models w/t cycle time to each at different stations

I have imported various objects (from Sketchup) that I plan to use Map function to attach on top of only one Flow Item.

In the list, anything named in the format "M1_xxxxxxx" are objects (shown in picture) that are mapped on top of 'M1_Chassis' (flow item) to show that an object is being assembled. This just means these are all parts of one type of model "M1".


Two questions:

1. What is the best way to develop a database of 10 different models, each having parts just like M1 has? Should i just keep doing what i did for M1?

2. I want to associate cycle time to assemble each of these parts at a specific station in assembly line) for all 10 different models. How do i make that happen? Making a matrix in Global table (excel database shown below)? The "0" minutes in the cycle time matrix mean that the part does not get assembled at that station. If it gets assembled, at a station, it will have a number greater than 0 minutes.



FlexSim 23.0.8
cycle time
1684941222915.png (145.8 KiB)
1684943942215.png (29.0 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

Jason Lightfoot avatar image
Jason Lightfoot answered Jason Lightfoot commented

Add a column heading called Part and you can use that to create the array that you need at each station. So for Station 1 that would be:

SELECT ARRAY_AGG (Part)  FROM MyTable WHERE [Station 1]>0

Then use that array to create a Map of process times on a label on the station (optimal) or just use the index lookup of the table to find the process time (if it were a large table you'd change it to a bundle type).

Another approach is to use a better form of the data using a table with just the StationPart information combined - no redundant data. For that the field names would be Station, Part, Process Time so one record/row would be:

Station      Part        pTime
Station 1    M1_Chassis  60

The the query for the part array at the station would be

SELECT  ARRAY_AGG(Part) FROM MyTable WHERE Station='Station 1'

In version 23.1 you can use the MAP_AGG() FlexQL clause to generate the map

SELECT MAP_AGG(Part,pTime)  FROM MyTable WHERE Station='Station 1'

which you can assign to a label on the station, while in earlier version you'll want to loop through the result of :

SELECT Part,pTime  FROM MyTable WHERE Station='Station 1'

to create a local variable map and then assign it to a station label.

· 11
5 |100000

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

Abhay Bajpai avatar image Abhay Bajpai commented ·

I think I like the alternative method of referencing better. See below the updated table based on your recommendation. Is this something you recommended? 1684951785936.png

Once done with the global table, do i have to write the "SELECT MAP_AGG(Part,pTime) FROM MyTable WHERE Station='Station 1'" in 'Process Time' field of the station on the conveyor? 1684951983688.png

0 Likes 0 ·
1684951785936.png (45.8 KiB)
1684951983688.png (134.6 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Abhay Bajpai commented ·

No, that's a query I'd use (using Table.query()) to create the Map (in 23.1) on reset or via a manual script, and then the result of that you can assign to a label on the station by accessing the first cell of the result table:


Then you can for each product look up the processing time:


But based on your previous post I'm now wondering of you want the cycle time by part or the sum of the parts cycle times and if there are 3 products M1, M2 and M3. If that's the case then add a column for the assemblyID (M1,M2, M3) and then use a Map for both the parts array that should be added at the station (keyed off the assemblyID) and another for the Sum of CycleTimes for the assemblyID). Then you can access the cycletime as:


and the array of parts to place in the chassis by:


If it's not clear from this description - put the table in the model and upload it here and I can set that up for you.

0 Likes 0 ·
Abhay Bajpai avatar image Abhay Bajpai Jason Lightfoot ♦ commented ·

Yes, i want cycle time by part! Every part is unique and gets assembled at a specific station. So i just need the processing time of the longest part at that station. For example, if there is one part 'M1_RoofA' assembled at Station 5, then i just need 'M1_RoofA' cycle time. But what if two parts, 'M1_RoofA' and 'M1_RoofB' are being installed at Station 5. In this case, station cycle time would be the one that would take the longest.

0 Likes 0 ·
Show more comments

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.