Live data from Hacker News

MiniZinc

minizinc.org

71–76 of 76 posts

Re: MiniZinc

#71
post #9

Earlier quoted context omitted.

My GPT answer was: Imagine you have a big box of colorful building blocks, and you want to create something specific, like a house or a car. But you have some rules or constraints that you need to follow in order to complete your creation. Constraint modeling is like playing with those building blocks, but with rules. It helps you figure out how to build something while following certain restrictions. These restricti…

I don't get people posting GPT answers. If parent wanted that, surely they would've done that themselves?

Someone else at the time had posted a let me GPT that response to someone's question which for me provided a very unclear response, I was re-prompting to get a more simplified explanation and it gave something that seemed helpful to me, so also to the question raised, no one else at the time had otherwise answered. I don't generally use GPT responses in comments hence why I noted in this case it was a GPT response and not my own.

Re: MiniZinc

#72
post #53

Whenever MiniZinc, or constraint programming, comes up, I post this link to a programming challenge a friend gave me...14 years ago. I was learning J, and the challenge was me in J, her in javascript or php (she never completed the solution). Here's the link: https://gcanyon.wordpress.com/2009/10/28/a-programming-puzzl... And a person I didn't know posted a solution using MiniZinc. That person happens to also be on H…

I have a secret obsession with hakank’s constraint programming solutions. One of the things that is difficult with constraint programming is that there are several dozens of solvers out there, and they all have different capabilities and limitations. There have been a bunch of times that I have gotten stuck modeling a problem, find some similar problems with brilliant solutions on hakank’s page, and then realize I should actually be using a different solver or a different language.

Re: MiniZinc

#73

I once tried to use MiniZinc as a back-end for a school timetabling app I was working on, and came away with the impression that the OptaPlanner Java API would be a lot easier to use. (Although unlike solvers, OptaPlanner uses heuristic algorithms -- simulated annealing, etc.) 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…

I have actually found that optaplanner often gets better results on hard problems than a lot of constraint solvers do. Part of that has to do with a genius aspect of how it was designed: constraint evaluation is built on top of the drools rule engine algorithm (an evolution of the Rete algorithm).

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.

Re: MiniZinc

#74

Forgive my ignorance, but what kinds of problems are constraint solving good for? Can I specify a list of statements, constraints, prioritisations and the have it solve it for the best possible solution? Is that it? If so, I need it to figure out my optimal workout schedule given a handful of constraints (a problem I’ve been thinking about since I started university twenty years ago :) )

Scheduling problems are a very well established domain for constraint programming, you’d very likely find it easier to express and solve your problem than with other methods.

Re: MiniZinc

#75

I once tried to use MiniZinc as a back-end for a school timetabling app I was working on, and came away with the impression that the OptaPlanner Java API would be a lot easier to use. (Although unlike solvers, OptaPlanner uses heuristic algorithms -- simulated annealing, etc.) 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…

I have actually found that optaplanner often gets better results on hard problems than a lot of constraint solvers do. Part of that has to do with a genius aspect of how it was designed: constraint evaluation is built on top of the drools rule engine algorithm (an evolution of the Rete algorithm). I think the fact that it is written for the JVM is especially helpful because you can write constraints using JVM librari…

OptaPlanner was forked as Timefold by the team behind it: https://timefold.ai/blog/2023/optaplanner-fork/ We made it twice as fast (by replacing Drools).

Re: MiniZinc

#76

Earlier quoted context omitted.

I have actually found that optaplanner often gets better results on hard problems than a lot of constraint solvers do. Part of that has to do with a genius aspect of how it was designed: constraint evaluation is built on top of the drools rule engine algorithm (an evolution of the Rete algorithm). I think the fact that it is written for the JVM is especially helpful because you can write constraints using JVM librari…

OptaPlanner was forked as Timefold by the team behind it: https://timefold.ai/blog/2023/optaplanner-fork/ We made it twice as fast (by replacing Drools).

Thanks for the note! This is helpful to know.
Post reply on HN