constraint-programming

problem.getSolutions() of constraint library yielding no solutions

problem.getSolutions() of constraint library yielding no solutions Question: I’m trying to solve a small constraint problem using the "constraint" library in Python. The code is as follows but the solutions is empty. I was expecting a solution for Km * wt_Km (1 *42). Can somebody help in solving this? Thanks from constraint import * wt_Nd …

Total answers: 1

Spreading out shift assignments in constraint solver (ortools)

Spreading out shift assignments in constraint solver (ortools) Question: I used the Google OR-Tools Employee Scheduling script (thanks by the way) to make a on-call scheduler. Everything works fine and it is doing what it is supposed to. It makes sure each person works about the same amount of "shifts" (two week periods), it lets …

Total answers: 1

Recursion: how to avoid Python set changed set during iteration RuntimeError

Recursion: how to avoid Python set changed set during iteration RuntimeError Question: Background and Problem Description: I have some code that solves the graph coloring problem (broadly defined as the problem of assigning “colors” to an undirected graph, making sure that no two vertices connected by an edge have the same color). I’m trying to …

Total answers: 1