A program to recognize and reward our most engaged community members
We can set a variable in the 'Model' and 'Diagram'.
Can you explain what is the difference and where the variables are possible to use?
It looks like there are difference between 'Model' and 'Diagram' variable's are used.
Hi Seoksan,
The difference is in the visibility/accessability. Variables defined in 'Model' can be accessed from everywhere, variables defined in 'Diagram' can only be accessed in the corresponding context of the model or below. It's only important when you use Supercomponents, otherwise you just have one context in your model. Every Supercomponent has its own context.
Regards, Ronald
An example on what Ronald described:
A variable defined in the model initialization can be used in the simulation setup, it is not the case if it is defined in the diagram context (top level).
Thanks
Fady
Thank you, Fady and Ronald.