Track variable vs time for discrete points in time

Track variable vs time for discrete points in time

pieter_cecat
Not applicable
101 Views
2 Replies
Message 1 of 3

Track variable vs time for discrete points in time

pieter_cecat
Not applicable

[ FlexSim 16.0.8 ]

Is it possible to write a tracked variable to a graph only at predefined time intervals (e.g. 720 time units) instead of monitoring it continuously?

Secondly, can the exact values be added to the graph for every time interval?

0 Likes
Accepted solutions (1)
102 Views
2 Replies
Replies (2)
Message 2 of 3

SCHamoen
Advisor
Advisor

@Pieter Cecat I don't completely understand you question here. You add a value to a tracked variable with the command settrackedvariable() If you do that at 720 time units you will have 1 point at exactly that time.

Secondly again with the settrackedvariable() command you set exactly the value you enter in that command.

Message 3 of 3

mischa_spelt
Advisor
Advisor
Accepted solution

Hi Pieter,

As Steven indicates, what you want is slightly unusual in the sense that you normally use a Tracked Variable because you want to keep track of exactly when the variable changes.

However, what you want is possible using a Custom Chart. I have made an example in the attached model. You can add a Custom Chart to the dashboard and associate to the Tracked Variable by using the sampler button on the Associations tab and clicking the Tracked Variable in the toolbox.

On the Data tab I used the "Current values" preset which you can use without modifications.

Then on the General tab, you should select Line Chart and set the data collection interval; it defaults to 50 seconds.

For comparison, I have added a proper Tracked Variable chart at the top of the dashboard. Again, however, this usage sort of loses all the advantages of a Tracked Variable so if you would care to ask a more high-level question about what it is you are trying to accomplish we may be able to give you better advice.

0 Likes