[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] (no subject)
From: |
at205 |
Subject: |
[Help-glpk] (no subject) |
Date: |
Thu, 22 Jun 2006 13:25:07 +0100 |
User-agent: |
Internet Messaging Program (IMP) 3.2 |
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