[Top][All Lists]

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

Re: [Help-glpk] Problem importing gnulpk-java files in java project

From: Sana Jawad
Subject: Re: [Help-glpk] Problem importing gnulpk-java files in java project
Date: Thu, 21 Jan 2010 17:22:56 -0800


Than alot Carlos this solved the file include error.

Now I am getting error while reading the model. The return value of readModel function comes out to be null, which throws NULL pointer exception when solver2.simplex() command is run.

I have tried giving the absolute path of mod file as file; but it does not make any difference. However, if I execute this model from lpsolve or gusek, it solves the problem in no time.

Can anyone please tell me that what could be the problem.


On Wed, Jan 20, 2010 at 3:29 AM, Carlos Benavides <address@hidden> wrote:

I think you only need to importor the following:  import org.gnu.glpk.*;


import org.gnu.glpk.*;
import java.util.Properties;

public class glpkjava {

    public static void main(String[] args) {

        GlpkSolver solver = new GlpkSolver();
        GlpkSolver solver2 = solver.readModel("SING1.mod","SING1.dat","SING1.sol");
        solver2.printSol("solucion sing1.txt");



Bye, Carlos

2010/1/20 Sana Jawad <address@hidden>

I have written a model in MathProg. Now I want to integrate it in my java application. I have followed the tutorial for java binding given in the doc folder of glpk-java-1.08. The problem is that in my java application I can only import these three files

import org.gnu.glpk.GlpkSolver;
import org.gnu.glpk.GlpkHookIFC;
import org.gnu.glpk.GlpkSolverKktConditions;

I am unable to import the following files:

import org.gnu.glpk.GLPK;
import org.gnu.glpk.GLPKConstants;
import org.gnu.glpk.SWIGTYPE_p_double;
import org.gnu.glpk.SWIGTYPE_p_int;
import org.gnu.glpk.glp_prob;
import org.gnu.glpk.glp_smcp;

Can anyone please tell me that what could be wrong.


Help-glpk mailing list

Best Regards,
Sana Jawad
Software Engineer
Algrin Technologies

reply via email to

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