Decision Optimization

 View Only
  • 1.  docplex

    Posted Tue August 02, 2022 10:05 AM
    Hi
    Why I can not get the solution in my code which is attached?
    solution is 'NonType object'
    Thanks

    ------------------------------
    Pedram Jazayeri
    ------------------------------

    #DecisionOptimization


  • 2.  RE: docplex

    Posted Wed August 03, 2022 03:51 AM
    Dear Pedram,

    It is likely because the solver doesn't find a solution to your problem
    you should be able to check the solve status and invoke the conflict refiner to display conflicting constraints with:

    import docplex.mp.conflict_refiner as cr
    m.solve()
    solve_status = m.get_solve_status()
    print(solve_status)
    if solve_status.name in [ 'INFEASIBLE_SOLUTION', 'INFEASIBLE_OR_UNBOUNDED_SOLUTION']:
             cref = cr.ConflictRefiner()
        print('show minimal conflict')
        cref.refine_conflict(m, display=True)

    I hope this helps,

      Cheers,



    ------------------------------
    Renaud Dumeur
    ------------------------------



  • 3.  RE: docplex

    Posted Fri August 05, 2022 11:36 PM
    Hi dear Renaud
    I found that the problem has infeasible solution, but how I can recognize which of the constraints and upper bound are the conflict?
    Thanks

    ------------------------------
    Pedram Jazayeri
    ------------------------------