User Tools

Site Tools


solver:how_do_i_automatically_re-submit_a_model_which_failed_due_to_a_solver_license_error

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
solver:how_do_i_automatically_re-submit_a_model_which_failed_due_to_a_solver_license_error [2020/05/19 12:22]
Lutz Westermann
— (current)
Line 1: Line 1:
-====== How do I automatically re-submit a model, which failed due to a solver license error? ====== 
- 
-Q: //I have a batch job consisting of a large number of gams models to be  run, each of these requiring cplex. I am running this on my faculty'​s it system, where we share a number of licenses. ​ It varies a lot how many is available, but sometimes none are  available. This answer is returned to gams, which outputs this and terminates. That is very unfortunate for my application and I would very much prefer if it waits until a license becomes available. So my question is, can some flag be set for either cplex or gams, telling gams to keep trying to find a license?// 
- 
-You can program this into your GAMS program. The GAMS/​CPLEX-link returns with a license error in the [[https://​www.gams.com/​latest/​docs/​UG_GAMSOutput.html#​UG_GAMSOutput_SolverStatus|solver status]]. If this happens, you could put your model to sleep for x seconds and try again: 
-<​code>​ 
-repeat 
-  solve mymodel min z using mip; 
-  if (mymodel.solvestat=7,​ display$sleep(5) 'sleep 5 seconds for Cplex license'​);​ 
-until mymodel.solvestat<>​7;​ 
-</​code>​ 
  
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY solver/how_do_i_automatically_re-submit_a_model_which_failed_due_to_a_solver_license_error.1589883754.txt.gz ยท Last modified: 2020/05/19 12:22 by Lutz Westermann