help-glpk
[Top][All Lists]
Advanced

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

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


From: cheddz
Subject: Re: [Help-glpk] Problem importing gnulpk-java files in java project
Date: Fri, 16 Apr 2010 21:58:22 +0400

Hello, 

I am having a problem very similar to the one you had in this post, and was
wondering if you had ever found a solution to this problem. Please feel free
to email me at address@hidden if you found an answer. Thanks so much
for your time.


Sana Jawad wrote:
> 
> Hi,
> 
> 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.
> 
> Thanks,
> Sana
> 
> On Wed, Jan 20, 2010 at 3:29 AM, Carlos Benavides
> <address@hidden>wrote:
> 
>> Hi,
>>
>> I think you only need to importor the following:  import org.gnu.glpk.*;
>>
>> Example:
>>
>> import org.gnu.glpk.*;
>> import java.io.FileInputStream;
>> 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.simplex();
>>
>>         solver2.printSol("solucion sing1.txt");
>>
>>        }
>>
>> }
>>
>> Bye, Carlos
>>
>>
>>
>> 2010/1/20 Sana Jawad <address@hidden>
>>
>>> Hi,
>>>
>>> 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.
>>>
>>> Thanx.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Help-glpk mailing list
>>> address@hidden
>>> http://lists.gnu.org/mailman/listinfo/help-glpk
>>>
>>>
>>
> 
> 
> -- 
> Best Regards,
> Sana Jawad
> Software Engineer
> Algrin Technologies
> www.skedx.com
> 
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-importing-gnulpk-java-files-in-java-project-tp27237652p28269829.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.








reply via email to

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