Performance: Faster Model Generation
Model generation is now significantly faster across all solvers, with no changes to modeling logic or output.
Changes
- CP (
gdcp.py): Replace O(n^2) string concatenation with list + join; use set for variable membership checks. - MILP (
gdmilp.py): Same string concatenation fix in the nested constraint loop; set-basedknown_variableslookups; list + join for binary variable declarations. - Groebner (
gdgroebner.py): Add inverted index for deduction generation (previously O(V * R)); use tuple-in-set for O(1) deduplication instead of list scan. - Z3-SMT (
gdz3smt.py): Add inverted index (previously O(V * R)); set forknown_variables. - SAT (
gdsat.py): Tuple-in-set deduplication for deductions; set forknown_variablesin three methods. - pySMT (
gdsmt.py): Set forknown_variableslookup.
How to Upgrade
pip install --upgrade autoguess