question

Telmo_Silva avatar image
0 Likes"
Telmo_Silva asked Telmo_Silva commented

Changing setup time based in a label value

Projeto Storage Process Flow.fsmHi there,


I am new to FlexSim. I am trying to develop a simple production line.


Right now I have a problem with the setup time of a processor. I have 3 cases of setup time. When the input/output of the processor is 50 I want the setup time to be 25, in case of being 100 I want the setup time to be 385, otherwise I want it to be 5. When it is 100, I wanted to reset the label I am using. The processor in question is "Processor 2" just in the begging of the line.


I already tried to use a label created in the processor and in global variables but I don't know how can I reference them in the code snipet of the setup time.

FlexSim 22.2.0
labelssetup timevariableglobalvariable
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

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Telmo_Silva commented

A modulus operator returns a rest of a division.

  • 1 % 100 = 1
  • 2 % 100 = 2
  • ..
  • 50 % 100 = 50
  • ..
  • 100 % 100 = 0
  • 101 % 100 = 1
  • 102 % 100 = 2
  • ..
  • 150 % 100 = 50
  • ..
  • 200 % 100 = ….

A stats input value of a processor divided by modulus operator returns values in a range of [0..99]
Then you can setup a picklist option from template time by case. You have cases for 50, 0 which is equal to 100 and default for all other rest values.
You find this template in the drop down picklist field right to setup time edit field by the black triangle icon pointing down. You add cases by the green plus icon. You can edit the top value field by eye dropper icon to select from processor the input or output statistic value. Then you append by editing this field the modulus division.

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

Telmo_Silva avatar image Telmo_Silva commented ·
Great answer. It works. Thank you.
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.