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 08-03-2012
Abdul Mirza Abdul Mirza is offline
Flexsim User
 
Join Date: Jul 2012
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 5
Thanked 1 Time in 1 Post
Rep Power: 94
Abdul Mirza is on a distinguished road
Default 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.
Attached Files
File Type: zip Warehouse.zip (140.4 KB, 137 views)
  #2  
Old 08-03-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

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);
Now the table is resized at the first event to one row and x 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  
Old 08-07-2012
Abdul Mirza Abdul Mirza is offline
Flexsim User
 
Join Date: Jul 2012
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 5
Thanked 1 Time in 1 Post
Rep Power: 94
Abdul Mirza is on a distinguished road
Default

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  
Old 08-07-2012
Carsten Seehafer's Avatar
Carsten Seehafer Carsten Seehafer is offline
FlexSim Geek
 
Join Date: Oct 2008
Location: Ritterhude, Deutschland
Posts: 230
Downloads: 45
Uploads: 1
Thanks: 474
Thanked 320 Times in 143 Posts
Rep Power: 379
Carsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud of
Default

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  
Old 08-09-2012
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

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)
  #6  
Old 08-09-2012
ellonyap's Avatar
ellonyap ellonyap is offline
Flexsim User
 
Join Date: Aug 2012
Location: KL
Posts: 2
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ellonyap is on a distinguished road
Default

Hai, thanks for sharing your information.

Last edited by ellonyap; 08-09-2012 at 07:08 PM.

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


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.