Skip to content
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

New solver #25

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open

New solver #25

wants to merge 40 commits into from

Conversation

B-head
Copy link

@B-head B-head commented Sep 30, 2021

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.

@raiguard
Copy link
Contributor

I will try this in my SE playthrough and let you know if I find anything.

@raiguard
Copy link
Contributor

raiguard commented Oct 1, 2021

image

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!

The Final Frontier.zip

factorio-current.log

@B-head

This comment has been minimized.

@B-head
Copy link
Author

B-head commented Oct 1, 2021

Fixed. (The bug was related to the solver.)
@raiguard Please try again.

@ClaudeMetz
Copy link
Owner

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.

@raiguard
Copy link
Contributor

@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 :)

@qdbp
Copy link

qdbp commented May 25, 2023

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.

@ClaudeMetz
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants