Hello, Perhaps you must delete the problem instance with a call to a function corresponding to lpx_delete_prob before reading a new model.
Regards Gottfried Lindner Mail: [EMAIL PROTECTED] Besuchen Sie unsere Seite: http://www.informatikfuchs.de/Software/GLPK/LiMath_Optimierung.htm -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Donnerstag, 22. Juni 2006 14:25 To: [email protected] Subject: [Help-glpk] (no subject) 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 _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
