[Python] How can I implement refining conflict in constraint programming?

Discussão em 'Python' iniciado por Stack, Julho 1, 2025.

  1. Stack

    Stack Membro Participativo

    I use Docplex with python 3.7 to implement constraints programming. when it was infeasible, how can I proceed to list constraints those was to source of the conflict?

    mdl.export_as_cpo(out="/home/..../MCP3.lp")
    msol = mdl.solve(FailLimit=700000, TimeLimit=1600)
    DInfos= msol.get_solver_infos()
    mconflict=msol.CpoRefineConflictResult()
    mconflict.get_all_member_constraints()


    Error message: mconflict=msol.CpoRefineConflictResult() AttributeError: 'CpoSolveResult' object has no attribute 'CpoRefineConflictResult'

    Continue reading...

Compartilhe esta Página