To access 'Map' label from Station on Conveyor belt

To access 'Map' label from Station on Conveyor belt

ABajpaiWMKNX
Participant Participant
12 Views
2 Replies
Message 1 of 3

To access 'Map' label from Station on Conveyor belt

ABajpaiWMKNX
Participant
Participant

[ FlexSim 23.2.0 ]

I want to the processing time at conveyor station to be the number from a Map array "cycleTimeMap" at every station corresponding to the 'modelID' of the generated flow item at source. For example, if the station is "M1A", then it should look for all parts that need to be created in the label called "partMap" of station and then check the corresponding cycle time value for each of those parts in the list of "partMap" in the label "cycleTimeMap". If there is only 1 part, then the same number should be chosen but if there are 2 or more than 2 parts in the list for modelID "M1A", then it should take the maximum one. I have circled the "cycleTimeMap" in the picture below. Also attached the model.

ChampionHomes_V8_6.fsm 1696531228031.png

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

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

From champion-homes-assembly-making-replica-2-jl.fsm you had the expression for cycletime as:

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

This relied on the max processing time already being calculated as part of the cycletime map creation using this code from the original WriteStationMaps:

string sql="SELECT ModelName, MAX(ProcessingTime) FROM PTimeByPart WHERE StationID='"+stationID+"' GROUP BY ModelName";
Table result=Table.query(sql);
Map cycleTimeMap;
for (int n=result.numRows;n>0;n--)
    cycleTimeMap[result[1]]=result[2];
station.cycleTimeMap=cycleTimeMap.clone();


However I see that this has been rewritten for some reason. I would suggest reinstating the max processing time into the cycletimeMap if it's not there already and read it using the syntax above.

0 Likes
Message 3 of 3

Jeanette_Fullmer
Community Manager
Community Manager

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