question

Aaditya J avatar image
0 Likes"
Aaditya J asked Luca S4 commented

Can we have Input and Output against time on same time plot on Dashboard

inputvsoutputgraph.fsm

I want to track Input Vs Output per day on a single graph as we do in excel.

I have attached the model for your reference.

FlexSim 18.2.2
time plot
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
3 Likes"
Jordan Johnson answered Luca S4 commented

Here is a model that has the graph you want:

inputvsoutputgraph-updated.fsm

The key is to understand how the time plot expects data to be formatted, and then to build a table in that format.

In the Statistics Collector, every time the timer event fires, I create an array of stats that I want to get. Then I set that array as the row value. Since the row value is an array, the Statistics Collector makes more than one row each timer event. The row value contains the name of the statistic. So one row will have the Input stat, and the other will have the output stat. This format can be accepted by the Timeplot chart.


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

Aaditya J avatar image Aaditya J commented ·

updated-inputvsoutputgrap.fsm

Hello Jordan,

I have used your concept for getting the results as per my requirement.

PFA the model for your reference

0 Likes 0 ·
Luca S4 avatar image Luca S4 commented ·

Hello Jordan,

Can you Upload the Example for FlexSim 18.1.2? I have kind of the same issue, but can not open it.

Is it also possible to do this, if i get my values of different tracked variables?

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ Luca S4 commented ·

Hi @luca.s4,

The model attached to @jordan.johnson's answer is for version 19.0. You could open this model in any version of FlexSim 19.0 or later to examine what he did and recreate it in your older version of FlexSim.

There have been various upgrades and changes to statistics collectors over the years, and I'm not sure whether the things that Jordan did to solve this in version 19.0 would translate directly back to 18.1. You can always check and see. Or perhaps Jordan will see that I notified him and weigh in (you should always @mention someone using the @ symbol for the best chance at getting their attention).

Lastly, commenting on a long dormant question that has an accepted answer is generally not best practice, even if your comment is directly related. The way we track these issues doesn't lend itself to a comment like this being readily noticed and responded to. In the future, it would be better to begin a fresh question, and link back to this previous one for context. A new question that needs an answer is always easier to spot than an old, answered question with a new, easy to miss comment. See more community best practices.

1 Like 1 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Luca S4 commented ·

Yes, the same method should work in version 18.1.2. With Tracked Variables, it is even easier. On the timer event, return an array with all the tracked variables you want. Column 1 can contain the time. Column 2 can show the name of the tracked variable:

data.rowValue.name

Column 3 can show the current value of that tracked variable

data.rowValue.as(TrackedVariable).value 

Something like that should work.

1 Like 1 ·
Luca S4 avatar image Luca S4 Jordan Johnson ♦♦ commented ·

thank you both, it worked for me! In the future i will adress it in new questions.

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.