FactoryPlanner
FactoryPlanner copied to clipboard
New solver
For now, release it with only minimal UI changes.
Features:
- Support production loops.
- Support for bottom-up design.
- Support machine limit.
- Respects the list in order and sub-floor structure like the traditional solver.
- No need to specify free items.
- (Calculations are slow.)
Not yet implemented:
- Production percentage.
- Plan to implement instead an limits will be supported for items.
- Product prioritize.
- Plan to implement instead an external product and external ingredient as virtual recipe.
- It is also improvement of the free items feature.
- From the reference item, add a recipe that consumes it.
- Predicting the amount of machines needed when switching machines.
Changes:
- The solver is now specified using the drop-down menu.
- The default solver for new subfactories is now the interior point solver.
- Solvers for existing subfactories will not be changed.
- Add name and timescale to subfactory_data.
- Hide the percentage column when using matrix solver.
- Add and change locale strings.
- In recipe_line, the item button is displayed even if the amount is zero.
Additional note:
- The solver has been modified to specify a reference instead of a production goal.
- Reference is the minimum amount of items to use in a sub-factory. It is used to specify the items you want to produce or consume.
I will try this in my SE playthrough and let you know if I find anything.
Well it almost immediately crashes when I load it in my SE save. I tried removing it then re-enabling it but that doesn't help.
~~It must be crashing in on_configuration_changed
somewhere, because it doesn't do this on a new game.~~ I'm stupid, it says the event right there in the stack trace!
Existing saves need to be migrated. We have changed the version of json.info to 1.1.26.
Oh, I seem to crash with the latest version of Factorio (1.1.41). During development, it was reverted to 1.1.39, so I'll check it out.
Adding a factory planner to an existing save seems to cause a crash. It doesn't seem to be related to the solver, but I'll try to fix it.
It might have something to do with the solver. nil seems to be a state. (I need documentation.)
Fixed. (The bug was related to the solver.) @raiguard Please try again.
Hello, thanks a lot for this. I haven't had time to look at it yet, and since it is so big, I don't know when I will have time. I want to focus on some other things first. So just FYI, can't make any promises related to this atm.
@B-head Completely forgot to respond, but that did fix my issue. I haven't had much opportunity to play Factorio recently (been spending my time making mods instead) but when I pick up my SE playthrough again I'll continue testing :)
As far as I'm concerned, an LP solver is basically the raison d'etre of a factory planner for a pack like, e.g., Seablock. I would absolutely love to see this solver merged.
Yeah I agree it makes sense to have one, and I'm sorry I haven't really gotten to any of the proposals so far. I plan on working on the solver side of things at some point.