Hobby Project - Optimizing Factorio's Belt Madness

55 views
Skip to first unread message

Julia Dijkstra

unread,
Jun 25, 2025, 7:24:08 AMJun 25
to MiniZinc
Heya all!

I have recently picked up a small hobby project again related to optimizing the Belt Madness levels in Factorio. The objective in these levels is to route inputs using conveyor belts, usually requiring tunnels to allow for crossings. My objective is to reduce the number of tiles used with one additional constraint that tunnels must always be followed/preceded by a non-empty tile. The additional constraint ensures the solver cannot simply use tunnels to reduce the number of tiles used.

If that sounds confusing, this is an optimal solution to level 1 for the given constraints

─═┌┐═┐ ┌── ─┐║└═│ │═─ └──═│ ┌┘═┐ ─═║ │═┘ └ ──┘ └───── 43 =========== I have also attempted the level after this, where it hasn't proved optimality yet, but it provides promising results.    ┌──┐ ┌═│═┐║ ──═┌─┘═┘ └─ ─═┌┘═┐ ┌── ──┘┌═│ │═─ ──═║ │═┐║┌─ ┌═│ ║═┘║ ─═┌┘ │═┐║ └ ─═│═┐└═└┘═─ ──┘║└┐ ║┌── ───┘ └═└┘═─ 95
----------------------

My question would be if anyone is interested in reviewing my MiniZinc model to potentially speed it up so that it can tackle even bigger problems :D! I'll include the mzn and dzn files for the examples given.

Greetings,
Julia Dijkstra
orthorio.mzn
orthorio-example2.dzn
orthorio-example1.dzn

Julia Dijkstra

unread,
Jun 25, 2025, 12:45:59 PMJun 25
to MiniZinc
It seems the text was not formatted as in the preview. So here are some images showing the solutions for example 1 and 2 instead.


Reply all
Reply to author
Forward
0 new messages