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 > Tips and Tricks
Downloads

Tips and Tricks Share helpful modeling ideas

  #1  
Old 04-15-2008
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 Creating a stacked bar chart for the states of multiple objects

The attached model contains a VisualTool with Custom Draw Code found in the object Properties. In this example, draw commands are being used to create a stacked bar chart showing the states of every object that the VisualTool is center connected to. Currently the code only covers IDLE, PROCESSING, BLOCKED, and DOWN states. However, with a little copy-paste you can extend the chart to include other states and have full control of the colors. This is just a start, I'm sure someone can take it further.

Note: I used a VisualTool because of its ability to become a Screen Locked Billboard.

Enjoy!
Attached Files
File Type: zip custom bar chart object.zip (48.3 KB, 503 views)
The Following 14 Users Say Thank You to Kris Geisberger For This Useful Post:
Tom David (04-15-2008)
  #2  
Old 04-16-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

I took Kris' advice and updated the object he started. The code is in the same place and I took the time to comment all of the lines of code so anybody should be able to figure out what is going on.

To use this object you go to its labels and for each state that you want to track replace the zero with a -1 or + number. If you place a -1 the code will use the rank of the state and the colorarray function to set the color for that state. If you place a + number the code will use that number and the collor array function to set the color of the state. Any time that occurs that you have not got a state for will be marked as "Untracked".

In the sample model you will see that there is some "Untracked" time. You may also notice that the Travel_Unloaded state has a 3 instead of a -1 for its value. This is because the colorarray for 15 is White and you couldn't see it so I specified a color that was unused.

Hope you like it,
Brandon
Attached Files
File Type: zip State Bar Graph.zip (52.9 KB, 462 views)
__________________
thats not normal.
The Following 13 Users Say Thank You to Brandon Peterson For This Useful Post:
Stefan Trabut (05-20-2011)
  #3  
Old 04-16-2008
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default Cool

I'm impressed. Nice job Kris, and thanks for enhancing it Brandon. Maybe others will join in the effort and start making other dynamic charts/graphs with greater flexibility than the ones offered by the Recorder object.
  #4  
Old 04-16-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

This is really cool. I like it very much! Great job, Kris and Brandon!
__________________
Best,
Alan
  #5  
Old 07-08-2008
Adeel Ahmad Adeel Ahmad is offline
Adeel Ahmad
 
Join Date: Mar 2008
Location: Toronto
Posts: 1
Downloads: 5
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Adeel Ahmad is on a distinguished road
Default

Thats pretty nice !
  #6  
Old 07-08-2008
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

Hey Guys,
Thanks Kris and Brandon. I really like the object. I liked it so much I decided to make a few more tweaks. For those of us who like the sharpness of a graph in 2D as opposed to 3D, I've ported Kris' draw code over to a 2D graph window. I use a graph view, but just use the OnDraw attribute of the graph view to draw my own graph (I don't use any of the standard graph attributes).
Attached Files
File Type: zip State Bar Graph.zip (51.3 KB, 430 views)
The Following 7 Users Say Thank You to Anthony Johnson For This Useful Post:
Tom David (07-08-2008)
  #7  
Old 08-11-2011
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 State Bar Chart

I have updated the State Bar Chart to v5.12 and attached a library file and model file showing its use.
Attached Files
File Type: zip StateBarChart library.zip (5.8 KB, 163 views)
File Type: fsm StateBarGraph_v5.12.fsm (45.7 KB, 179 views)


Thread Thread Starter Forum Replies Last Post
Creating DLLs that attach to Flexsim Anthony Johnson Wiki Articles 0 01-10-2014 01:11 PM
can I use an edit box entry to update multiple labels? KelvinHo Q&A 10 03-28-2008 07:17 AM
Flow items with states AlanZhang Q&A 16 11-30-2007 10:32 AM
Creating fsm-Files Ralfi Q&A 4 10-16-2007 06:07 PM
Operators on Multiple Networks Nico Zahn Q&A 0 10-10-2007 03:02 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.