Quantcast
Channel: OR-Tools CP-SAT solver: count successive NewBoolVar occurrences - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Laurent Perron for OR-Tools CP-SAT solver: count successive...

If you just want to constrain the sum, you should use this methodmodel.AddLinearExpressionInDomain(sum(bool_vars), cp_model.Domain.FromIntervals([0, 0], [6, 12]))If you want to constrain the length of...

View Article



OR-Tools CP-SAT solver: count successive NewBoolVar occurrences

In a simple range I try to get the amount of successive assignments for a variable. The values should be between 6-12 or should be 0. For example in the case a hospital has 24 shifts and an employee...

View Article
Browsing all 2 articles
Browse latest View live


Latest Images