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

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

ABajpaiWMKNX
Participant Participant
55 Views
13 Replies
Message 1 of 14

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

ABajpaiWMKNX
Participant
Participant

[ FlexSim 23.0.8 ]

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


1684941222915.png


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.

1684943942215.png


Image.png


0 Likes
Accepted solutions (1)
56 Views
13 Replies
Replies (13)
Message 2 of 14

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

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.

Message 3 of 14

ABajpaiWMKNX
Participant
Participant

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

Message 4 of 14

jason_lightfootVL7B4
Autodesk
Autodesk

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:

station.cycleTimeMap=result[1][1];

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

station.cycleTimeMap[partName]

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:

current.cycleTimesMap[assemblyID]

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

current.partsMap[assemblyID]

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
Message 5 of 14

ABajpaiWMKNX
Participant
Participant

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
Message 6 of 14

ABajpaiWMKNX
Participant
Participant

I think i am trying to figure out what should be the correct way letting each station know which part to add on the current flow item (chassis). This chassis could be M1_Chassis, or M2_Chassis, or M3_Chassis etc. Based on which chassis is introduced, each station should add the parts accordingly.Champion Homes Assembly Making Replica (2).fsm

0 Likes
Message 7 of 14

jason_lightfootVL7B4
Autodesk
Autodesk
Are you going to use 23.1 or stick to 23.0?
0 Likes
Message 8 of 14

jason_lightfootVL7B4
Autodesk
Autodesk

In the attached model I added a user command to write the maps to the stations based on the PTimeByPart table.

Then the cycletime at the station needs a label for the model on the arriving item so that the expression can just be:

 current.cycleTimeMap.as(Map)[item.modelID]

Model attached.

champion-homes-assembly-making-replica-2_jl.fsm

Message 9 of 14

ABajpaiWMKNX
Participant
Participant
I can go either way. What do you recommend? 23.1?
0 Likes
Message 10 of 14

ABajpaiWMKNX
Participant
Participant


1685024249144.png


Sorry i am new to this software so i am trying to understand. I just saw the code you wrote in 'writeStationMaps' and it made sense that you created these arrays in 'writeStationMaps' code.


My new questions:

1. Can you explain me how the map function works in lay-man terms? 1685025482356.png

2. How can i introduce the models in the 3D model? I couldn't inject the M1_Chassis flow item to the queue using 'Create Object'.

Attaching model here. Champion Homes Assembly Inject Chassis.fsm

0 Likes
Message 11 of 14

jason_lightfootVL7B4
Autodesk
Autodesk
The Map is just like an array but instead of using a numeric index (1,2,3....etc) to access the value in the array you use anything you like a string, object, another array - that is the 'key' of the map. The values can be anything just like an array's values.

This is probably the fastest way to look up information.

Message 12 of 14

ABajpaiWMKNX
Participant
Participant

Jason. I saw you prefer putting your process flow charts in the Stations instead of making a general process flow. Trying to understand why you did that. Because for some reason, the Source inside Station process flow creates way more flow items compared to if i kept the Source in the general process flow.

1685114037174.png

Champion Homes Assembly Making Replica (2)_3_autosave.fsm

0 Likes
Message 13 of 14

jason_lightfootVL7B4
Autodesk
Autodesk

When you have an Object Process Flow for the stations a token is generated per instance. You can view the process flow for one particular station by selecting the instance in the list of Attached Objects and then clicking OpenPF View:

1685116044672.png

In object process flows you don't need to set up labels on the tokens to refer to the instance - you can just use the keyword 'current'.

I prefer them because working with objects and their behaviours and processes is more scaleable and powerful in my mind that having one huge process flow for everything which becomes a pain to manage and understand. In fact I even would promote the use of multiple object process flows per object to represent different behaviours (breakdown, setup, stats collection etc).

0 Likes
Message 14 of 14

julie_weller
Not applicable

Hi @Abhay Bajpai, was Jason Lightfoot'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