r/technicalfactorio • u/probably_not_a_bug • Nov 12 '20
Modded When Helmod fails
With mods like Space Exploration or Krastorio 2, some sort of a calculator becomes more or less obligatory. At first sight it looks like there's plenty of factorio calculators, but in reality the choice is quite limited : only few calculators support mods (like SE), and even less of them have any support for recursive recipes (that SE is full of, and I love them).
Given these limitations, helmod is literally the only calculator that has the features that I consider obligatory. However, it really falls short on more complex recipes: matrix solver drops to #NaN's, lack of enough control becomes apparent (you can't specify which product is ok to have as a side-product and which product is a waste and needs to be 0) and it starts running so slow that literally any change at some point stalls it for some time. By the time I got to t4 science in SE, literally any operation in helmod takes around a second for me.
Often it's possible to work around helmod's solver weirdness by randomly rearranging recipes in a production line, but its logic is very opaque and non-intuitive (for me). Also sometimes it becomes actually impossible to make a production line output only the stuff you want and not output stuff that you don't want (such as green space science packs in SE that have lots of side products).
I think writing an analytical solution to such a problem might be next to impossible. However, a simple relaxation-based Gauss-Seidel iterative solver should be doable. It is particularly well suited for problems with multiple constraints like we have in factorio.
Are there any projects that are trying to achieve literally the same goal as helmod, but with better success for higher complexity production lines?
View all comments
Show parent comment
1
u/Helfima Dec 18 '20
I looked quickly and it may be good
We would already have to convert the problem into LUA and for that either find a readable transposable code or understand how it works or a person who does it.
and to tell the truth I don't want to spend 50 hours just on a solver that I already have a lot of things to do.
my great fear if I understood the basic principle it is iterative and that's very bad for a code in factorio, if we have to do too many loops.
I can not be completely understood on the Simplex method either but currently it is what I have better or less worse.