[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Many variables - GLPK Java
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] Many variables - GLPK Java |
Date: |
Sun, 13 Jun 2010 07:47:42 +0200 |
Hello Fábio,
method enablePrints does not exist in the package libglpk-java.
There is such a method in a Java binding that was published on
bjoern.dapnet.de. This library was created for GLPK 4.8 and
has not seen any updates since then.
With libglpk_java 1.0.1 and GLPK 4.38 you can use
GLPK.glp_term_out(GLPKConstants.GLP_OFF);
to disable output.
Use the following command for loading the JNI libary:
System.loadLibrary("glpk_java");
The commands needed for compiling and executing (test.java) are:
javac -classpath /usr/share/java/glpk-java-4.38.jar test.java
java -classpath /usr/share/java/glpk-java-4.38.jar:. test marbles.mod
Consider upgrading to GLPK 4.44 and GLPK-Java 1.0.14.
Compared to 1.0.1 GLPK-Java 1.0.14 offers:
- error handling of glpk library errors as Java exception
- callbacks to control the MIP solution process
- documentation
The home of the GLPK-Java project is
http://glpk-java.sourceforge.net
You can uninstall GLPK 4.38 and GLPK-Java 1.0.1 with
sudo apt-get remove glpk-doc glpk-utils libglpk-dev libglpk0
You can download the current distribution sources with
wget ftp://ftp.gnu.org/gnu/glpk/glpk-4.44.tar.gz
wget
http://downloads.sourceforge.net/project/glpk-java/glpk-java/glpk-java-1.0.14/glpk-java-1.0.14.tar.gz
Unzip the files with
tar -xzf glpk-4.44.tar.gz
tar -xzf glpk-java-1.0.14.tar.gz
and follow the installation instructions provided.
An example for error handling is given in
glpk-java-1.0.14/examples/java/ErrorDemo.java
> *version of the JRE*
> I have many packages installed, I did not know which would work
You can find out the java version you are using with
javac -version
java -version
You can choose the Java version you want to use with
sudo galternatives
(The package is also called galternatives.)
Galternatives will make the necessary changes to symbolic links
in /etc/alternatives.
Best regards
Xypron
-------- Original-Nachricht --------
> Datum: Sat, 12 Jun 2010 16:12:28 -0300
> Betreff: Re: [Help-glpk] Many variables - GLPK Java
> *
> I send an example attached
>
> *
> *Are you working on a 32bit or a 64bit system?*
> 32bit system
>
> *version of the JRE*
> I have many packages installed, I did not know which would work
> default-jre 1.6-34
> openjdk-6-jre 6b18-1.8-0ubuntu1
> sun-java-6-jre 6b18-1.8-0ubuntu1
>
> *version of GLPK-Java (current version is 1.0.14)*
> GLPK 1.0.1-1.1
>
> *version of GLPK (current version is 4.44)*
> *
> GLPK 4.38-1ubuntu1
>
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01