[Osi] copying a linear program

John Perry john.perry at usm.edu
Fri Dec 9 10:38:07 EST 2011


Hi

My apologies if I've sent this to the wrong list; let me know if so.

I want copy a linear program many times (several hundred). An examination of 
the source code suggests that this is the right approach:

#include "include/coin/OsiCbcSolverInterface.hpp"

int main() {
  OsiCbcSolverInterface * si = new OsiCbcSolverInterface(NULL);
  
  for (int i = 0; i < 13; i++) {
    si = new OsiCbcSolverInterface(si);
  }
  
  while (true) {}
}

but even this empty linear program causes exponential memory consumption. Am I 
going about this the wrong way, or is it a bug?

(I looked at the source and couldn't find anything obviously wrong, but I'm 
not accustomed to C++.)

regards
john perry

-- 
John Perry
Associate Professor
Department of Mathematics, Box 5045
University of Southern Mississippi
Hattiesburg MS 39406
john.perry at usm.edu

Let me seek you in desiring you, let me desire you in seeking you, let me find 
you in loving you, let me love you in finding you. - Anselm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20111209/471b4b24/attachment.html>


More information about the Osi mailing list