Skip to content

Performance: Faster Model Generation

Choose a tag to compare

@hadipourh hadipourh released this 25 Feb 08:12
· 2 commits to main since this release

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-based known_variables lookups; 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 for known_variables.
  • SAT (gdsat.py): Tuple-in-set deduplication for deductions; set for known_variables in three methods.
  • pySMT (gdsmt.py): Set for known_variables lookup.

How to Upgrade

pip install --upgrade autoguess