question

max avatar image
0 Likes"
max asked max edited

FlexSimPy: Performance Measure "TotalProducts" Always Returns 1.0

Hi all,

I'm using FlexSim 2024 integrated with FlexSimPy to extract data after simulation. I’ve set up a Statistics Collector (ProductOutputCount) linked to the Sink (on entry), with Row Value = 1 and a Performance Measure (TotalProducts) referencing it. In the FlexSim GUI, "TotalProducts" correctly shows values like 841 after a simulation run, but when I call

total = controller.getPerformanceMeasure("TotalProducts")

from Python, it always returns 1.0.

I’ve verified that:

  • The simulation runs and ends correctly.

  • The global variable/stat mechanism in FlexSim updates as expected.

  • I've called updateallperfmvalues() from Python prior to reading the performance measure.

  • All node paths are correct.

  • 1744580363924.png1744580400686.png1744580475770.png

Has anyone encountered this issue or can suggest a workaround to force the performance measure to aggregate correctly via FlexSimPy?

FlexSim 24.2.3
flexsimpyflexsim python
1744580363924.png (44.6 KiB)
1744580400686.png (13.0 KiB)
1744580475770.png (9.4 KiB)
5 |100000

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

0 Answers