I have a memory allocation problem when I run my model. I am using JNI for 
glpk to write a GUI. I have written my model in MathProg and then from java I 
am calling readmodel(model,data,output) to solve the problem. However when I 
try to press the button which is responsible to run the model, more than once, 
I get a memory allocation error from java. Is there a particular reason? 
My code for the button listener actually looks like that:

String model, data, output, solution, bounds ;
double sol; 
    
    GlpkSolver solver = new GlpkSolver();
    GlpkSolver newprob = new GlpkSolver();
   
     model = "singleperiod.mod";
     data = "datasingle.dat";
     output = "outputsingle.txt";
     solution = "solutionsingle.sol";
     bounds = "boundssingle.txt";
        
        
        newprob = solver.readModel(model,data,output);
        newprob.simplex();
    
        sol = newprob.getObjVal(); 
        newprob.printSensBnds(bounds);
        newprob.printSol(solution);
           
Can anyone help me?

Thanks


_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to