On Wed, 28 Dec 2011, Ruben Proano wrote:
I have been using GLPK as an API to solve a MIP problem coded in C++. The model and glpk work well, but when the branch and cut tree is too large and it exceeds the memory I allocated in the callback function, the program halts. How can I change the call back function so that instead of halting the program, it list the best solution it has found so far and continues running. I really appreciate your help,
I doubt that it can be done just by changing your callbacks. You can probably get away with small alterations to the memory allocation system. In xmalloc, change the behaviour when malloc returns null. You might need otherwise gratuitous globals to do what you want. To continue at all, you will need to get the memory from somewhere. Near the beginning of your code, use malloc to provide a reserve. Set a flag when xmalloc dips into the reserve. -- Michael [email protected] "On Monday, I'm gonna have to tell my kindergarten class, whom I teach not to run with scissors, that my fiance ran me through with a broadsword." -- Lily _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
