[Python] Problem faced in CP-SAT when using OnlyEnforceIf

Discussão em 'Python' iniciado por Stack, Maio 3, 2025.

  1. Stack

    Stack Membro Participativo

    I have the following excerpt from my Python code

    For emp in employees: Model.Add(d[emp] >= 25) .OnlyEnforceIf(d120[emp]) Model.Add(d2[emp] < 25) .OnlyEnforceIf(d121[emp])

    It is my understanding that if d20 is False then d121 has to be True and the other way around. I am finding that both variables are False. What am I missing?

    Continue reading...

Compartilhe esta Página