I am writing a Java Gui which allows a user to run the model by pressing
the "run" button and change some parameters. I have written my mode in
MathProg and now I am using JNI for glpk. However I have a problem. After the
user presses "run" a lot times (sometimes more than once) Java gives me this
error:
ufree: ptr ..... memory allocation error
Do you think that it has to do with the solver?
My code for action listener of the button "run" looks like this:
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);
If someone knows Java can you please help me??
Thanks
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk