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.

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:

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