ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 06-14-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default Efficient way to analyze queue content over time

Hello everybody,

how can I efficiently analyze the content of multiple queues over time and extract data about how often the content exceeds a certain limit and for how long the current content stays above the limit.

In other words. I want to analyze the time vs. content charts from Flexsim Chart in a efficient way, when I run multiple repetitions of a model, without working with the huge databases manually.

Thank you in advance!
Jens
  #2  
Old 06-14-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Jens,

i think you know the solution to use two queues instead of one. The second one is in parallel to the first one and stores only the amount of items, which exceeds the limit.

Jörg
  #3  
Old 06-14-2012
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Attached is a sample model that shows how you can get interesting statistics like this by using tracked variables.

What's in the model:

There are four processing lines. On each Queue, I call a user command OnExit and OnEntry. Those user commands update the tracked variables. (They are in user commands so that I'm not repeating my code on every queue. I can update the code in one place and affect the entire system.)

There are three tracked variables:
1. TotalContent: the total content of all four queues.
2. Overcapacity: a boolean value telling whether the system is over capacity or not.
3. TimeOverCapacity: a history of the durations when the system was overcapacity.

Additionally, I have two user events near time 0 that set the Overcapacity's value to 2 and then 0 to control its y-axis values in the dashboard.

On the dashboard, I have five statistics objects:
1. Model documentation that shows the current/maximum content and whether the system is overcapacity.
2. The total content vs time (tracked variable vs time).
3. Over capacity vs time (tracked variable vs time).
4. Time spent over capacity dot plot (tracked variable vs time). (This is a dot plot because the tracked variable it is showing is not time weighted.)
5. Time spent over capacity histogram (tracked variable histogram).

(The model also has two global variables. One for setting the system's max capacity and another one used to calculate the time spent over capacity.)

Another note:
Because these values are stored using tracked variables and Dashboard Statistics, they can easily be added as performance measures to the experimenter so that you can analyse this data on multiple replications.
Attached Thumbnails
Click image for larger version
Name:	tracked_variables_dashboard.png
Views:	715
Size:	106.2 KB
ID:	2699  
Attached Files
File Type: fsm tracked_variables_example.fsm (42.8 KB, 466 views)

Last edited by Phil BoBo; 11-19-2014 at 05:48 PM.
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post:
Lars-Olof Leven (06-15-2012)
  #4  
Old 06-15-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

Thank you for your model Phil, I really like the real-time data capture. But as far as I understand it is not possible to analzye the values over several experiment repetitions. I don't want to use average values, but want to learn about the duration, frequency and peak value.



As you can see in the picture, I basically want to document the areas above the red dotted line. And not only for one simulation run, but all repetitions.

Thanks again!
  #5  
Old 06-15-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

Another idea:

I could write the time, duration, peak and average content for each overflow-event of each queue (buffer) in GlobalTables.

But ... this would leave me with almost 30 tables per repetition (if I would export them to excel after each run) Yaaay
  #6  
Old 06-15-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Jens,

you can analyse in the end of replication trigger the stats of your queue, write the results to a global table or labels und use this data in the performance measure of the experimenter. The content- and time- values are stored in pairs under stats_contentgraph. The first value is the time, the second the content. Look only for values which are encreasing above your limit.

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Jens Mühlheimer (06-18-2012)
  #7  
Old 06-18-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

Hello Jorg,

great, I didn't know that those values were stored there.
I think this is exactly what I need!

Thanks a lot!
  #8  
Old 06-18-2012
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Note that in version 6, this node has bundle data instead of subnodes, and you use getbundlevalue() to read its information.
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post:
Veronique Dossogne (11-07-2012)
  #9  
Old 06-20-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

Thanks for the info Phil. At the moment I'm still using v5 for this project, because I don't want to switch versions in between.

Just one more question:

How can I circle through multiple selected objects?

The code for my routine works to analzye the overflows of one queue, but I want to extract the data of a bunch of queues which I have selected. Basically like in the report function. Unfortunately I didn't find the report function in the tree to check out the code.

Thanks again!
  #10  
Old 06-20-2012
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

If you want to loop through all the red selected objects in the model, you can do this:

Code:
forobjecttreeunder(model())
{
	treenode object = a;
	if(switch_selected(object,-1))
	{
		pt(getname(object));
		pr();
	}
}

If you want to loop through a specific group of objects, use port connections or a global treenode array.
The Following User Says Thank You to Phil BoBo For This Useful Post:
Jens Mühlheimer (06-21-2012)
  #11  
Old 06-21-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

That's exactly what I needed! Thank you Phil!
  #12  
Old 06-26-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

A general follow-up question:

Is it possible to stack the content vs. time charts in Flexsim Chart. Or do you know of a way to do it in Excel, after exporting the data.

In my opinion the problem is that graph actually shows a point cloud with connected data points.

I would have to clusert the x/y data into e.g. hours. It's hard to explain for me, but I mean this:

Queue A: Time: 3721s - Value: 5
Queue B: Time: 3872s - Value: 3

This should give me a total of 8 in the second hour on the Y-axis.

Do you guys have any idea on this?
Big thanks!!
  #13  
Old 06-29-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

Hey friends,

I still couldn't realize it in Excel, because I can't handle the data series.
Do you guys have an idea?

Any help is ultra-appreciated
Thank you!
  #14  
Old 06-29-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Jens,

I attached a model (Version 5.1.2) which analyse the contentgraph data at the end of the simulation in the Trigger On Run Stop. The Analyse checks the content of two queues at discrete simulation times. In my model that is at 100, 200, 400, .. 1000.
It does not help you in excel.

For those of you, to use the model in Version 6, please read the whole thread.

Jörg
Attached Files
File Type: fsm Contentovertimeperiods.fsm (40.2 KB, 522 views)

Last edited by Jörg Vogel; 12-03-2014 at 12:30 AM. Reason: Reload Attachement
  #15  
Old 06-29-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Jens,

I have some problems to analyse the data in excel, too. I am not an expert to transform the list data [time1, content1, time2, content2, ...].
But you can transform the data at the end of the simulation run in flexsim and write it in a global table [[time1, content1], [time2, content2],...]. Perhaps the analyse might be easier, if you combine time with the content change.

Jörg
  #16  
Old 07-02-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

I also exported the data into Excel and drew a "sawtooth diagram".
Exported data looks like this:



I can't use the normal graph function, because the time increments (-> x-values) are not constant. So I had to used the x/y data diagram for the 3 series and also drew the connection lines:



Now I would like to stack the 3 graphs or cumulate them to a 4th graph series, but this is where I get stuck in Excel.
I don't know how I can have Excel check if for time x1 there is already some value in another series. Especially because the time increments are not constant.

So if in series 1, at time 35641 seconds, I have a value of 3 and in series 2 at time 35642 a value of 5. Excel doesn't add them up but will tell me that the content has been reduced by one FlowItem.

I somehow have to cluster the data to an hourly basis or something ... but then I still don't know how to handle the data from the Excelsheet properly.


Thread Thread Starter Forum Replies Last Post
Virtual Queue Content Phil BoBo Tips and Tricks 0 04-20-2012 12:34 PM
Constant content of queue (or CONWIP) Stefan Trabut Q&A 4 05-04-2011 06:16 AM
Pulling from a Queue vs Sorting the Queue Brandon Peterson Tips and Tricks 3 03-03-2010 01:27 AM
Starting content in the Queue Bartosz Misiurek Q&A 4 10-04-2009 02:25 PM
How to get interval average,max,etc of a queue content ? qin tian Q&A 5 02-14-2008 10:11 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.