Time limit with Snopt and minos solvers

Hello:

I want to run some tests with Snopt optimizer and I am having trouble setting up an option for the time limit. According to the documentation:

there is a “Time limit” option. Using the syntax “option snopt_options ‘time_limit=1’;” it seems that the solver recognizes the option, but completely ignores it. I guess the problem may be that this option is documented for Snopt 7.7 and AMPL comes with Snopt 7.5.

Any idea of how to control time limit in snopt? In a similar post to this one over 10 years ago it is said that no time limit option seems to be avaliable for Snopt:
https://groups.google.com/g/ampl/c/Zf4IXx6lSM4/m/iRIJPLrYLDUJ

Yet, I am surprised that no progress has been made with such a basic option in over ten years…

Similarly, I would like to set up a time limit for minos solver, but I have not seen any option to do this.

Thanks in advance.
Best regards,
Julio.

1 Like

For SNOPT, to get the time limit to work it’s necessary to set two options. For example:

option snopt_options 'timing_level=3 time_limit=15';

The timing_level option should always be 3, while the time_limit option can be any number of seconds. (Of course, if you want to specify other SNOPT options, they should be added to this string.)

We are running some further tests on SNOPT and MINOS and will get back to you with other findings soon.

1 Like

Thanks a lot Bob, the options for SNOPT work perfectly!

Lets hope you find something similar for MINOS.

All the best,
Julio.