Originally posted by: JPRyan
I'm running a fairly complicated but low variable number Piecewise-linear AdvModel with a quadratic term. I need to run thousands of these quick optimizations. Normally they take around 3 hundreths of a second, but very occasionally (~1/10000 optimizations) the solve call can take 20 minutes or even hang indefinitely churning away. I know it is still the CPlex solver running as it is the only multi-threading program on the test computer and it is driving all four cores.
I'd like to implement a time limit and when it times out check the inputs to see why this is happening. I tried the below but it doesn't seem to stop CPlex from churning well beyond 20 seconds on these rare occasions.
mdl = AdvModel()
mdl.parameters.timelimit = 20 #Seconds I believe....
I even tried implemented a quick decorator around the wrapping function to check that the AdvModel is running after beyond its time limit and I'm pretty sure it is. Am I implementing the timelimit incorrectly?
Ryan
#CPLEXOptimizers#DecisionOptimization