|Anonymous | Login||2022-08-18 23:41 UTC|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000038||OMNeT++||runtime / Tkenv||public||2008-12-16 09:23||2010-05-18 17:36|
|Target Version||Fixed in Version||4.1rc1|
|Summary||0000038: Layouter produces strange results, if some nodes are fixed|
|Description||The basicspringembedderlayout produces strange results if some nodes are fixed.|
If e.g. you have one unconnected fixed node and about 100 nodes connected nodes in circle, you'll get a huge canvas - if you remove the fixed node, everything works well.
I've taken a look at the source - there's a comment, that a layout with fixed nodes should not be scaled, so that fixed nodes keep their position. Maybe a fix would be to scale all movable nodes and keep the position of fixed nodes. Of course fixed nodes could get covered in this case - but this problem only occurs if you have a large number of nodes (in this case they currently get covered anyway). If tried the "USE_CONTRACTING_BOX" feature as well, but this seems to be broken (segmentation fault).
BTW, it would also be great to have an option to adapt the size of the canvas used for layouting to the current size of the Tk window. In this case the user could dynamically adapt the canvas size.
I've also tried the new layout mechanism - but this seems to produce worse results and takes very long to complete.
|Tags||No tags attached.|
|Attached Files|| better_layout.patch [^] (3,843 bytes) 2009-03-24 18:28 [Show Content]
scaleDespiteFixedNodes.patch [^] (2,118 bytes) 2010-05-06 17:15 [Show Content]
I've attached a patch, that does the following:
- Scale layout, even with fixed nodes, but keep position of fixed and anchored nodes
- Adjust canvas size to windows size, if no bgb display string is given
- Increased TOutVectorWindow buffer size
|Let us discuss adjusting canvas size to the Tk window size separately -- creating bug 0000165 for that purpose.|
|Adjusted both layouting algorithms so that nodes are always placed inside compound module borders (it was an issue that they could get outside). Running test/anim/dynamic2 (a new test) gives good results now. The change to scale and/or shift floating (i.e.movable) nodes after layouting was not applied, because (as the description notes too) their relative positions to fixed/anchored nodes would change, so the result may be completely different (and inferior) to what the layouter produced in the first place. However, layouting parameters have been adjusted, and both layouters should now give better results without scaling as well.|
Unfortunately the new layouting mechanism doesn't help for typical OverSim scenarios. The problem remains, that as soon as a single node is fixed, scaling is disabled. The new mechanism now leads to funny results if e.g. we have a ring with a large number of nodes - now many nodes are now placed exactly on the border of the canvas keeping an empty space in the middle.
Of course the relative positions to fixed/anchored nodes would change with the proposed patch - but where is the problem? There should be no relation between fixed and regular nodes (regular nodes get always randomly placed by the layouter, no matter if scaling is enabled or not). And all fixed/anchored nodes are kept at their correct positions with the proposed patch...
|Added a new version of the patch (scaleDespiteFixedNodes) for omnetpp-4.1b4 - behavior is disabled by default. To enable set the display string bgb = 1.|
|Layouter is now fixed to produce acceptable results for the mentioned case.|
|2008-12-16 09:23||baumgart||New Issue|
|2008-12-16 09:23||baumgart||Assigned To||=> andras|
|2009-03-24 18:26||baumgart||Note Added: 0000134|
|2009-03-24 18:28||baumgart||File Added: better_layout.patch|
|2010-05-05 16:22||andras||Note Added: 0000272|
|2010-05-05 16:32||andras||Note Added: 0000273|
|2010-05-05 16:32||andras||Status||new => resolved|
|2010-05-05 16:32||andras||Fixed in Version||=> 4.1rc1|
|2010-05-05 16:32||andras||Resolution||open => fixed|
|2010-05-06 12:12||baumgart||Note Added: 0000284|
|2010-05-06 12:12||baumgart||Status||resolved => feedback|
|2010-05-06 12:12||baumgart||Resolution||fixed => reopened|
|2010-05-06 17:15||baumgart||File Added: scaleDespiteFixedNodes.patch|
|2010-05-06 17:16||baumgart||Note Added: 0000287|
|2010-05-18 17:36||rhornig||Note Added: 0000305|
|2010-05-18 17:36||rhornig||Status||feedback => resolved|
|2010-05-18 17:36||rhornig||Resolution||reopened => fixed|
|Copyright © 2000 - 2022 MantisBT Team|