0

I'm trying to find a way to limit the time of execution of MSK_optimize routine. However, browsing through MOSEK docs gives me nothing. I have tried with:

MSK_putnaintparam( task, "MSK_DPAR_OPTIMIZER_MAX_TIME", 1 ); 

and playing with the value on the right, but this does not seem to solve the problem and looks like it does not even affect MOSEK. Setting MSK_DPAR_MIO_MAX_TIME manually is not possible. Other than that, I have found nothing that can influence maximum time MOSEK will run. Any help appreciated.

darxsys
  • 1,560
  • 4
  • 20
  • 34

2 Answers2

1

The function MSK_putnaintparam( task, "MSK_DPAR_OPTIMIZER_MAX_TIME", 1 ); would have returned a proper error code. So if you did not ignore those you would have discovered your mistake.

ErlingMOSEK
  • 391
  • 1
  • 7
0

For anyone that could find this helpful:

The problem is that MSK_DPAR_OPTIMIZER_MAX_TIME is a double and not an integer parameter. After losing a whole day on this, I finally found that putting:

MSK_putnadouparam( task, "MSK_DPAR_OPTIMIZER_MAX_TIME", 1 ); 

does the trick.

darxsys
  • 1,560
  • 4
  • 20
  • 34