question

mark zhen avatar image
0 Likes"
mark zhen asked Jason Lightfoot commented

Parameter reference for performance indicator

I want to complete the application of some performance indicators, as shown in the figure, but I cannot execute it smoothly. I would like to ask how to successfully reference these indicators.random-action-autosave_autosave.fsm1704483431766.png

FlexSim 22.0.16
customcode
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @mark zhen , was one of Felix Möhlmann's or Joerg Vogel's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. 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 0 ·

1 Answer

Felix Möhlmann avatar image
2 Likes"
Felix Möhlmann answered Felix Möhlmann commented

To get the performance measure value, you have to execute the code in the "valueNode" of the performance measure value.

1704698042374.png

In this case, in order to work correctly, the code requires you to pass in the reference object as a parameter when executing the code.

1704698054339.png

You probably also want to place a 0s-delay in the Process Flow to get the performance measure value after the item has exited the queue.

1704698116420.pngrandom-action-autosave-autosave_1.fsm


· 2
5 |100000

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

mark zhen avatar image mark zhen commented ·

What should I do if I need to add other performance indicators?0109.fsm

1704786393148.png

1704786375521.png

0 Likes 0 ·
1704786375521.png (8.5 KiB)
1704786393148.png (38.1 KiB)
0109.fsm (312.5 KiB)
Felix Möhlmann avatar image Felix Möhlmann mark zhen commented ·

You declare the "reference" variable twice. (You get an error telling you this when you try to apply/compile the code).

And you should only change the reference node after assigning the first value. Otherwise both parameters will obviously be set to the same value.

1704787755113.png

0 Likes 0 ·
1704787755113.png (13.1 KiB)