by TimTheTinker · 3y ago · 0 comments
Maybe it's just that formally expressing a set of constraints doesn't come naturally to me. I'm sure with a lot of practice, writing MiniZinc code would be easier.
The Google OR-Tools Python API also might be easier if you're generating models dynamically. I wouldn't want to generate MiniZinc code...
I've used MiniZinc too (in a different project), where I wanted some optimal results to compare against some heuristic algorithms I was developing. MiniZinc requires more careful thought when it comes to encoding/representing the problem (i.e. sets of integers, rather than familiar Java objects), but it's not too difficult. Since it's optimal it can take an age to run; I could only scale my problem up to N=11 before it was taking more than 24 hours (that was enough for my comparisons though)
The goal of an heuristic algorithm is to produce a near-optimal or approximate solution in a reasonable amount of time. From here, some heuristics have more or less theory behind them and that theory shows what sort of properties the solution has.
[1] https://optimization.cbe.cornell.edu/index.php?title=Heurist...
[2] https://en.wikipedia.org/wiki/Heuristic_(computer_science)
I think the fact that it is written for the JVM is especially helpful because you can write constraints using JVM libraries, which are a massive boon in some of the very domain specific areas that I’ve worked in. Writing geospatial or RF propagation constraints in a DSL like minizinc is a total nonstarter.