[Coin-discuss] Adding constraints to a running problem.

John J Forrest jjforre at us.ibm.com
Thu Apr 6 07:12:12 EDT 2006


Yossi,

If you are just doing continuous LP then conceptually yes.  Something like:

#include "CoinSignal.hpp"
static OsiSolverInterface * currentModel = NULL;

extern "C" {
   static void signal_handler(int whichSignal)
   {
      if (currentModel!=NULL)
       currentModel->setIntParam(OsiMaxNumIteration,0); // stop at next iteration
      return;
   }
}

Then if you set currentModel to your model before solve then on ctrl-c it would stop on maximum iterations.

Then you can do what you want and restart.

John Forrest


                                                                           
             Yossi Shiloach                                                
             <SHILOACH at il.ibm.                                             
             com>                                                       To 
             Sent by:                  coin-discuss at list.coin-or.org       
             coin-discuss-boun                                          cc 
             ces at list.coin-or.                                             
             org                                                   Subject 
                                       [Coin-discuss] Adding constraints   
                                       to a running problem.               
             04/06/06 07:18 AM                                             
                                                                           
                                                                           
             Please respond to                                             
             Discussions about                                             
                open source                                                
               software for                                                
                Operations                                                 
                 Research                                                  
             <coin-discuss at lis                                             
              t.coin-or.org>                                               
                                                                           
                                                                           





Is it possible to pause a running problem and add new constraints and
bounds from a file (in mps or lp format) and then resume the run from the
paused state?

_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss





More information about the Coin-discuss mailing list