question

Óscar avatar image
0 Likes"
Óscar asked Ben Wilson commented

Labels and global variables

Can you help me answer these questions.

Advantages and Disadvantages that you identify in the use of global variables.
 
Advantages and Disadvantages that you identify in the use of labels.

Personal opinion comment on your preference, if you had to choose between using Labels or using Global Variables. Explain.

Thanks,

FlexSim 19.0.9
labelsflexsim 19.0.9global variables
· 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Óscar , was Patrick Cloutier's answer helpful? If so, please click the red "Accept" button on 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

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier answered Patrick Cloutier commented

Let me put it in my own words. It's not a complete answer.

LABELS are used to attach information specific to an object (flowitem, taskexecuter, processor, queue, etc) and that is mostly used by that object or at that object.

For example, you can put process times on labels on flowitems so that when that flowitem reaches a specific processor, the processor reads the labels and knows which process time to use.

Information on labels tend to be used at the "place" where they are placed. But nothing prevents you from referencing a label from anywhere in the model.

GLOBAL VARIABLES are typically used when an information needs to be accessed or updated from anywhere in the model. I rarely use these but I would if I need a variable which is based on many different informations and conditions in many places in the model.

For example, the production line is either "on" or "off" and that is based on many things happening all over the line and all these things can set a Global Variable called "LineStatus" to on or off.

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

Patrick Cloutier avatar image Patrick Cloutier commented ·

A few more items:

- You can have hundreds of labels in your models but you would typically have only a few Global Variables.

- Info goes in a Global Variables when it doesn't make sense to put it in a Label on a Table.

- Not sure about this one but I think information on Labels is faster to address than on Global Variables.

0 Likes 0 ·