Decision Optimization

 View Only
  • 1.  Memory Error through multiple optimizations

    Posted 12 days ago
    I am a student and I am currently analyzing an optimization written in Cplex. My plan is to run the optimization through a forloop many times. After each model evaluation everything should be reset, so that the next optimization can be started again, uninfluenced by the previous one. 
    So in the for-loop some input parameters are changed, then the model is generated and solved with opl.generate and solve. At the end of the for-loop I try to close with opl.end, mod.end and all files in which the solution is written with .close. Everything is working if I start the optimization again manually each 9 hours (around 10 optimizations run smoothly in that time). But I would like to have all 100 optimizations run without getting into that memory error. 
    My question is: 
    how can i document well what happens and so what goes wrong? 
    how can I clear the memory throughly between optimizations? 
    alternatively, how can I run multiple optimizations one after the other in an automated way (over 100)?
    Thank you very much for the help!


  • 2.  RE: Memory Error through multiple optimizations

    Posted 11 days ago

    Dear Jo

    Did you consider forking a process for each solve? Uploading... Upload file  
    This would ensure that all system resources are actually freed when the process dies.
    I hope this helps.

    Renaud Dumeur

  • 3.  RE: Memory Error through multiple optimizations

    Posted 4 days ago

    Dear Renaud,

    Thank you a lot for that idea.

    Would it be possible to explain what you mean by forking a process for each solve and how I can find out how to do it?  I tried to look it up, but it is still not clear to me. 

    Thanks :)