For some reason the way we use sat4j seems to be non-optimal, leading to the full 5 seconds of optimising being used. (Removing this limit in the blanketcon pack leads to Sat4j churning for at least 20 mins to "prove" that it's found the most optimal result, with this PR Sat4j only takes ~60ms to solve the remaining rules and options).
This means we can be more confident that we get a fully optimal solution in more cases. (When this isn't the case you'll see this line in the log: Aborted mod solving optimisation due to timeout)
This also means we can use the solver system for more features, and be confident that it still finds the optimal solution quickly.
Breaking changes:
Plugins can no longer override LoadOption.equals and LoadOption.hashCode
Misc Changes:
Sat4jWrapper can now have rules changed at anytime, and correctly reverts back to solve it properly.
Other changes from the src/main/resources/changelog/solver-pre-processor.txt file:
Added a pre-processor step to mod solving.
This greatly reduces the time taken for Sat4j to optimise the final mod set (pick the newest possible versions of every mod)
Previously this was capped at 5 seconds.
Added a warning when picking between two mods when we don't have any reason to pick one over the other.
This can happen when two mods provide each other, or two mods provide the same version of a third mod.
Added a system property to disable this "loader.mod_solving.disable_pre_processor"
Added a system property to explain what this pre-processor is struggling with (partially simplified mod sets)
"loader.mod_solving.print_results" prints unsolved sub-problems, and the final chosen options.
This is an alternative to the very verbose "loader.debug.mod_solving" property.
Made the log line "Aborted mod solving optimisation due to timeout" always print when it happens.
For some reason the way we use sat4j seems to be non-optimal, leading to the full 5 seconds of optimising being used. (Removing this limit in the blanketcon pack leads to Sat4j churning for at least 20 mins to "prove" that it's found the most optimal result, with this PR Sat4j only takes ~60ms to solve the remaining rules and options).
This means we can be more confident that we get a fully optimal solution in more cases. (When this isn't the case you'll see this line in the log:
Aborted mod solving optimisation due to timeout
)This also means we can use the solver system for more features, and be confident that it still finds the optimal solution quickly.
Breaking changes:
LoadOption.equals
andLoadOption.hashCode
Misc Changes:
Other changes from the src/main/resources/changelog/solver-pre-processor.txt file: