constraint-programming

Meeting scheduling algorithm with Overlapping Time Slots

女生的网名这么多〃 提交于 2019-12-03 09:56:14
问题 I want to do something similar to Appointment scheduling algorithm (N people with N free-busy slots, constraint-satisfaction). using Hopcroft-Karp Algorithm. But my additional requirement is that my time intervals are overlapping. Eg. The time slots can be 10am-11am or 10.15am to 11.15am. So if I choose 10am to 11 am slot, I don't want to choose 10.15 am to 11.15 am slot. Is it possible to achieve this without hitting the performance badly? 回答1: You could use a flow algorithm similar to what

Disadvantages of using Solver Foundation for constraint programming

感情迁移 提交于 2019-12-01 09:03:21
What are the disadvantages of using Microsoft Solver Foundation for CLP? Solver does have some support in the Express/Standard versions, but would imagine that one would need to buy the expensive Gurobi / Knitro add-ons to accomplish anything more than the most basic constraint programming. Purely considering it's CLP capabilities, how does Solver compare to ECLiPSe? The main disadvantage is that Microsoft Solver Foundation is discontinued as a standalone product as mentioned here : As users have pointed out, Microsoft has not been active on the Solver Foundation forums since Nate left. We

Disadvantages of using Solver Foundation for constraint programming

霸气de小男生 提交于 2019-12-01 05:44:38
问题 What are the disadvantages of using Microsoft Solver Foundation for CLP? Solver does have some support in the Express/Standard versions, but would imagine that one would need to buy the expensive Gurobi / Knitro add-ons to accomplish anything more than the most basic constraint programming. Purely considering it's CLP capabilities, how does Solver compare to ECLiPSe? 回答1: The main disadvantage is that Microsoft Solver Foundation is discontinued as a standalone product as mentioned here: As

Example channelling constraints ECLiPSe

徘徊边缘 提交于 2019-11-30 19:07:11
Can someone provide a simple example of channelling constraints? Channelling constraints are used to combine viewpoints of a constraint problem. Handbook of Constraint Programming gives a good explanation of how it works and why it can be useful: The search variables can be the variables of one of the viewpoints, say X1 (this is discussed further below). As search proceeds, propagating the constraints C1 removes values from the domains of the variables in X1. The channelling constraints may then allow values to be removed from the domains of the variables in X2. Propagating these value

Z3 Theorem Prover: Pythagorean Theorem (Non-Linear Artithmetic)

旧巷老猫 提交于 2019-11-29 12:02:02
Wherefore? The usecase context in which my problem occures I define 3 random item of a triangle. Microsoft Z3 should output: Are the constraints satisfiabe or are there invalid input values? A model for all the other triangle items where all the variables are assigned to concrete values. In order to constrain the items i need to assert triangle equalities - i wanted to start out with the Pythagorean Theorem ( (h_c² + p² = b²) ^ (h_c² + q² = a²) ). The Problem I know that Microsoft Z3 has only limited capabilities to solve non-linear arithematic problems. But even some hand calculators are able

Optimizing pathfinding in Constraint Logic Programming with Prolog

送分小仙女□ 提交于 2019-11-28 11:06:00
I am working on a small prolog application to solve the Skyscrapers and Fences puzzle. An unsolved puzzle: A solved puzzle: When I pass the program already solved puzzles it is quick, almost instantaneous, to validate it for me. When I pass the program really small puzzles (2x2, for example, with modified rules, of course), it is also quite fast to find a solution. The problem is on computing puzzles with the "native" size of 6x6. I've left it running for 5 or so hours before aborting it. Way too much time. I've found that the part that takes the longest is the "fences" one, not the

Embedded Prolog Interpreter/Compiler for Java

会有一股神秘感。 提交于 2019-11-27 17:58:33
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 embedded Java implementations on Prolog, and found number of them, each with very little documentation. My (modest) selection criteria are: should be embeddable in Java (e.g. can be bundled up with my java package instead of requiring any native installations on

Appointment scheduling algorithm (N people with N free-busy slots, constraint-satisfaction)

这一生的挚爱 提交于 2019-11-27 17:32:18
Problem statement We have one employer that wants to interview N people, and therefore makes N interview slots. Every person has a free-busy schedule for those slots. Give an algorithm that schedules the N people into N slots if possible, and return a flag / error / etc if it is impossible. What is the fastest possible runtime complexity? My approaches so far Naive: there are N! ways to schedule N people. Go through all of them, for each permutation, check if it's feasible. O( n! ) Backtracking: Look for any interview time slots that can only have 1 person. Schedule the person, remove them

Optimizing pathfinding in Constraint Logic Programming with Prolog

吃可爱长大的小学妹 提交于 2019-11-27 05:54:34
问题 I am working on a small prolog application to solve the Skyscrapers and Fences puzzle. An unsolved puzzle: A solved puzzle: When I pass the program already solved puzzles it is quick, almost instantaneous, to validate it for me. When I pass the program really small puzzles (2x2, for example, with modified rules, of course), it is also quite fast to find a solution. The problem is on computing puzzles with the "native" size of 6x6. I've left it running for 5 or so hours before aborting it. Way

Embedded Prolog Interpreter/Compiler for Java

大兔子大兔子 提交于 2019-11-26 19:17:47
问题 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 embedded Java implementations on Prolog, and found number of them, each with very little documentation. My (modest) selection criteria are: should be embeddable