question

Noah Z avatar image
3 Likes"
Noah Z asked Phil BoBo edited

How to track flow item quantity during sim run?

Is there a way to track the number of flowitems that are currently in play within a model over the course of a simulation run? Is that information stored within the tree?

flowitemsvariablesmodel tree
5 |100000

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

Ben Wilson avatar image
5 Likes"
Ben Wilson answered Phil BoBo edited

Hi @Noah Zenker,

The WorkInProgress Tracked Variable does exactly what you're looking for, and is one of the two default tracked variables included in any new model (the other being TimeInSystem).

You can easily use the 'pin' button to add a dashboard graph showing the tracked variable changing over time.

If you ever need to find and track a different stat, please check out the documentation for Tracked Variables. You can find this in your 17.1.4 User Manual under Modeling Tools > Tracked Variables.

In 17.2, you can find the entry for Tracked Variables under Reference > Tools > Tracked Variables.


· 5
5 |100000

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

Thanks Ben. This seems to work well for a few the models I've tested it out on. For one model, however, the WorkInProgress goes below zero. I don't believe this should be possible so I'm wondering if this has ever been encountered and what things might cause this.

Unfortunately I don't have the ability to attach the model this is occurring on but I can send some screenshots of the behavior if that would be useful.

0 Likes 0 ·

@Sam Stubbs, @Logan Gold, @phil.bobo, you guys ever heard of this (negative WIP)? Any ideas?

I just tested a barebones model with combiners and separators in various places and modes (pack, join, split, unpack) and was not able to get a negative WIP.

@Noah Zenker, some screenshots *might* help, but the model file will probably be necessary to really figure out what is going on. If you can't post your model even to a private question, consider stripping it down so that just the offending part is left in your model. Or create a smaller sample model that duplicates the problem.

Thanks,

0 Likes 0 ·

If you are creating flowitems through some mechanism that doesn't update the WIP tracked variable (such as calling insertcopy() or createcopy() directly) and then destroying them through a mechanism that does update the WIP tracked variable (such as a Sink or a Combiner in Join Mode), then WIP will be negative.

3 Likes 3 ·
Show more comments
Jeff Nordgren avatar image
1 Like"
Jeff Nordgren Deactivated answered Noah Z commented

@Noah Zenker

If I'm understanding your question, couldn't you just get the number of flowitem produced (getoutput(Source)) and substract the number of flowitems that have left the model (getinput(Sink))? Not sure what your model consists of but if it's a single source (or even multiples, just add them up) and a single sink (or multiples, just add them up) then would something like this work for you?

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

The inclusion of various separators and combiners in the model unfortunately complicates things beyond the tracking of source and sink volumes.

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.