Live data from Hacker News

Constraint Solving with MiniZinc

hillelwayne.com

1–10 of 39 posts

Re: Constraint Solving with MiniZinc

#4

Can anyone comment on the relative feasibility of using Z3 for problems of similar or greater scale? The performance is actually kind of concerning.

Depends on the search method, and heuristics employed, here's an excerpt from JaCoP constraint solver's documentation: http://jacopguide.osolpro.com/guideJaCoP.html#x1-730013

The heuristics can be hierarchical permitting customized implementations, see 'IndomainHierarchical' here: http://jacopguide.osolpro.com/guideJaCoP.html#x1-820001

What's interesting about JaCoP in particular is because it has derivative, and Multivariate Interval Newton Method constraints. If you can model your problem in terms of 'flow', you'll eliminate the risk of calculating beyond INT_MAX, in case that's a concern. Reference: http://jacopguide.osolpro.com/guideJaCoP.html#x1-490005

And that's just JaCoP, there are many great constraint solvers out there.

Re: Constraint Solving with MiniZinc

#5

FIY: MiniZinc is a high-level constraint programming system implemented by various constraint programming solvers. Here's the annual MiniZinc competition which ranks those constraint solvers: http://www.minizinc.org/challenge.html

Can someone explain why I would use this instead of Python + Pulp or Pyomo, or Julia + JuMP.

Re: Constraint Solving with MiniZinc

#6

FIY: MiniZinc is a high-level constraint programming system implemented by various constraint programming solvers. Here's the annual MiniZinc competition which ranks those constraint solvers: http://www.minizinc.org/challenge.html

Can someone explain why I would use this instead of Python + Pulp or Pyomo, or Julia + JuMP.

Perhaps MiniZinc can be used in areas where linear programming is unable to model?

Re: Constraint Solving with MiniZinc

#7

FIY: MiniZinc is a high-level constraint programming system implemented by various constraint programming solvers. Here's the annual MiniZinc competition which ranks those constraint solvers: http://www.minizinc.org/challenge.html

Given the 2018 challenge results, I note OR-Tools is https://developers.google.com/optimization/ , its introduction is https://developers.google.com/optimization/introduction/over... , and the Python version of getting started is https://developers.google.com/optimization/introduction/pyth... . There are an unofficial node.js bindings https://github.com/mapbox/node-or-tools .

Re: Constraint Solving with MiniZinc

#9

FIY: MiniZinc is a high-level constraint programming system implemented by various constraint programming solvers. Here's the annual MiniZinc competition which ranks those constraint solvers: http://www.minizinc.org/challenge.html

Can someone explain why I would use this instead of Python + Pulp or Pyomo, or Julia + JuMP.

I don't know anything about those but Minizinc allows you to write one model that compiles to a SAT solver, MIP solver, CP solver, CBLS solver etc. Which is neat.

Re: Constraint Solving with MiniZinc

#10

FIY: MiniZinc is a high-level constraint programming system implemented by various constraint programming solvers. Here's the annual MiniZinc competition which ranks those constraint solvers: http://www.minizinc.org/challenge.html

Can someone explain why I would use this instead of Python + Pulp or Pyomo, or Julia + JuMP.

I was going to write something but this answers your question. [1] pulp and jump only model mixed integer programs, if I’m not mistaken.

However when I looked at this some years ago, I came across journal publications that found mixed integer program (MIP) solvers to be much faster than constraint solvers for many problems. I suspect that this was because MIP theory was much more well developed at the time and that commercial interests (airline scheduling, oil and gas, etc.) were driving impressive improvements in MIP solver technology (dominant players are IBM CPLEX, Gurobi and Xpress), whereas constraint programming remained more or less a niche domain in computer science.

[1] https://www.solver.com/integer-constraint-programming

Post reply on HN