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