MinimalWire - Clean Power Networks


MinimalWire is a quality of life mod that eliminates spaghetti and keeps your factory wires clean by enforcing efficient connections, using Kruskal's algorithm to produce a minimum spanning tree each time a power pole is added to the network. Check out my other mod for a much more relaxed approach to this idea: OneWire

Tweaks
1 year, 1 month ago
2.0
4.05K
Circuit network Power Blueprints

i prioritize edges with larger maximum reach

8 months ago

I'd like my spanning tree of power connects to look a little more like a trunk (edges between big poles) and branches (edges including medium/small poles).

For example, if I have three poles in series: A(big) -> B(medium) -> C(big), all within connection reach of each other...
Current behavior: connect the shortest edges first: AB, BC
Proposed behavior: connect the edges with the longest potential reach first: AC, either of AB/BC

The resulting tree is no longer Minimal in terms of total edge length, but it feels more organized in a way I'm finding difficult to quantify. The trunk of big poles is less disrupted by shorter connections being formed (and broken) nearby.

I've implemented this in my own local branch, and the changes are minimal:
1. when filling the table of edges, add a single additional field to each edge: reach = max_wire_dist,
2. when sorting the edges by distance, first sort by reach (larger first).

15 days ago
(updated 15 days ago)

MinimalWire is now open source and accepting community contributions! 🎉

Hey everyone - I don't have the time to actively maintain MinimalWire anymore, but I don't want it to go abandoned either. The source code is now on GitHub: https://github.com/SleepyStew/minimalwire

I will actively review and merge PRs from the community, so if you've been wanting a bug fixed or a feature added, now's your chance to contribute! Whether it's a small fix or a big improvement, all contributions are welcome.

Check out the README for the project structure and how to get started. Feel free to open issues for bugs or feature requests too - even if you can't code the fix yourself, it helps others know what to work on.

Thanks to everyone who's used and supported the mod so far! 🙏

New response