New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated circuit layout with routing of wires #557
Comments
Just rerouting a single wire would be inconsistent, as the routing output depends on the order in which wires are routed (explicit wire route order sorting will be needed to make routing more stable, at least for the starter version). The obstacles class is used to completely define the routing task. If something was changed in the obstacles, then rerouting is necessary and will take place. It will still be possible to route wires under condition, that part of the routes are manually prerouted, such routes will be consequently registered in the obstacles class. Both start options are valid: manual router start is needed, when automatic routing is off or when there are too many objects, and router takes long, which becomes inconvenient. Interactive routing is good when you add a new connection, or when you want to move gates around. |
Just to document it for future -- there seems to be a problem with routing cache. To reproduce:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.util.Collections$UnmodifiableCollection.<init>(Collections.java:1026)
at java.util.Collections$UnmodifiableSet.<init>(Collections.java:1128)
at java.util.Collections.unmodifiableSet(Collections.java:1118)
at org.workcraft.dom.NodeContextTracker.getPostset(NodeContextTracker.java:144)
at org.workcraft.dom.AbstractModel.getPostset(AbstractModel.java:139)
at org.workcraft.plugins.circuit.routing.RouterClient.registerObstacles(RouterClient.java:83)
at org.workcraft.plugins.circuit.VisualCircuit.draw(VisualCircuit.java:392)
... Note that if step 2) is skipped, then there is no exception, therefore I think the problem is because the routing cash was not updated properly after removal of circuit nodes. Also exceptions are thrown if a circuit has a Joint, but that is fine, as the circuit we decided to allow routing only without joints. Maybe later we can improve it a bit and add joints, e.g. making them like a combination of an input and output port. Sometimes the route can be significantly improved by moving a couple of turn-points, e.g.: a) In b) In circuit-buck-cg-feedback.work.zip |
@sgaflv I have (almost) integrated this router into the master branch and it works great most of the time! Form time to time I observe unrouted wires in situations where routing seems to be obvious. I managed to cupture this problem in a simplified example with a single fork (remove.zip) fork.work.zip Basically, if you move |
For interactive graphical debug information about routing please switch on the |
@sgaflv: Strange routing behaviour of the routing algorithm (enable A snail shape route is created when there is a simpler route available -- see Interestingly, if the whole circuit is moved a little horizontally (so the relative position of all components remain unchanged) the routing becomes correct -- see Update: This example moved to issue #821. |
@sgaflv Here the other strange routing decision I mentioned the other day, now isolated into a small circuit: Notice that Update: This issue has been fixed. |
A layout tool is required that intelligently places the circuits components and automatically routes all the wires.
Note that currently implemented routing algorithm recalculates the shape of all wires and cannot be applied to a subset of wires.
The text was updated successfully, but these errors were encountered: