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
|
||||
|
||||
Heatmap Module
Hi community!
I've a little something for you ;-) I've developed a little module to show a heatmap in our models. It's brandnew and still beta but I'm interested in our opinion. Restrictions for this beta: - no gui - only for 64 bit - tested only with FlexSim GP 7.1.4 64bit on a Windows 7 64bit How to install? Unzip file to modules folder in flexsim. How to use? Just drag your new HeatmapTicker object into your model. That's it. What does this module? This module draw a heatmap in your model. It collects the location of your taskexecuters for each tick of the heatmapticker. This shows you how often a location was used. Red means a hot area and blue a cold area. Which settings options are available? Even without a gui you have several options to configure your heatmap. You have to access your heatmapticker with the tree view. The settings are in the variables node: - ticktime -> time interval to add the actual location of your taskexecuters - gridsizeX -> area in x to summarize locations - gridsizeY -> area in y to summarize locations - sizeZ -> if greater than 0, your heatmap goes up in the sky - objectList -> only for your information, which taskexecuters are registered for the heatmap (robot and elevators aren't added) - mesh -> heatmap drawing, don't touch You can make you heatmap invisible if you use the flexsim command switch_hideshape. Hints: - very small ticktime, gridsizeX and/or gridsizeY boost your cpu usage - only taskexecuters in the model tree will be recognized - only used locations will be stored -> no restrictions for locations - the colors and optional heights aren't linear -> a natural logarithm will be used with the measured data to make the heatmap more visible I'm curious about your thoughts and hints. Of course you'll get the final version also. Did I mentioned that it's free? Thanks to Kris Geisberger who brings the heatmap to my mind http://cloud.scheffernet.de/owncloud...487d5f6e922fd8 (64 bit FlexSim V7.3.6) or http://cloud.scheffernet.de/owncloud...9e9609069cb17f (32 bit FlexSim V7.3.6) or http://cloud.scheffernet.de/owncloud...1aa8b8c6f5762b (64 bit FlexSim V7.5) Last edited by Carsten Seehafer; 02-05-2015 at 02:25 AM. Reason: new download links |
The Following 9 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Steven Hamoen (07-11-2014) |
#3
|
||||
|
||||
Carsten,
I think the heat map idea is really cool. The AStar module kind of does this, but your implementation would extend it universally, which is really useful. The one thing I don't like so much is the way it's drawn. Especially the shadows look weird. And by the fact that you're drawing it with individual quads, each quad being just one color, it doesn't really look like what people would traditionally associate with a "heat map". My suggestion would be to change the draw so that it uses a mesh with gradients to render the heat map. I'm including a proof of concept. Certainly this could be improved. I just used a straight grid of quads, which causes some weird star-like look in some of the points. Maybe if you change the geometry or just provide more vertices it might lessen that issue? Anthony |
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
Carsten Seehafer (07-11-2014) |
#4
|
||||
|
||||
Another option, which would save on graphics card memory over using a mesh with a ton of vertices, is to just implement your own texture using straight gl texture commands in your module dll. Every time the heat map changes, you reload the texture to the graphics card. You'd use glGenTextures() to create the texture object, glBindTexture() to activate it for changing/rendering, glTexImage2D() to reload the texture data every time your heat map changes. Then you could just use a single quad mesh for that texture. That would probably be much more efficient as far as graphics card memory (and rendering speed) goes. Obviously, you have to know OpenGL, but if you do, it's probably a better way to go.
|
The Following 2 Users Say Thank You to Anthony Johnson For This Useful Post: | ||
Carsten Seehafer (07-11-2014) |
#5
|
||||
|
||||
Anthony,
I can look at your model at monday (I haven't flexsim at home). Damned time lag You have mentioned the quads. Maybe I should explain further. Each quad is one information for this area with size in X of gridsizeX and size in Y of gridsizeY. The color represents the value. You get a smoother look if you make gridsizeX/gridsizeY smaller. I would prefer a floor drawing because it looks more traditional (if you set variable sizeZ to 0). On the other hand I couldn't resist to use the value for a 3D view of the data Maybe a box instead of a rectangle looks better. I would also love to know how the performance with a big model would be (like a warehouse). Maybe someone will try this... P.S.: Does anyone know how to use "alpha" on the vertices? ----------- At the moment the mesh will be build onPreDraw. My thought was that most simulation models run at the highest speed to generate results and the mesh will only be generated if enough cpu power is left. If I generate the mesh on each change of the data (on each tick) this would reduce the cpu usage on slow simulation speed but increase the cpu usage at high simulation speed, am I right?! Last edited by Carsten Seehafer; 07-11-2014 at 11:07 AM. Reason: thoughts to the 2nd post of anthony |
#6
|
||||
|
||||
The next beta version is available.
Enhancement: - GUI - 32- and 64-bit version - boxes instead flat rectangles possible - background possible (with color of heatmapTicker-object) - some changes in the graphics (but still mesh) Have fun! https://www.flexsim.com/community/fo...do=file&id=310 Last edited by Carsten Seehafer; 12-03-2014 at 10:04 AM. |
The Following User Says Thank You to Carsten Seehafer For This Useful Post: | ||
Anthony Johnson (07-15-2014) |
#7
|
||||
|
||||
Quote:
Code:
updateHeatMapData(); isMeshDirty = true; Code:
if (isMeshDirty) { rebuildMesh(); isMeshDirty = false; } The isMeshDirty member doesn't need to be saved in the tree. Actually it probably shouldn't be saved in the tree. You just set it to true in your class constructor, so that on the first refresh after loading the model (or dropping the object into your model), it will rebuild the mesh. So you can probably just make it a straight bool class member. |
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
Carsten Seehafer (07-15-2014) |
#8
|
||||
|
||||
Quote:
However, even when using alpha components, transparency can still be a bit tricky. The problem is the order in which you draw things is important. You should always draw transparent things last in the model render. Otherwise, things drawn after them won't show up behind the transparency. This corresponds to putting the transparent object at the top of the model tree (the model is rendered bottom to top in the tree). |
The Following 2 Users Say Thank You to Anthony Johnson For This Useful Post: | ||
Jörg Vogel (07-15-2014) |
#9
|
||||
|
||||
The next version v0.3 beta is available:
- bugfix graphics - change of member selection - new tab for member selection - quick properties - cut off option for high values - installer Know issues: - installer window vanishes during install process for 5-10 seconds - uninstall process is slow Maybe someone has an idea for those issues? Thanks for any support! @Anthony: I've added something similar like your isDirtyMesh yesterday. The mesh will only rebuild in onPreDraw if a tick has happened or some realtime has passed (simulation stopped). I'll play with the MESH_DIFFUSE4 tomorrow PS: You should remove the old module files before you use the installer. It looks like the installer did not replace existing files! https://www.flexsim.com/community/fo...do=file&id=310 Last edited by Carsten Seehafer; 12-03-2014 at 10:05 AM. Reason: install advice |
The Following 3 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Tom David (07-15-2014) |
#10
|
||||
|
||||
Maybe it's already annoying for you but here's the next version
I've changed the way how the mesh will be created to get a nice transparency (It's called visibility in heatmapTicker). Also some change to the gui. The installer is certainly not satisfactory. He takes a break for 10-20 seconds without any window or information?! Maybe I should be more patient but I'm not Any advice for another (free) installer is very welcome!!! Please uninstall the old module before you install this new one! What kind of installation would you prefer? With an installer or by hand? https://www.flexsim.com/community/fo...do=file&id=310 Last edited by Carsten Seehafer; 12-03-2014 at 10:06 AM. |
#12
|
||||
|
||||
Quote:
We just switched from Wise to WiX for FlexSim 7.3. |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Carsten Seehafer (07-16-2014) |
#13
|
|||
|
|||
Great work Carsten!
Since you asked, I'd prefer installation by hand while it is still in development. You might get more participation without the installer as it could intimidate some or raise privilege issues. Maybe post both if you can. |
The Following User Says Thank You to Kris Geisberger For This Useful Post: | ||
Carsten Seehafer (07-16-2014) |
#14
|
||||
|
||||
@Kris: I've attached the same files and version without an installer.
@Phil: You just made my day! It looks very promising https://www.flexsim.com/community/fo...do=file&id=310 Last edited by Carsten Seehafer; 12-03-2014 at 10:07 AM. |
The Following 2 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Steven Hamoen (07-17-2014) |
#15
|
||||
|
||||
The final version is now available. We vanquished the beta status (this version is a little delayed because of a hospitalization of a family member)
A few changes in short: - faster because of a new sort algorithm - multiple HeatmapTicker objects possible - OnTick-Trigger and an example option - 2 usercommands (look at OnTick-Trigger) - documentation and help - new options Bottom Cut Off and Logarithmical - bugfix of Top Cut Off - and some other stuff I've already forgotten You have to install this module by hand. Just unzip the attached file and drop it into the modules folder in FlexSim. Don't forget to read the user manual of this module. I hope it is understandable. https://www.flexsim.com/community/fo...do=file&id=310 Last edited by Carsten Seehafer; 12-03-2014 at 10:08 AM. |
The Following 6 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Tom David (08-04-2014) |
#16
|
||||
|
||||
The new version v0.8 is available. You can download it from the downloads section: https://www.flexsim.com/community/fo...do=file&id=310
New features: - drawing in the 3d view can be deactivated (data will still be collected) - new command createObjectList() forces the ticker to recreate his object list during simulation run (p.e. for TaskExecuterFlowItems) - export of the heat map into a html document It's still for FlexSim v7.1.4 and will not work with FlexSim v7.3.X. |
The Following 6 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Tom David (09-05-2014) |
#17
|
||||
|
||||
Quote:
Thanks a lot. |
The Following User Says Thank You to syseo For This Useful Post: | ||
Carsten Seehafer (09-22-2014) |
#18
|
||||
|
||||
Version 1.0 is available and compatible with FlexSim 7.3.4: https://www.flexsim.com/community/fo...do=file&id=310
A few changes to manipulate the internal object list during simulation run with user commands and some minor changes as well. |
The Following 4 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Tom David (09-24-2014) |
#19
|
||||
|
||||
Installer Versions
It looks like that the download link isn't working at the moment because of an unapproved status. Nevertheless the download contains all files for installation by hand (32- and 64-bit).
The new installer versions are attached in this post. One for 32-bit and another for 64-bit. Just double click on the msi-file to install. If you want to remove the module please use the control panel of Windows. All versions are still v1.0.0. Have fun! https://www.flexsim.com/community/fo...do=file&id=310 Last edited by Carsten Seehafer; 12-03-2014 at 10:09 AM. |
The Following 2 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
syseo (10-15-2014) |
#20
|
|||
|
|||
Carsten,
Nice job, thanks for sharing it. I 'm curious to understand the meaning of the color scale (i guess they represent the time spent for each TE in each part of the grid). Could it be changed to a different scale, could it use a different color map ? BR Maurizio |
The Following User Says Thank You to mgiubilato For This Useful Post: | ||
Carsten Seehafer (10-02-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
AGV Module 1.1.0 Available | Anthony Johnson | Product Announcements | 4 | 04-03-2015 08:45 PM |
Module Development SDK | Anthony Johnson | User Development | 5 | 03-27-2015 09:20 AM |
Can not get the right path about agv module | LINWEIXU | Q&A | 4 | 04-03-2014 04:17 PM |
Updateing a module dll to Flexsim6 | Esther Bennett | User Development | 3 | 06-22-2012 12:24 PM |