When running the cplex model, I noticed that the CPLEX repeats the same gap value several times. I ask if there is a parameter in docplex that limits the number of iterations without improvements or just stop it after obtaining n times the same value on the gap.
Please read the relevant manuals. I am not aware of any such functionality and a search of named parameters in the documentation yields no results either.
However this page goes into details how to get the information you want and also documents in an example how to stop it from this callback based on this information using the C Interface.