Edit: this puzzle is also known as "Einstein's Riddle"
The Who owns the Zebra is an example of a classic set of puzzles and I bet that most people on Stack Overflow can solve it with pen and paper. But what would a programmatic solution look like?
Based on the clues listed below...
There are five houses.
Each house has its own unique...
Looking for tips, tutorials, books and other resources to get started with Constraint Programming.
...
Hello,
I need to solve a job affectation problem and I would like to find preferably efficient algorithms to solve this problem.
Let's say there are some workers that can do several kind of tasks. We also have a pool of tasks which must be done every week. Each task takes some time. Each task must be taken by someone. Each worker must...
I have to solve a CSP logic problem using Java Constraints Library. For now I've managed to represent some constraints of the problem, most of them are based on "equals" and "not equals" binary constraints. My doubt is, how to represent an addition based constraint? Example:
variable1 belongs to DomainA
variable2 belongs to DomainB
var...
I'm working on an interactive job scheduling application. Given a set of resources with corresponding capacity/availabilty profiles, a set of jobs to be executed on these resources and a set of constraints that determine job sequence and earliest/latest start/end times for jobs I want to enable the user to manually move jobs around. Esse...
I'm working on an application in Java, that needs to do some complex logic rule deductions as part of its functionality. I'd like to code my logic deductions in Prolog or some other logic/constraint programming language, instead of Java, as I believe the resulting code will be significantly simpler and more maintainable.
I Googled for e...
I'd like to know about specific problems you - the SO reader - have solved using constraint programming and what constraint logic language you used.
Questions:
What problems have you used constraint programming to solve?
What constraint logic language did you use?
I'm looking for first-hand experiences, so please do not answer unles...
Hey,
I'm trying to extract Cgl Gomory cuts out of the Cgl (Cut Generation Library) of Coin-Or The following is the code I'm using to extract the cuts -
OsiCuts cutlist;
CglGomory * gomory = new CglGomory();
gomory->setLimit(100);
gomory->generateCuts(*sym, cutlist) ;
where sym is an instance of OsiSymSolverInterface (the OsiSolverInt...
In reading up on constraint-logic programming, I can't help but notice an apparent relationship with SQL programming. Is SQL an example of "constraint logic programming" in action?
...
Hello,
I'm trying to use Microsoft Solver Foundation 2 to solve a fairly complicated situation, however I'm stuck with an UnsupportedModelException even when I dumb down the model as much as possible.
Does anyone have an idea of what I'm doing wrong?
Following is the least example required to reproduce the problematic behavior.
var ctx ...
I have a list of items I want to buy. The items are offered by different shops and different prices. The shops have individual delivery costs. I'm looking for an optimal shopping strategy (and a java library supporting it) to purchase all of the items with a minimal total price.
Example:
Item1 is offered at Shop1 for $100, at Shop2 fo...
Hi Everyone,
Tried doing a bit of research on the following with no luck. Thought I'd ask here in case someone has come across it before.
I help a volunteer-run radio station with their technology needs. One of the main things that have come up is they would like to schedule their advertising programmatically.
There are a lot of nea...
I have many variable-sized lists containing instances of the same class with attribute foo, and for every list I must apply rules like:
if there's an element foo=A there cannot be elements with foo in [B,C,D]
if there's an element foo=X there must by at least one with foo in [Y,Z]
there can be between MIN and MAX elements foo=BAR
com...
I've started learning about Constraint programming and I feel it is something that would work well with Haskell (also I enjoy using Haskell).
Are there any mature constraint frameworks for Haskell?
...