help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Help-glpk] (no subject)


From: Gottfried Lindner
Subject: RE: [Help-glpk] (no subject)
Date: Thu, 22 Jun 2006 15:11:39 +0200

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: address@hidden
Besuchen Sie unsere Seite:
http://www.informatikfuchs.de/Software/GLPK/LiMath_Optimierung.htm


-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
address@hidden
Sent: Donnerstag, 22. Juni 2006 14:25
To: address@hidden
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
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk






reply via email to

[Prev in Thread] Current Thread [Next in Thread]