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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
708c8e2
Written a new LP solver.
B-head Sep 21, 2021
140ee91
Using string.format().
B-head Sep 21, 2021
bbe7d36
Include the subfactory name to subfactory_data.
B-head Sep 21, 2021
5805229
Properly treat the same recipe.
B-head Sep 22, 2021
8aca6f3
Add garbage.
B-head Sep 22, 2021
af2b5f0
Reduce variables.
B-head Sep 23, 2021
03b039d
Changed the initial value of vector s.
B-head Sep 23, 2021
6e0543d
Rename dot() to hadamard_product(). (I am an idiot.)
B-head Sep 23, 2021
34a6b2e
Extremely small values were excluded from the step size calculation.
B-head Sep 23, 2021
4fc1e69
Rewritten gaussian_elimination().
B-head Sep 24, 2021
18aa4d5
Minor refactoring.
B-head Sep 24, 2021
7f2295a
Written SparseMatrix class.
B-head Sep 24, 2021
f5806e3
Eliminate variables in linear equations.
B-head Sep 26, 2021
b5da26d
Written cholesky_factorization().
B-head Sep 27, 2021
53ff3ed
Support for selection of interior point solver.
B-head Sep 28, 2021
ad67822
Adjust production_table for the new solver.
B-head Sep 29, 2021
83276f6
Minor solver changes.
B-head Sep 30, 2021
385d018
Changed version to 1.1.26.
B-head Oct 1, 2021
f2c8b78
Fixed nil state trap.
B-head Oct 1, 2021
9e8ef1d
Fix: Crash when setting machine limit when reference item is terminated.
B-head Oct 4, 2021
54ca9fb
Fix: Does not exit when the variable is empty.
B-head Oct 4, 2021
31a4adf
Force variables constraint.
B-head Oct 4, 2021
0d826f0
In recipe_line, the item button is displayed even if the amount is zero.
B-head Oct 4, 2021
7cf18f6
Fix: Crash when ingredient_satisfaction is true.
B-head Oct 5, 2021
dce5711
Subfactories with loops to make it better default solution.
B-head Oct 5, 2021
9f48bd3
Merge branch 'ClaudeMetz:master' into new_solver
B-head Oct 11, 2021
11ff497
Rename migration file.
B-head Oct 25, 2021
d85f630
Merge branch 'master' into new_solver
B-head Oct 25, 2021
2d8433f
Add LDoc to solver_util.lua
B-head Oct 29, 2021
91fabdc
Add a function to re-setup the meta table
B-head Oct 29, 2021
ba92182
Modify orders
B-head Oct 30, 2021
af190d3
Minor refactoring
B-head Nov 2, 2021
b7f912a
Add LDoc
B-head Nov 8, 2021
640c197
Refactoring name changes
B-head Nov 8, 2021
10c8e8d
Fix LDoc
B-head Nov 9, 2021
b0aa8ac
Fix LDoc 2
B-head Nov 9, 2021
ecd1764
Improve performance
B-head Nov 9, 2021
0bdf0cb
Fix LDoc 3
B-head Nov 9, 2021
e7e8d45
Change to create and use an item ID
B-head Nov 10, 2021
63e7b22
Merge branch 'master' into new_solver
B-head Nov 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
file = "modfiles"
project = "Factory Planner"
title = "Factory Planner Refarence"
all = true
format = "markdown"
dir = "docs"

custom_see_handler("^(https?://.*)$", function(url)
return url, url
end)
23 changes: 12 additions & 11 deletions modfiles/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,10 @@ NTH_TICK_HANDLERS = {}
GENERIC_HANDLERS = {}
SEARCH_HANDLERS = {}

require("util") -- core.lualib
table = require('__flib__.table') -- replaces the lua table module

require("data.init")
require("data.data_util")

require("ui.dialogs.main_dialog")
require("ui.dialogs.modal_dialog")
require("ui.ui_util")
require("ui.event_handler")

DEVMODE = true -- Enables certain conveniences for development
MARGIN_OF_ERROR = 1e-8 -- Margin of error for floating point calculations
TIMESCALE_MAP = {[1] = "second", [60] = "minute", [3600] = "hour"}
SOLVER_TYPE_MAP = {[1] = "traditional", [2] = "matrix", [3] = "interior_point"}
SUBFACTORY_DELETION_DELAY = 15 * 60 * 60 -- ticks to deletion after subfactory trashing
NEW = nil -- global variable used to store new prototype data temporarily for migration

Expand Down Expand Up @@ -46,6 +36,17 @@ if DEVMODE then
DEV_EXPORT_STRING = "eNq1lFFr2zAQx7+Lnu3gpE0Zfh0bFFYY22MpRpbPyRXJ8uRzwQR/951kmaypN1a3fYvv/rn76X86nYSxVfEErkPbiFxkm+2nzfVOJKLry1oqsg6hE/n9STTSACs4hcprT4KG1keQwHA05tHZJm21JBBjIggNdEpqztxkrLHkq/ki352tekW+ji0fQdHUpXWWrA/GcqA5xSVRpQqd6pE8G5pWY41QiZxcD8kzFG7r4FePDqpCGts3oUkFNTYcKQfWxXAy/8ivs8zT2rbQ8AR6Lqu07DzvDDsmLwl7JxvsTbq72n8I2nY1WRiFdfAeWCVontCZKtvskxAsLrsS+9G11lHq0wu9x7Xn0Xg4UmpR/+tAte6xWmX0br/a6Y5Amo+h2mb/eTUfkrhIxZy6nRZz/vxstV8mv+ixYK2tdR7hGwNcbuL8t5Dz4ArbIFq5ooqfhIN1/pDKyZqwOXiOduJnqiJ6NUXgD/IfU29WG6mOkfUSg6VgSs1l06hKd68BOUpXFRoN4+e11B0r7xhEPzfmNL6wOar+ZrQJ6ULFvTnL7uJZvAngFDQkDxAG7l1BfnlpKKI985YFsIVRxyEtE8R7sz3nv4bBj+fAz/m1H8L9jpZ+MS0N4rWv+IJFb7iJC9Xe87AP428/DGfh"
end

require("util") -- core.lualib
table = require('__flib__.table') -- replaces the lua table module

require("data.init")
require("data.data_util")

require("ui.dialogs.main_dialog")
require("ui.dialogs.modal_dialog")
require("ui.ui_util")
require("ui.event_handler")


-- ** UTIL **
-- No better place for this too simple, yet too specific function anywhere else
Expand Down
Loading