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
------------------------------
Original Message:
Sent: Tue August 02, 2022 05:29 AM
From: Pedram Jazayeri
Subject: docplex
Hi
Why I can not get the solution in my code which is attached?
solution is 'NonType object'
Thanks
------------------------------
Pedram Jazayeri
------------------------------
#DecisionOptimization