1

Please read https://github.com/google/or-tools/blob/stable/ortools/sat/doc/channeling.md OnlyEnforceIf() only accept one or more Boolean literals. So for the first constraint (assuming there is an error in the direction of the comparisons): b1 = model.NewBoolVar() model.AddLinearConstraint(number_of_machines, 6, 10).OnlyEnforceIf(b1) model.Add(line == 8)....


Only top voted, non community-wiki answers of a minimum length are eligible