[Top][All Lists]

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

[Help-glpk] Memory allocation error

From: at205
Subject: [Help-glpk] Memory allocation error
Date: Thu, 22 Jun 2006 13:29:16 +0100
User-agent: Internet Messaging Program (IMP) 3.2

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 

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);
        sol = newprob.getObjVal(); 
If someone knows Java can you please help me??


reply via email to

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