question

Ravneet M2 avatar image
0 Likes"
Ravneet M2 asked Andrew O commented

Rename labels by previous labels

I have 3 station in line. All three stations have 2 outcomes either "GTG" or "Repair". GTG1, Repair1, GTG2, Repair2, GTG3, Repair3 are the 6 outcomes from the 3 stations. When Repair 1 exists station 1, it needs to remain Repair1 as it moves through station 2 and 3. After that it goes to repair and comes back in line at station 1 input. As it has already been processed through station 1, it needs to have a 0 processing time second round going through station 1 and process with normal processing time at station 2.


How I have designed my system so far:

Each station has a label on exit, GTG1 or Repair1.. As it moves to the next station based on the label from previous station it will have its processing times. But the problem becomes as Repair1 goes through Station 2, it gets over written with labels on exit of station 2. Is there a form of conditional labelling? May be used global table. If the Part has Label: Repair 1 - keep it repair 1

FlexSim 22.1.2
assign labelsprocess times
· 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.

Andrew O avatar image Andrew O commented ·

Hi @Ravneet M2, 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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

How I understand your post is that you have a single label that gets set to either "RepairX" or "GTGX" in the finish or exit trigger of the processors?

In order to not overwrite the label when it says "RepairX" you can open the code editor of the trigger and enclose the pick option code in an if-condition.

1658907945011.png

if(item.labels.assert("State", "0") && item.State.as(string).charAt(1) != "R")
{
    { // ************* PickOption Start ************* //
      ...
    } // ******* PickOption End ******* //
}

There are actually to conditions checked here. The first makes sure that the label actually exists on the item (if not it creates it with a value of "0"). The second then checks if the first character of the label value is something other than an "R". Only if that is the case is the rest of the code executed.

ConditionalLabelUpdate.fsm

When posting questions that relate to a certain model, it is always useful if you can attach said model or at least provide a sample model that shows the relevant section, if possible.


5 |100000

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