1

I've seen one can set a time limit, node limit, etc. to stop a Gurobi model optmimization but those are parameters you can only set before running the optimization.

I want to know how to interrupt programatically a optimization without stopping the program calling the model (I'm programming in c#) because I want to try using the suboptimal variable values.

If it's of any use I'm running the model in separate threads than the program GUI.

Ali
  • 56,466
  • 29
  • 168
  • 265
Filraen
  • 25
  • 7

1 Answers1

4

You can call Abort from a callback. See examples/c#/callback_cs.cs for an example.

  • 1
    Thanks! For the record, here's a link to the callback_cs.cs file in the online Gurobi documentation. http://www.gurobi.com/documentation/5.1/example-tour/node81 – Filraen Feb 19 '13 at 21:10