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 CT > Container Terminal (CT) Library
Downloads

  #1  
Old 12-16-2009
Jamie Santa Ana Jamie Santa Ana is offline
Flexsim User
 
Join Date: Jul 2009
Location: Southern California
Posts: 44
Downloads: 22
Uploads: 0
Thanks: 25
Thanked 4 Times in 4 Posts
Rep Power: 135
Jamie Santa Ana is on a distinguished road
Default Yard Container Count

What I'd like to do is have my model display a running counter on each yard block that keeps count of how many containers are in that block. And, at any given time, I could pause the model, and there would be a display of this. Is this possible?

I appreciate any help.
  #2  
Old 12-17-2009
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

The Blocks tab of the statistics window does that automatically for you. If you want access directly, it's stored in the block's stats label.
The Following User Says Thank You to Anthony Johnson For This Useful Post:
Jamie Santa Ana (12-17-2009)
  #3  
Old 12-17-2009
Jamie Santa Ana Jamie Santa Ana is offline
Flexsim User
 
Join Date: Jul 2009
Location: Southern California
Posts: 44
Downloads: 22
Uploads: 0
Thanks: 25
Thanked 4 Times in 4 Posts
Rep Power: 135
Jamie Santa Ana is on a distinguished road
Default

Thanks, Anthony for your help. If I were to insert a visual tool to display the curcontent value, I could choose display label value from the pick list. But I'm having trouble getting it to point to the "curcontent" label. How do I get it to point to this?
  #4  
Old 12-18-2009
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

instead of using getlabelnum(), use getnodenum(node(">labels/stats/content/curcontent", theobj))
The Following 2 Users Say Thank You to Anthony Johnson For This Useful Post:
Phil BoBo (12-18-2009)
  #5  
Old 12-21-2009
John Kim's Avatar
John Kim John Kim is offline
Flexsim User
 
Join Date: Aug 2009
Location: Huntington Beach
Posts: 6
Downloads: 0
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
John Kim is on a distinguished road
Default

Is there any way to export the container count data from the container yard at a specific time, lets say 5:00pm, everyday, to an excel database?
  #6  
Old 12-21-2009
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

You can do it using a user event. Add a user event to your model through the tools menu. Have the first event time be 1020 (5 pm in minutes), and repeat every 1440 minutes (24 hours). Then when the event fires, get the value and store it off to a table. Use the settablesize() command to add a row to the table, and the settablenum() command to set the value. Then export to excel either with a manual copy/paste, or using the excel export functionality.

You could technically open an excel connection at the start of the run and then write directly to excel on the event, but weirdness can sometimes happen if you open an excel connection and then leave it open for an extended time. So I would store the values in a table, and then export it at the end of the run.

You can also use the exporttable(reftable(tablename), ...) command at the end of the run, which saves the table off in csv format, which can then be opened in Excel.
The Following User Says Thank You to Anthony Johnson For This Useful Post:
John Kim (12-21-2009)
  #7  
Old 12-22-2009
John Kim's Avatar
John Kim John Kim is offline
Flexsim User
 
Join Date: Aug 2009
Location: Huntington Beach
Posts: 6
Downloads: 0
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
John Kim is on a distinguished road
Default

Anthony,

First off, thanks for your help. Second, how do I write the script to extract the data (the container counts for 23 container yards) for the set times? Thirdly, how do I make the script to make a new table instead of it overwriting?

I am going to use:
settablesize(str/num/node table, num rows, num cols[, num datatype, num overwrite y/n])
The first part,str/num/node table, indicates the name, I am assuming.
The second and third parts, num rows, num cols, are self explanatory.
The forth part, num datatype, I have no clue.
The fifth part, num overwrite y/n, I am going to simply put '0' so it does not overwrite.

So, if i want, lets say a table named Table1, 10 rows and 3 columns, should it look like:
settablesize(Table1, 10, 3[, num datatype, 0])
?


Thread Thread Starter Forum Replies Last Post
What's the inializing mechnism of yard block? zhang xin Container Terminal (CT) Library 6 11-27-2009 08:47 PM
How control truck rout in the yard zone? zhang xin Container Terminal (CT) Library 2 08-31-2009 07:19 PM
Modeling container trucks Lin Jincong Q&A 2 08-04-2008 08:36 PM
Static can count edgar Q&A 2 09-25-2007 09:25 PM
Visual tool as a container qs Paul Dowling Q&A 2 08-20-2007 07:53 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.