ATTENTIONThis 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 |
#1
|
|||
|
|||
NetworkNode Access
Hi
I am new to flexsim, had a chance to play around with it, and i love it! I am working on a traffic density project for a warehouse. I need to collect number of forklift passes in each Aisle (I divided each Aisle by multiple network nodes) every 15 minutes of simulation run and then reset the value. I tried to use an increment label under each network node, so that it gives me a count of number of forklifts passes. so far so good but here's where i have problem: I can not find a proper way to collect the label values from all the network nodes every 15 min and store it in a global table. Also, is there a way to change the color/shape of the network node based on the label value it gets. it will be a very good for a visual heat map identifiying traffic density. |
#2
|
||||
|
||||
to collect every x time units use the user event
You can use the source code from a fixed resource object OnEntry or OnExit: Add Row and Data to GlobalTable The source code needs some changes. You will find a row with an if-statement. The logical comparison doesn't work at a user event. The user event hasn't any input, but you can compare to the first event time Code:
if(time() == 10) // time of the first event { settablesize(table,1,columns); for(int index=1; index<=columns; index++) nodeadddata(gettablecell(table,1,index),array[index]); } else settablesize(table,gettablerows(table)+1,columns); Some rows down you see the command settablenum(...). Here you can add the value you want to collect. The second part of your question is easier to answer to. In the OnDraw-Trigger use the command drawdisk(..). The radius-values should be greater than 100, because the size factors of the Networknode object are set to 0.01. You can change one of the three color-values by the incremented label value. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Abdul Mirza (08-06-2012) |
#3
|
|||
|
|||
Jörg,
Thank you it works! I used user event to collect all the values from network nodes and store it in global table. The second part of the question however does not work. It does not draw the disk. Do you know what texture to assign while initializing drawdisk? Also, is there a way to use this drawdisk in a user event to change the color/shape of all the network nodes at the same time ? if (passVal >= 1){ drawdisk(0,0,0,0,200,0,360,0,0,0,190,190,190,1,1); }; |
#4
|
||||
|
||||
Hi Abdul,
the drawdisk-command works fine. If you want a black point you should use shape 0. All loaded shapes can be found in Tools > Media Files and then select Images. The drawdisk-command should be used in the OnDraw/CustomDraw-Trigger. If you want to copy your code in every network node, please have a look into View > Edit Selected Objects. Greetings Carsten |
The Following User Says Thank You to Carsten Seehafer For This Useful Post: | ||
Abdul Mirza (08-07-2012) |
#5
|
|||
|
|||
In v5 you will need to call glDisable(GL_TEXTURE_2D) before drawdisk() so that the color parameters will work. Also, the drawdisk() opacity and textureindex parameters will not have any effect in v5.
Both issues were resolved in v6. |
The Following User Says Thank You to Kris Geisberger For This Useful Post: | ||
Phil BoBo (08-09-2012) |
Tags |
network node, traffic, traffic density |
Thread | Thread Starter | Forum | Replies | Last Post |
Transportation problem in networknode | Wen Hsing Huang | Q&A | 1 | 12-29-2011 05:50 AM |
Problem with Networknode | vasiliki grigorakaki | Q&A | 9 | 08-08-2011 05:28 AM |
How to get the objects on the edge between to networknode | Hao Zhou | Q&A | 2 | 12-23-2010 05:22 AM |
Two Questions:about networknode and dispatcher | actualliu | Q&A | 3 | 10-28-2010 01:43 PM |
Modifying Access MDB files… without Access (and free) | Jorge Toucet | Tips and Tricks | 1 | 11-21-2008 05:13 AM |