Decision Optimization

 View Only
  • 1.  docplex

    Posted 14 days ago
      |   view attached
    Hi
    Why I can not get the solution in my code which is attached?
    solution is 'NonType object'
    Thanks

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

    Attachment(s)

    py
    Optimization v3.1.1.py   8 KB 1 version


  • 2.  RE: docplex

    Posted 13 days ago
    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 11 days ago
    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
    ------------------------------