A constraint solver typically works by: 1. Having a finite set of variables with a finite set of possible values 2. Having a finite set of propagators which are monotonic on variables (that is, it either reduces the amount of possible values for a variable or does not (it never adds). 3. A space describing a full set of variables and propagators 4. A way of reducing the amount of values when all propagators have hit…
So what differentiates the solvers then? Is it in how they apply the propagators? I'm interested because I naively wrote the exact loop you just posted, trying to solve a very hard problem. I spent ages trying different heuristics, but I knew I was floundering. Then I discovered Z3, which solves the problem in a tiny fraction of the time. It seems like pure magic, and I'm keen to understand how it works.
MiniZinc: free and open-source constraint modeling language
31–34 of 34 posts
Re: MiniZinc: free and open-source constraint modeling language
#32Re: MiniZinc: free and open-source constraint modeling language
#33Earlier quoted context omitted.
“Constraint Programming” refers, for the most part, to the solving of finite-domain problems via backtracking and constraint propagation and is typically concerned with performing a complete, global search of the solution space. https://en.m.wikipedia.org/wiki/Constraint_satisfaction
I like this answer. However, by solution space do you mean domain space?
Re: MiniZinc: free and open-source constraint modeling language
#34Earlier quoted context omitted.
So what differentiates the solvers then? Is it in how they apply the propagators? I'm interested because I naively wrote the exact loop you just posted, trying to solve a very hard problem. I spent ages trying different heuristics, but I knew I was floundering. Then I discovered Z3, which solves the problem in a tiny fraction of the time. It seems like pure magic, and I'm keen to understand how it works.
I haven’t used all the different solver engines, and I haven’t kept up with the field, but many years ago I had a license to IBM ILOG CPLEX, and it was interesting how much faster it was than some others. Gurobi is also very fast (I think they were started by the people who sold ILOG CPLEX to IBM), but haven’t benchmarked it vs CPLEX.