Time limit for AIMMS PRO Jobs

  • 12 August 2022
  • 3 replies
  • 77 views

Userlevel 5
Badge +7

Recently, someone asked me about time limits for AIMMS PRO Jobs.

You can control the timeout via the timeout argument in pro::delegateToServer. Note that this timeout is in milliseconds.

When thinking about time limits, I usually think about time limit for the solver.
To provide the solver with the opportunity to share the best solution thus far, 
I usually add some minutes to cater for case load, project start, case save etc of the job to the time limit for the AIMMS PRO Job.  
Therefore, my delegate sometimes looks as follows:

if pro::DelegateToServer( 

      ...

      timeout: p_timeLimit * 1.2 * 1000 + 5 * 60 * 1000, ! timelimit for job is in milli seconds.

      ....

)

 

Where p_timeLimit is the time limit in seconds for the solve itself.


3 replies

Badge

Hi @Chris Kuip ,

 

I currently consider a model where the solver time limit is set to 10 minutes. Usually, if I solve this model locally within the AIMMS IDE, I get a solution after a few seconds and the relative gap after 10 minutes is still greater than the defined stopping criterion. Nevertheless, after the interruption due to the reached time limit, I am still able to obtain the best solution found so far. Therefore, this is the behavior I expect when solving the same model with the same data on AIMMS Pro. However, in this case, the session is terminated after 10 minutes and the code following the solve statement is not executed at all. The respective entry in the log file reads:

[INFO] {PRO.AimmsPROSession} Interrupting session due to timeout

The parameter pro::DelegateToServer::timeOut you are referring to is not changed and still takes its default value of 3600000 milliseconds.

 

What is the reason for this beavior and how can I obtain the solution?

 

Best regards

Sebastian

Userlevel 5
Badge +7

Hi Sebastian,

 

Can you share a reproducible example, perhaps by sharing via support@aimms.com?

 

Best regards,

 

Chris.

Badge

Hi Chris,

 

I found the cause of this problem. The AIMMS Pro session was triggered by an API call with another value of pro::DelegateToServer::timeOut (so it had nothing to do with the model itself). Thank you anyway!

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator