Kuifje02 / vrpy

A python framework for solving the VRP and its variants with column generation.
MIT License
179 stars 43 forks source link

How to make sure time limit is not exceeded #23

Closed Kuifje02 closed 4 years ago

Kuifje02 commented 4 years ago

If the colgen procedure searches for variables until the time limit is passed, there is no time left for the final MIP.

https://github.com/Kuifje02/vrpy/commit/f0d5b7b4a0232d363b969cbe7c98ab584475fafb#r39585343

Different possibilities:

torressa commented 4 years ago

Another option could be: solve the last MIP disregarding the time limit. Can't take more than a few seconds, if that..

Kuifje02 commented 4 years ago

Another option could be: solve the last MIP disregarding the time limit. Can't take more than a few seconds, if that..

In this spirit, we could redefine get_remaining_time() as max(remaining time,5) ?

This way, there is always some time left for the last MIP (5 seconds) and all the work done before is not lost, and it is guaranteed that if the real time limit passed, it is "only" 5 extra seconds. Maybe 5 is not the right number.