question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Matthew Gillespie commented

Milestone collector not setting all values

Hi,

In the attached model you can see a milestone collector where the additional columns is updated sometimes, but also sometimes not. Maybe this problem is related to:

Not updating value expression in additional columns MilestoneCollector - FlexSim Community

But maybe it is something different.

The outcome of the collector is:
1683790611423.png

Where I would expect all rows for the last column to be filled.

MileStoneMissingData.fsm

Thanks

FlexSim 23.0.7
milestone collector
· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

In the current state of the model, I believe this isn't as much a bug as an unintended side effect/timing issue. When the tracked item is destroyed, the respective row is automatically finished. At this point, the update mode When Value Is Accessed stops to work, so if the column was not filled in yet in will remain blank. If the column is filled in or not depends on the run speed. At high speeds almost all rows are blank in Column 1.

What does appear to be a bug is that the other update mode (When the row is added...) does not seem to function at all. I was able to get it to work by manually adding a coupling between the column's events node and the On Exit event's columns node.

capture1.png

milestonemissingdata_fm.fsm

0 Likes 0 ·
capture1.png (74.3 KiB)

1 Answer

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Matthew Gillespie commented

You need to do two things. First, when an item has hit its last milestone, it's always best to check this box on the milestone:

1683816233004.png

Second, you should change the column code as follows:

collector.getValue( data.rowNum, 3, 1 ) - collector.getValue( data.rowNum, 2, 1 )

This resolves the issue in your case.

The additional argument tells the stats collector that it doesn't need to update all the other active rows before retrieving the value. It is a bug that not passing it corrupts the "data" object, but it is also a performance advantage to skip the update if you can.

There is currently a bug where applying column code requires you change the Update Mode away from "When accessed" and back again. Then click the Apply and OK buttons.

I'm adding both bugs to the dev list.


1683816233004.png (1.9 KiB)
· 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.

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·
Thanks @Jordan Johnson . This explanation makes sense!
0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·
@Patrick Zweekhorst This issue is fixed in 23.0.9 and 23.1.3 released today.
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.