Re: [Help-glpk] glpk 4.50 release information

2020-08-06 Thread Sylvain Fournier
Hi,

Are there some new thoughts about the issue? I don't think this email was
answered after it was sent a few months ago.
Regards,

*Sylvain Fournier*
Operations Research Manager
*48 3239-2428*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]





On Wed, 25 Mar 2020 at 17:44, Sylvain Fournier  wrote:

> Hi Andrew,
>
> How is the attempt to solving the bug I reported? I recently downloaded
> the newest version of GLPK (4.65) and it is still crashing. If it was not
> solved yet, could you please provide me with the fix you had sent at that
> time?
> Thanks!
>
> *Sylvain Fournier*
> Gerente de Pesquisa Operacional
> *48 3239-2428*
> WPLEX Software Ltda.
> Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
> 88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
> wplex.com.br
> [image: WPLEX]
>
>
>
>
>
> On Fri, 24 May 2013 at 12:03, Andrew Makhorin  wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> GLPK 4.50 Release Information
>> *
>>
>> Release date: May 24, 2013
>>
>> GLPK (GNU Linear Programming Kit) is intended for solving large-scale
>> linear programming (LP), mixed integer linear programming (MIP), and
>> other related problems. It is a set of routines written in ANSI C89 and
>> organized as a callable library.
>>
>> In this release:
>>
>> A new version of LU-factorization routines were added.
>> Currently this version provides the same functionality as the
>> old one, however, the new version allows further improving.
>>
>> Old routines for FHV-factorization used to update the basis
>> factorization were replaced by a new version conforming to the
>> new version of LU-factorization.
>>
>> Some clarifications about using the name index routines were
>> added. Thanks to Xypron  for suggestion.
>>
>> Some typos were corrected in the MathProg language reference.
>> Thanks to Jeffrey Kantor  for report.
>>
>> A serious bug (out-of-range indexing error) was *tentatively*
>> fixed in the routine glp_relax4. Unfortunatly, this bug is
>> inherited from the original Fortran version of the RELAX-IV
>> code (for details please see ChangeLog), and since the code is
>> very intricate, the bug is still under investigation. Thanks to
>> Sylvain Fournier for bug report.
>>
>> See GLPK web page at <http://www.gnu.org/software/glpk/glpk.html>.
>>
>> GLPK distribution can be ftp'ed from <ftp://ftp.gnu.org/gnu/glpk/> or
>> from some mirror ftp sites; see <http://www.gnu.org/order/ftp.html>.
>>
>> MD5 check-sum is the following:
>>
>> 0c11cf9d53fe1becfb872f298f309ab2 *glpk-4.50.tar.gz
>>
>> GLPK is also available as a Debian GNU/Linux package. See its web page
>> at <http://packages.debian.org/squeeze/glpk>.
>>
>> Precompiled GLPK binaries (lib, dll, exe) for 32- and 64-bit MS Windows
>> can be downloaded from <http://winglpk.sourceforge.net/>.
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.2.1 (MingW32)
>>
>> iD8DBQFRn3oq0XvyMFmB6BgRAhMaAJ0XfjW2wwhb1wacFybU3QphMJxzZACfYWkg
>> /MRnQXG1NolmXQ8Tk+7TtCo=
>> =0GLz
>> -END PGP SIGNATURE-
>>
>>
>> ___
>> Help-glpk mailing list
>> Help-glpk@gnu.org
>> https://lists.gnu.org/mailman/listinfo/help-glpk
>>
>


Re: [Help-glpk] glpk 4.50 release information

2020-03-25 Thread Sylvain Fournier
Hi Andrew,

How is the attempt to solving the bug I reported? I recently downloaded the
newest version of GLPK (4.65) and it is still crashing. If it was not
solved yet, could you please provide me with the fix you had sent at that
time?
Thanks!

*Sylvain Fournier*
Gerente de Pesquisa Operacional
*48 3239-2428*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]





On Fri, 24 May 2013 at 12:03, Andrew Makhorin  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> GLPK 4.50 Release Information
> *
>
> Release date: May 24, 2013
>
> GLPK (GNU Linear Programming Kit) is intended for solving large-scale
> linear programming (LP), mixed integer linear programming (MIP), and
> other related problems. It is a set of routines written in ANSI C89 and
> organized as a callable library.
>
> In this release:
>
> A new version of LU-factorization routines were added.
> Currently this version provides the same functionality as the
> old one, however, the new version allows further improving.
>
> Old routines for FHV-factorization used to update the basis
> factorization were replaced by a new version conforming to the
> new version of LU-factorization.
>
> Some clarifications about using the name index routines were
> added. Thanks to Xypron  for suggestion.
>
> Some typos were corrected in the MathProg language reference.
> Thanks to Jeffrey Kantor  for report.
>
> A serious bug (out-of-range indexing error) was *tentatively*
> fixed in the routine glp_relax4. Unfortunatly, this bug is
> inherited from the original Fortran version of the RELAX-IV
> code (for details please see ChangeLog), and since the code is
> very intricate, the bug is still under investigation. Thanks to
> Sylvain Fournier for bug report.
>
> See GLPK web page at <http://www.gnu.org/software/glpk/glpk.html>.
>
> GLPK distribution can be ftp'ed from <ftp://ftp.gnu.org/gnu/glpk/> or
> from some mirror ftp sites; see <http://www.gnu.org/order/ftp.html>.
>
> MD5 check-sum is the following:
>
> 0c11cf9d53fe1becfb872f298f309ab2 *glpk-4.50.tar.gz
>
> GLPK is also available as a Debian GNU/Linux package. See its web page
> at <http://packages.debian.org/squeeze/glpk>.
>
> Precompiled GLPK binaries (lib, dll, exe) for 32- and 64-bit MS Windows
> can be downloaded from <http://winglpk.sourceforge.net/>.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.1 (MingW32)
>
> iD8DBQFRn3oq0XvyMFmB6BgRAhMaAJ0XfjW2wwhb1wacFybU3QphMJxzZACfYWkg
> /MRnQXG1NolmXQ8Tk+7TtCo=
> =0GLz
> -END PGP SIGNATURE-
>
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>


Re: [Help-glpk] multi-knapsack?

2017-06-05 Thread Sylvain Fournier
Hi Bjørnar,

You may find some ideas from the number partitioning problem:
https://en.wikipedia.org/wiki/Partition_problem
Regards,

*Sylvain Fournier*

On 26 May 2017 at 01:25, Andrew Makhorin  wrote:

> On Thu, 2017-05-25 at 13:54 +0200, Bjørnar Ness wrote:
> > Hello, glpk
> >
> > I have a problem which I believe could fit under the knapsack
> > umbrealla, but I am not sure,
> > and therefore ask here. The problem is as follows:
> >
> > *) I have a given number of containers
> > *) I have a number of items with different integer properties (weight,
> > volume, smell)
> > *) I want to equally distribute the item properties between the
> containers
> > *) subject to max for each property type/container
> > *) all items must be placed in containers
> >
> > What method should I look after for trying to define/solve this kind of
> problem?
>
> The method depends on the problem formulation used. You may formulate
> your problem as MIP, write it in the GNU MathProg modeling language and
> then use glpsol to solve it with B&B method.
>
> > An example would be nice.
> >
>
> See glpk/examples/bpp.mod .
>
>
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] GLPK for Windows 4.57, GLPK for Java 1.3.0, and GLPK for C#/CLI 1.1.0 released

2015-12-03 Thread Sylvain Fournier
It seems to work fine with this option. Thanks Heinrich!

*Sylvain Fournier*

2015-12-03 15:16 GMT-02:00 Heinrich Schuchardt :

> Hello Sylvain,
>
> ./configure --help
>
> proposes:
>
>   --enable-libpathload GLPK library from java.library.path
>   [[default=no]]
>
> So what you want to do is:
>
> ./configure --enable-libpath
>
> I will not make this switch default to yes because at least Debian
> requires a different layout:
>
> /usr/lib: glpk.so
> /usr/lib/jni: glpk_java.so
> /usr/share/java: glpk-java.jar
>
> Best regards
>
> Heinrich Schuchardt
>
>
> On 03.12.2015 17:13, Sylvain Fournier wrote:
> > Hi Heinrich,
> >
> > No problem, I just asked out of curiosity. It is indeed pretty
> > straightforward to compile the code and build the libraries.
> >
> > Testing a little more, I noted a same kind of behaviour in Linux as the
> > one on Windows I previously reported.
> > I copied both GLPK libraries libglpk_java.so and libglpk.so (using the
> > -L option from the cp command) from the corresponding .libs directories
> > after compilation. I placed them in the same directory and added this
> > directory to the LD_LIBRARY_PATH. It is working all right unless I
> > remove the glpk libraries from the directories where they were compiled
> > (running for example "make clean"). In this case I get the following
> > error when I try to run my program:
> > java.lang.UnsatisfiedLinkError: (...)/libglpk_java.so: libglpk.so.36:
> > cannot open shared object file: No such file or directory
> > at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
> > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
> > at java.lang.Runtime.loadLibrary0(Runtime.java:870)
> > at java.lang.System.loadLibrary(System.java:1122)
> > at org.gnu.glpk.GLPKJNI.(GLPKJNI.java:29)
> > at org.gnu.glpk.GLPKConstants.(GLPKConstants.java:12)
> > The result of command "ldd libglpk_java.so" contains the following
> > line: libglpk.so.36 => not found
> > On the other hand, if the original libraries still exist (before "make
> > clean"), this line gives, instead of "not found", the path to the
> > directory where "libglpk.so.36" (why not "libglpk.so" by the way?) was
> > compiled.
> > To prevent the UnsatisfiedLinkError from occuring without relying on the
> > original libraries, I then have to add a System.loadLibrary("glpk") in
> > Linux before calling the GLPK methods.
> > Did I miss something, such as a compilation parameter that would help
> > me? If not, wouldn't it possible to add (also for Linux)
> > this System.loadLibrary("glpk") before
> > the System.loadLibrary("glpk_java") in glpk.i?
> >
> > I am not sure I was very clear... But I hope you understood anyway!
> > Regards,
> >
> > *Sylvain Fournier*
> >
> > 2015-12-01 10:55 GMT-02:00 Heinrich Schuchardt  > <mailto:xypron.g...@gmx.de>>:
> >
> > Hello Sylvain,
> >
> > Linux libraries are provided by Debian, Ubuntu, Mint. Builing them
> > yourself just requires the standard procedure
> > ./configure
> > make
> > sudo make install
> > sudo ldconfig
> >
> > Hence I do not plan to provide Linux binaries.
> >
> > Best regards
> >
> > Heinrich Schuchardt
> >
> > http://www.xypron.de
> >
> > Am 01.12.15 um 13:42 schrieb Sylvain Fournier
> >
> > > Thanks Heinrich!
> > >
> > > http://sourceforge.net/projects/winglpk/ still contains the old
> > libraries,
> > >
> > > right? I'll test it after the next update and let you know if
> there is any
> > >
> > > problem.
> > >
> > > And what about providing the Linux libraries in the next releases?
> > >
> > >
> > >
> > > *Sylvain Fournier*
> > >
> > >
> > >
> > > 2015-11-30 18:54 GMT-02:00 Heinrich Schuchardt  > <mailto:xypron.g...@gmx.de>>:
> > >
> > >
> > >
> > > > Hello Sylvain,
> > >
> > > >
> > >
> > > > I just released GLPK for Java 1.3.1 which fixes the error.
> > >
> > > >
> > >
> > > > Best regards
> > >
> &

Re: [Help-glpk] GLPK for Windows 4.57, GLPK for Java 1.3.0, and GLPK for C#/CLI 1.1.0 released

2015-12-03 Thread Sylvain Fournier
Hi Heinrich,

No problem, I just asked out of curiosity. It is indeed pretty
straightforward to compile the code and build the libraries.

Testing a little more, I noted a same kind of behaviour in Linux as the one
on Windows I previously reported.
I copied both GLPK libraries libglpk_java.so and libglpk.so (using the -L
option from the cp command) from the corresponding .libs directories after
compilation. I placed them in the same directory and added this directory
to the LD_LIBRARY_PATH. It is working all right unless I remove the glpk
libraries from the directories where they were compiled (running for
example "make clean"). In this case I get the following error when I try to
run my program:
java.lang.UnsatisfiedLinkError: (...)/libglpk_java.so: libglpk.so.36:
cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.gnu.glpk.GLPKJNI.(GLPKJNI.java:29)
at org.gnu.glpk.GLPKConstants.(GLPKConstants.java:12)
The result of command "ldd libglpk_java.so" contains the following
line: libglpk.so.36 => not found
On the other hand, if the original libraries still exist (before "make
clean"), this line gives, instead of "not found", the path to the directory
where "libglpk.so.36" (why not "libglpk.so" by the way?) was compiled.
To prevent the UnsatisfiedLinkError from occuring without relying on the
original libraries, I then have to add a System.loadLibrary("glpk") in
Linux before calling the GLPK methods.
Did I miss something, such as a compilation parameter that would help me?
If not, wouldn't it possible to add (also for Linux)
this System.loadLibrary("glpk") before the System.loadLibrary("glpk_java")
in glpk.i?

I am not sure I was very clear... But I hope you understood anyway!
Regards,

*Sylvain Fournier*

2015-12-01 10:55 GMT-02:00 Heinrich Schuchardt :

> Hello Sylvain,
>
> Linux libraries are provided by Debian, Ubuntu, Mint. Builing them
> yourself just requires the standard procedure
> ./configure
> make
> sudo make install
> sudo ldconfig
>
> Hence I do not plan to provide Linux binaries.
>
> Best regards
>
> Heinrich Schuchardt
>
> http://www.xypron.de
>
> Am 01.12.15 um 13:42 schrieb Sylvain Fournier
>
> > Thanks Heinrich!
> >
> > http://sourceforge.net/projects/winglpk/ still contains the old
> libraries,
> >
> > right? I'll test it after the next update and let you know if there is
> any
> >
> > problem.
> >
> > And what about providing the Linux libraries in the next releases?
> >
> >
> >
> > *Sylvain Fournier*
> >
> >
> >
> > 2015-11-30 18:54 GMT-02:00 Heinrich Schuchardt :
> >
> >
> >
> > > Hello Sylvain,
> >
> > >
> >
> > > I just released GLPK for Java 1.3.1 which fixes the error.
> >
> > >
> >
> > > Best regards
> >
> > >
> >
> > > Heinrich Schuchardt
> >
> > >
> >
> > > On 30.11.2015 19:26, Sylvain Fournier wrote:
> >
> > > > Hi Heinrich,
> >
> > > >
> >
> > > > I recently updated GLPK for Java to version 4.57 and I'd like to
> share
> >
> > > > some considerations I had for the next versions.
> >
> > > >
> >
> > > > First, in my Windows application, I don't install GLPK for Java in
> the
> >
> > > > system but instead I link directly to the .dll libraries provided in
> the
> >
> > > > link you sent. When I try to execute my project, I get an unsatisfied
> >
> > > > link error ("Can't find dependent libraries"), which enforces me to
> load
> >
> > > > the GLPK library in my application using the following command:
> >
> > > > System.loadLibrary("glpk_4_57");
> >
> > > > This line must be changed at each new GLPK version. On the other
> hand,
> >
> > > > in my Linux application, I don't need to load this library: it seems
> >
> > > > that the .so management is more "clever" on Linux and manages to
> >
> > > > automatically link to the right dependent library.
> >
> > > > My suggestion for the next GLPK for Java releases is to add this
> library
> >
> > > > loading, if possible, just before the glpk_4_57_java library loadin

Re: [Help-glpk] GLPK for Windows 4.57, GLPK for Java 1.3.0, and GLPK for C#/CLI 1.1.0 released

2015-12-01 Thread Sylvain Fournier
Thanks Heinrich!
http://sourceforge.net/projects/winglpk/ still contains the old libraries,
right? I'll test it after the next update and let you know if there is any
problem.
And what about providing the Linux libraries in the next releases?

*Sylvain Fournier*

2015-11-30 18:54 GMT-02:00 Heinrich Schuchardt :

> Hello Sylvain,
>
> I just released GLPK for Java 1.3.1 which fixes the error.
>
> Best regards
>
> Heinrich Schuchardt
>
> On 30.11.2015 19:26, Sylvain Fournier wrote:
> > Hi Heinrich,
> >
> > I recently updated GLPK for Java to version 4.57 and I'd like to share
> > some considerations I had for the next versions.
> >
> > First, in my Windows application, I don't install GLPK for Java in the
> > system but instead I link directly to the .dll libraries provided in the
> > link you sent. When I try to execute my project, I get an unsatisfied
> > link error ("Can't find dependent libraries"), which enforces me to load
> > the GLPK library in my application using the following command:
> > System.loadLibrary("glpk_4_57");
> > This line must be changed at each new GLPK version. On the other hand,
> > in my Linux application, I don't need to load this library: it seems
> > that the .so management is more "clever" on Linux and manages to
> > automatically link to the right dependent library.
> > My suggestion for the next GLPK for Java releases is to add this library
> > loading, if possible, just before the glpk_4_57_java library loading in
> > glpk.i. Or did I miss some explanation why it hasn't been done until now?
> >
> > Finally, is there some reason why the Linux libraries (.so) are not
> > provided in any of the releases of GLPK or GLPK for Java? I don't mind
> > compiling the libraries when I have to update GLPK, but then I'd like to
> > understand why the libraries are given for Windows and not for Linux.
> >
> > Regards,
> >
> > *Sylvain Fournier*
> >
> > 2015-11-08 23:27 GMT-02:00 Heinrich Schuchardt  > <mailto:xypron.g...@gmx.de>>:
> >
> > GLPK for Windows 4.57 has been released. It provides 32 and 64 bit
> > binaries for Windows. The project is located at
> > http://winglpk.sourceforge.net .
> >
> > GLPK for Windows 4.57 includes  GLPK for Java 1.3.0 and GLPK for
> C#/CLI
> > 1.1.0.
> >
> > GLPK for Java provides a Java binding for the GLPK library. The
> project
> > is located at http://glpk-java.sourceforge.net .
> >
> > GLPK for C#/CLI provide a Common Language Interface binding for the
> GLPK
> > library it allows to use all programming languages supported by Mono
> and
> > .NET together with GLPK, e.g. C#, Visual Basic .NET, and F#. The
> project
> > is located at http://glpk-cli.sourceforge.net . The Git repository
> is
> > located at https://github.com/xypron/glpk-cli .
> >
> > Best regards
> >
> > Heinrich Schuchardt
> >
> > ___
> > Help-glpk mailing list
> > Help-glpk@gnu.org <mailto:Help-glpk@gnu.org>
> > https://lists.gnu.org/mailman/listinfo/help-glpk
> >
> >
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] GLPK for Windows 4.57, GLPK for Java 1.3.0, and GLPK for C#/CLI 1.1.0 released

2015-11-30 Thread Sylvain Fournier
Hi Heinrich,

I recently updated GLPK for Java to version 4.57 and I'd like to share some
considerations I had for the next versions.

First, in my Windows application, I don't install GLPK for Java in the
system but instead I link directly to the .dll libraries provided in the
link you sent. When I try to execute my project, I get an unsatisfied link
error ("Can't find dependent libraries"), which enforces me to load the
GLPK library in my application using the following command:
System.loadLibrary("glpk_4_57");
This line must be changed at each new GLPK version. On the other hand, in
my Linux application, I don't need to load this library: it seems that the
.so management is more "clever" on Linux and manages to automatically link
to the right dependent library.
My suggestion for the next GLPK for Java releases is to add this library
loading, if possible, just before the glpk_4_57_java library loading in
glpk.i. Or did I miss some explanation why it hasn't been done until now?

Finally, is there some reason why the Linux libraries (.so) are not
provided in any of the releases of GLPK or GLPK for Java? I don't mind
compiling the libraries when I have to update GLPK, but then I'd like to
understand why the libraries are given for Windows and not for Linux.

Regards,

*Sylvain Fournier*

2015-11-08 23:27 GMT-02:00 Heinrich Schuchardt :

> GLPK for Windows 4.57 has been released. It provides 32 and 64 bit
> binaries for Windows. The project is located at
> http://winglpk.sourceforge.net .
>
> GLPK for Windows 4.57 includes  GLPK for Java 1.3.0 and GLPK for C#/CLI
> 1.1.0.
>
> GLPK for Java provides a Java binding for the GLPK library. The project
> is located at http://glpk-java.sourceforge.net .
>
> GLPK for C#/CLI provide a Common Language Interface binding for the GLPK
> library it allows to use all programming languages supported by Mono and
> .NET together with GLPK, e.g. C#, Visual Basic .NET, and F#. The project
> is located at http://glpk-cli.sourceforge.net . The Git repository is
> located at https://github.com/xypron/glpk-cli .
>
> Best regards
>
> Heinrich Schuchardt
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Suggestions to solve the master problem faster in a Branch-and-Price model.

2014-03-24 Thread Sylvain Fournier
Thanks for your answer Andrew.
When I have to remove a basic variable, I fix its bound using the GLP_FX
constant as Heinrich suggested, and when I have to remove a non-basic
constraint, I unbind it using GLP_FR, before removing them from the problem
object in a further iteration where the variable is no more basic or the
constraint becomes basic. I used this logic to obtain the output I sent in
the first e-mail. If I had directly removed from the problem object at
least either one basic variable or one non-basic constraint, the output
would have started at iteration 1 with an objective value of 0.
Note that the infeasibility value of 1995 at the first iteration must be
the cause of the rather high processing time. In this example really a lot
of variables and constraints were removed using the logic I described
(although now I don't know exactly how many).
The other possibility you give is making a variable non-basic (instead of
fixing its bounds) or making a constraint basic (instead of "freeing" its
bounds). Would it make GLPK solve the problem faster? How can it be done?
Is it just setting the status of the given variable/constraint? (but this
would make the basis invalid, wouldn't it?)

*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]



2014-03-22 4:23 GMT-03:00 Andrew Makhorin :

>
> > Now my question is: should I solve the model from scratch in the case
> > I have to remove a lot of variables?
>
> Generally, not.
>
> > Or is there a parameter configuration I should use in my specific
> > case?
> >
>
> Glp_simplex always starts the search from the current basis which is
> provided in glp_prob by means of the statuses of rows and columns. This
> allows to continue the search (re-optimize) efficiently if you obtain an
> optimal basis, change the lp, and then call glp_simplex once again.
> However, in this case you need to make sure that the row/column statuses
> define a "correct" basis--the number of basic auxiliary/structural
> variables should be equal to the number of rows, and the basis matrix
> consisting of columns of basic variables, including unity ones for
> auxiliary variables, should be non-singular. For example, removing an
> active (more precisely, binding) constraint, i.e. a non-basic row, makes
> the basis incorrect. To avoid this you may either remove the row
> "logically" by making it free (unbounded) rather to remove it
> "physically", or make the row basic (non-binding) before removing it by
> changing the row/column statuses in an appropriate way.
>
>
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Suggestions to solve the master problem faster in a Branch-and-Price model.

2014-03-21 Thread Sylvain Fournier
nfeas =  1.248e-14 (3)
*213000: obj =   8.683410100e+04  infeas =  7.097e-15 (3)
*213500: obj =   8.679797445e+04  infeas =  1.796e-14 (3)
*214000: obj =   8.678434306e+04  infeas =  1.350e-14 (3)
*214500: obj =   8.673684483e+04  infeas =  1.628e-14 (3)
*215000: obj =   8.670740559e+04  infeas =  1.143e-14 (3)
*215500: obj =   8.661954412e+04  infeas =  1.289e-14 (3)
*216000: obj =   8.660799217e+04  infeas =  1.677e-14 (3)
*216500: obj =   8.656506517e+04  infeas =  9.777e-15 (3)
*217000: obj =   8.655457175e+04  infeas =  2.034e-14 (3)
*217500: obj =   8.650503085e+04  infeas =  1.224e-14 (3)
*218000: obj =   8.648445437e+04  infeas =  1.825e-14 (3)
*218500: obj =   8.645254391e+04  infeas =  1.875e-14 (3)
*219000: obj =   8.643635972e+04  infeas =  1.703e-14 (3)
*219500: obj =   8.640302368e+04  infeas =  1.183e-14 (3)
*22: obj =   8.639636539e+04  infeas =  1.740e-14 (3)
*220500: obj =   8.637719928e+04  infeas =  1.480e-14 (3)
*221000: obj =   8.636110863e+04  infeas =  1.800e-14 (3)
*221500: obj =   8.632864402e+04  infeas =  1.960e-14 (3)
*222000: obj =   8.630773847e+04  infeas =  2.122e-14 (3)
*222500: obj =   8.628781348e+04  infeas =  1.885e-14 (3)
*223000: obj =   8.628491632e+04  infeas =  1.721e-14 (3)
*223500: obj =   8.626956052e+04  infeas =  1.480e-14 (3)
*224000: obj =   8.626295607e+04  infeas =  3.034e-14 (3)
*224500: obj =   8.625357631e+04  infeas =  1.348e-14 (3)
*225000: obj =   8.625218764e+04  infeas =  1.569e-14 (3)
*225500: obj =   8.624515500e+04  infeas =  1.173e-14 (3)
*225775: obj =   8.624472901e+04  infeas =  1.272e-14 (3)
OPTIMAL SOLUTION FOUND
---

Regards,

*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Gplk and exception handling

2014-03-20 Thread Sylvain Fournier
Hello Heinrich,


Thanks for the explanations.
Best regards,

*Sylvain Fournier*
 Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]



2014-03-19 18:08 GMT-03:00 Heinrich Schuchardt :

> Hello Sylvain,
>
> this is the comment in src/env/env.c:
>
> *  int glp_free_env(void);
> *
> *  DESCRIPTION
> *
> *  The routine glp_free_env frees all resources used by GLPK routines
> *  (memory blocks, etc.) which are currently still in use.
> *
> *  Normally the application program does not need to call this routine,
> *  because GLPK routines always free all unused resources. However, if
> *  the application program even has deleted all problem objects, there
> *  will be several memory blocks still allocated for the library needs.
> *  For some reasons the application program may want GLPK to free this
> *  memory, in which case it should call glp_free_env.
> *
> *  Note that a call to glp_free_env invalidates all problem objects as
> *  if no GLPK routine were called.
>
> On of the aforementioned memory blocks is the environment structure itself
> which is allocated in glp_init_env.
>
> When a program completely ends all assigned memory is freed by the
> operating system.
>
> Best regards
>
> Heinrich Schuchardt
>
>
>
> On 19.03.2014 13:52, Sylvain Fournier wrote:
>
>> Hi,
>>
>> Thanks Heinrich, your comment helped me get rid of a memory leak I had
>> in my application: although it is done correctly in the examples
>> provided with GLPK for Java, I had forgotten to free the array memory
>> using the delete methods. I was only freeing the problem memory using
>> glp_delete_prob().
>> Now is it necessary to call glp_free_env() at the end of the program, or
>> does GLPK take care of it itself in the case it exits without any error?
>> You say that GC doesn't free the memory assigned in the GLPK library but
>> in the examples, I only saw the call to this method in one case using
>> several threads (GmplSwing). Why is it necessary in this case and not in
>> the other examples?
>>
>> *Sylvain Fournier*
>>
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Gplk and exception handling

2014-03-19 Thread Sylvain Fournier
Hi,

Thanks Heinrich, your comment helped me get rid of a memory leak I had in
my application: although it is done correctly in the examples provided with
GLPK for Java, I had forgotten to free the array memory using the delete
methods. I was only freeing the problem memory using glp_delete_prob().
Now is it necessary to call glp_free_env() at the end of the program, or
does GLPK take care of it itself in the case it exits without any error?
You say that GC doesn't free the memory assigned in the GLPK library but in
the examples, I only saw the call to this method in one case using several
threads (GmplSwing). Why is it necessary in this case and not in the other
examples?

*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]



2014-03-18 17:37 GMT-03:00 Heinrich Schuchardt :

> Hello Sylvain,
>
> if an internal error occurs in GLPK for Java it calls glp_free_env()
> before throwing GlpkException. This frees (and invalidates) all memory
> allocated by the GLPK library.
>
> The exception will not free memory allocated by
> - new_doubleArray
> - new_intArray
>
> For these you have to call the delete methods
> - delete_doubleArray
> - delete_intArray.
>
> Garbage collection will neither free said arrays nor any memory assigned
> by the GLPK library.
>
> Best regards
>
> Heinrich Schuchardt
>
>
>
> On 17.03.2014 14:50, Sylvain Fournier wrote:
>
>> Hello Heinrich,
>>
>> Rabih talked about garbage collection. I'd like to know if GLPK for Java
>> handles garbage collection and automatically deletes the problem object
>> in C (either in case of exception or in a normal run) or if it must be
>> done by hand.
>> If GLPK for Java handles garbage collection, could you tell me since
>> which version?
>> Thanks!
>>
>> *Sylvain Fournier*
>>
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Gplk and exception handling

2014-03-17 Thread Sylvain Fournier
Hello Heinrich,

Rabih talked about garbage collection. I'd like to know if GLPK for Java
handles garbage collection and automatically deletes the problem object in
C (either in case of exception or in a normal run) or if it must be done by
hand.
If GLPK for Java handles garbage collection, could you tell me since which
version?
Thanks!

*Sylvain Fournier*
 Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]



2014-03-10 14:29 GMT-03:00 Heinrich Schuchardt :

> Hello Rabih,
>
> please have a look at GLPK for Java to see how a decent wrapping can be
> done.
> http://glpk-Java.sf.net
>
> The error handling is in swig/glpk.i
>
> It makes use of the error hook function.
>
> See also
> http://en.wikibooks.org/wiki/GLPK/Language_Bindings
>
> Best regards
>
> Heinrich Schuchardt
>
> Am 10.03.14 um 18:12 schrieb Rabih Chaar
>
> > Hello all,
> >
> > I have a question concerning glpk and exception handling.
> >
> > I am mainly wrapping glpk to offer its functionalities in an object
> language.
> >
> >
> >
> > The resources like problems are wrapped in objects with a dispose
> method. This is normally called when object is garbaged by gc.
> >
> >
> >
> > Looking at error.c, raising an exception calls the registered hook via
> glp_error_hook, and calls afterward abort and exit. If the hook doesn't
> raise immediately an exception, the runtime will crash via the abort call.
> >
> >
> >
> > Is this behavior deliberate?
> >
> > Why not call abort and leave that to the calling function language to
> decide when to throw?
> >
> >
> >
> > Thanks in advance for your help.
> >
> >
> >
> > Rabih Chaar
> >
> > ___
> >
> > Help-glpk mailing list
> >
> > Help-glpk@gnu.org
> >
> > https://lists.gnu.org/mailman/listinfo/help-glpk
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Fwd: Crash running the RELAX-IV algorithm

2013-04-29 Thread Sylvain Fournier
Hello Heinrich,

Thanks, I'll have a look at this paper.
And what about the constant GLPKConstants.GLP_JAVA_A_RC ?
Regards,

-- 
*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]




2013/4/26 

> Hello Sylvain,
>
> > Do you think there is a way to catch this kind of errors in the Java
>
> http://www.cs.princeton.edu/~appel/papers/safejni.pdf
> describes how the problem might be attacked.
>
> But it seems that SafeJNI has not been developed any further. At least I
> could not find any download.
>
> Best regards
>
> Heinrich Schuchardt
>
> http://www.xypron.de
>
> Am 26.04.13 um 15:34 schrieb Sylvain Fournier
>
> > Hello Heinrich,
> >
> >
> >
> > Do you think there is a way to catch this kind of errors in the Java
> >
> > wrapper in order to prevent the VM from crashing, or is this exception
> >
> > handling linked to the C code?
> >
> > I also noted that even if the new RELAX-IV algorithm is running without
> any
> >
> > error in Java, a GLPK constant may be missing: it would be
> >
> > GLPKConstants.GLP_JAVA_A_RC (the last parameter in the call to
> >
> > glp_mincost_relax4). Without this constant, I am using GLP_JAVA_V_PI but
> I
> >
> > am not sure it is a stable workaround.
> >
> > Regards,
> >
> >
> >
> > --
> >
> > *Sylvain Fournier*
> >
> > Analista de Pesquisa Operacional
> >
> > *48 3239-2423*
> >
> > WPLEX Software Ltda.
> >
> > Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
> >
> > 88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
> >
> > wplex.com.br
> >
> > [image: WPLEX]
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -- Forwarded message --
> >
> > From: Sylvain Fournier 
> >
> > Date: 2013/4/25
> >
> > Subject: Crash running the RELAX-IV algorithm
> >
> > To: help-glpk@gnu.org
> >
> >
> >
> >
> >
> > Hello,
> >
> >
> >
> > I tried to run the new min cost flow algorithm (RELAX-IV) on a problem I
> >
> > have using glpk-java, and the java VM crashes (it doesn't catch the
> error)
> >
> > while the algorithm is processing.
> >
> > Using a regular C program, it also crashes:
> >
> > *** glibc detected *** ./run-relax4: free(): invalid next size (normal):
> >
> > 0x01cfb220 ***
> >
> > It seems to be a memory issue but I am not a C specialist.
> >
> >  I attach my problem in the dimacs format.
> >
> > The same problem runs without any problem using the old okalg, and I
> tried
> >
> > to run RELAX-IV on the sample.min example given in the graph
> documentation,
> >
> > which also works.
> >
> > Please let me know if I am doing something wrong.
> >
> >
> >
> > Regards,
> >
> >
> >
> > --
> >
> > *Sylvain Fournier*
> >
> >  Analista de Pesquisa Operacional
> >
> > *48 3239-2423*
> >
> > WPLEX Software Ltda.
> >
> > Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
> >
> > 88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
> >
> > wplex.com.br
> >
> > [image: WPLEX]
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] GLPK for Windows 4.49, GLPK for Java 1.0.25

2013-04-22 Thread Sylvain Fournier
Thanks Heinrich, I'll wait for the Swig fix.

-- 
*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]




2013/4/22 Heinrich Schuchardt 

> Hello Sylvain,
>
> I have raised the following bug for program Swig used to wrap GLPK:
> https://sourceforge.net/p/**swig/bugs/1320/<https://sourceforge.net/p/swig/bugs/1320/>
>
> When Swig is fixed I will create a new GLPK for Java release.
>
> Best regards
>
> Heinrich Schuchardt
>
>
> On 22.04.2013 20:31, Sylvain Fournier wrote:
>
>> Ok, but then how do I get a glp_arc from a SWIGTYPE_p_glp_arc and
>> vice-versa? (same question for glp_graph) Is there some routine like
>> doubleArray_getitem() or intArray_getitem()? In the MinimumCostFlow.java
>> example, there is no glp_graph or glp_arc object.
>> Thanks,
>>
>>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] GLPK for Windows 4.49, GLPK for Java 1.0.25

2013-04-22 Thread Sylvain Fournier
Ok, but then how do I get a glp_arc from a SWIGTYPE_p_glp_arc and
vice-versa? (same question for glp_graph) Is there some routine like
doubleArray_getitem() or intArray_getitem()? In the MinimumCostFlow.java
example, there is no glp_graph or glp_arc object.
Thanks,

-- 
*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]




2013/4/22 Heinrich Schuchardt 

> Hello Sylvain,
>
> the class is now called glp_arc (not _glp_arc) because the definition in
> glpk-4.49/src/glpk.h was changed (relative to glpk-4.47).
>
> See
> http://glpk-java.sourceforge.**net/apidocs/index.html<http://glpk-java.sourceforge.net/apidocs/index.html>
> for the javadocs.
>
> Best regards
>
> Heinrich Schuchardt
>
>
>
> On 22.04.2013 14:22, Sylvain Fournier wrote:
>
>> Heinrich,
>>
>> I am using the glp_graph routines in Java and I just updated GLPK. I was
>> calling routines such as _glp_arc.getHead().getI() and I'd like to know if
>> there is some way to use the same kind of routines with the updated
>> version. I remember that you had provided a new release for this feature
>> in
>> version 4.47.
>> I look forward to testing the new minimum cost flow algorithm!
>> Cheers,
>>
>>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] GLPK for Windows 4.49, GLPK for Java 1.0.25

2013-04-22 Thread Sylvain Fournier
Heinrich,

I am using the glp_graph routines in Java and I just updated GLPK. I was
calling routines such as _glp_arc.getHead().getI() and I'd like to know if
there is some way to use the same kind of routines with the updated
version. I remember that you had provided a new release for this feature in
version 4.47.
I look forward to testing the new minimum cost flow algorithm!
Cheers,

-- 
*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]




2013/4/16 xypron 

>
> GLPK for Java 1.0.25 has been released. It is available from
> http://glpk-java.sourceforge.net
>
> GLPK for Windows 4.49 has been released. It is available from
> http://winglpk.sourceforge.net
> It includes 32bit and 64bit Windows executables of GLPK 4.49 and GLPK for
> Java 1.0.25.
>
> Best regards
>
> Heinrich Schuchardt
> --
> View this message in context:
> http://old.nabble.com/GLPK-for-Windows-4.49%2C-GLPK-for-Java-1.0.25-tp35303327p35303327.html
> Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.
>
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Building a graph on the fly

2012-04-17 Thread Sylvain Fournier
Ok, thanks Xypron. Then I'll wait for these structures to be ready.

Sylvain

2012/4/17 glpk xypron 

> Hello Sylvain,
>
> glp_arc and glp_vertex both have a field data in which information like
>
> double a_cap; // arc capacity
> double a_cost; // arc cost
> double a_low; // lower bound
> double a_x; // arc flow
>
> int v_cut; // 0: node is unlabelled, 1: node is labelled
> double v_pi; // node potential
> double v_rhs; // supply/demand value
> int v_set; // 0: vertex is in set R, 1: vertex is in set S
>
> is stored.
>
> glpk.h does not provide structures with these fields.
>
> I will have to change the GLPK for Java code to provide these structures
> and the constants needed (length of the data fields, and offsets).
>
> Best regards
>
> Xypron
>
>
> --
> Follow me at http://twitter.com/#!/xypron
>
> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
> Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
>



-- 
*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] [Fwd: Re: Building a graph on the fly]

2012-04-17 Thread Sylvain Fournier
The problem is that I work with Java, and I already use the Java wrapper
included in the distribution to solve my linear programs. And until now, it
is working perfectly.

Sylvain

2012/4/17 Nigel Galloway 

> Is Python any good for you? If so the directory IAJAAR_PY contains some
> examples in the file IAJAAR_PY.xps obtainable:
>
>
> http://sourceforge.net/projects/iajaarh/files/IAJAAR.H.2020-144507.tar.xz/download
>
> No wrapper is needed to interface from Python to glpk graph functions,
> though one might be useful. This document could be used to define the
> wrapper, which probably is needed for Java.
>
> --
>  Nigel Galloway
>  nigel_gallo...@operamail.com
>
>
> On Tue, Apr 17, 2012, at 06:18 PM, Andrew Makhorin wrote:
> >  Forwarded Message 
> > From: Sylvain Fournier 
> > To: Andrew Makhorin 
> > Subject: Re: [Help-glpk] Building a graph on the fly
> > Date: Tue, 17 Apr 2012 10:12:27 -0300
> >
> > Hi Andrew,
> >
> > Thanks for your quick answer. In fact, I am looking for an example in
> > Java, as I can't find how to create a C struct using the Java routines,
> > and how to use the offsetof macro.
> > Does the '_' prefix for the class names _glp_graph, _glp_arc and
> > _glp_vertex (in Java) mean something special? (I guess they are
> > supported, as they can be found in the glpk-java.pdf documentation)
> > Best regards.
> >
> >
> > 2012/4/16 Andrew Makhorin 
> > > I need to solve a minimum cost flow problem in Java, and for
> > this I'd
> > > like to use the Out-Of-Kilter algorithm included in GLPK. I
> > saw there
> > > is a way to build the graph reading the information from a
> > text file
> > > (glp_read_graph), however I wonder whether I can do it on the
> > fly,
> > > using some routines that modify the graph.
> > > I saw I can use for example glp_create_graph,
> > glp_add_vertices,
> > > glp_add_arc. On the other hand, I can't find a way to create
> > or modify
> > > the data associated with a vertex (demand) or an arc
> > (capacity, cost).
> > > I had no success in searching either into the mailing list
> > archives,
> > > or in the files included in the GLPK distribution (examples
> > and
> > > documentation). Did I miss something?
> >
> >
> > Please see the example in Subsection 2.1.5 "Solve minimum-cost
> > flow
> > problem with the out-of-kilter algorithm" of the document "GLPK:
> > Graph
> > and Network Routines" (doc/graph.pdf). You need to define your
> > own
> > structs, one for each node and one for each arc of the network,
> > which
> > include fields to store node supply/demand, arc capacity, etc.
> > When you
> > call glp_mincost_okalg, you specify with the standard offsetof
> > macro
> > where the input data are stored in your structs and to where the
> > routine
> > should store the solution components.
> >
> >
> >
> >
> > --
> > Sylvain Fournier
> > Analista de Pesquisa Operacional
> > 48 3239-2423
> > WPLEX Software Ltda.
> > Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
> > 88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
> > wplex.com.br
> > WPLEX
> >
> >
> >
> >
> > ___
> > Help-glpk mailing list
> > Help-glpk@gnu.org
> > https://lists.gnu.org/mailman/listinfo/help-glpk
>
> --
> http://www.fastmail.fm - Does exactly what it says on the tin
>
>


-- 
*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Building a graph on the fly

2012-04-16 Thread Sylvain Fournier
Hi all,

I need to solve a minimum cost flow problem in Java, and for this I'd like
to use the Out-Of-Kilter algorithm included in GLPK. I saw there is a way
to build the graph reading the information from a text file
(glp_read_graph), however I wonder whether I can do it on the fly, using
some routines that modify the graph.
I saw I can use for example glp_create_graph, glp_add_vertices,
glp_add_arc. On the other hand, I can't find a way to create or modify the
data associated with a vertex (demand) or an arc (capacity, cost). I had no
success in searching either into the mailing list archives, or in the files
included in the GLPK distribution (examples and documentation). Did I miss
something?
Cheers,

-- 
*Sylvain Fournier*
Analista de Pesquisa Operacional
*48 3239-2423*
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
[image: WPLEX]
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Deleting active constraints

2010-05-05 Thread Sylvain Fournier
Hi all!

I am quoting an almost three year-old-e-mail of this list about the deletion
of active constraints in a LP, keeping the current basis in order not to
solve the model from scratch. I used this method in my algorithm (removing
the constraint bounds: GLP_FR), but I don't understand a point: when I solve
the LP again, the first solution (at iteration 0) has a lower objective (all
right) but the value of the infeasibility increases. How is it possible that
the infeasibility increases although I removed a constraint?
I am (still) using the GLPK version 4.38.
Best regards,

Sylvain Fournier

If you delete some active row, i.e. the row, whose auxiliary variable
> is non-basic, the number of rows is decreased by one while the number
> of variables marked as basic remains the same, and the basis becomes
> invalid. Similarly, if you delete some basic structural variable, the
> number of rows remains the same while the number of basic variables
> is decreased by one, so the basis again becomes invalid.
>
> If a row is active, deleting it invalidates the basis as was explained
> above. However, you can attain the same effect by *freeing* the row,
> i.e. by changing its bounds to -inf and +inf, resp., in which case the
> basis remains valid. Analogously, if a column is basic, you can change
> both its bounds to 0, i.e. *fix* the structural variable at zero, rather
> than delete it, in which case the basis again remains valid.
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Thread safety of GLPK

2010-04-15 Thread Sylvain Fournier
Hi,

Thank you Andrew for this feature which will be valuable for me as well!
I am using the java version of glpk, and I am wondering if it has also been
tested with multi-threads. What do I have to change in the java or swig
files in order to be able to take this into account? For example, where do I
have to initialize the environment thread pointer?

Sylvain Fournier

Date: Thu, 15 Apr 2010 14:06:15 +0400
> From: Andrew Makhorin 
> Subject: Re: [Help-glpk] Thread safety of GLPK
> To: "Hammond, Paul" 
> Cc: help-glpk@gnu.org
> Message-ID: <474395093.20100415140...@gnu.org>
> Content-Type: text/plain; charset="us-ascii"
>
> > Thanks for this. If you find your old code, do send it over, we
> > don't mind if it's not the standard release, if it works, we'll
> > consider using it.
>
> Please see the attachment.
>
> You need to replace file glpenv02.c with a reentrant version and then
> build the package as usual. Note that glpsol will not work, because it
> does not create the thread-specific data key used in the reentrant
> version of glpenv02.c. Mtsamp.c is an example program that works.
>
> Hope this helps.
>
> Andrew Makhorin
> -- next part --
> /* glpenv02.c (thread local storage) */
>
> /* (reserved for copyright notice) */
>
> #include 
> #include "glpenv.h"
>
> /* re-enterable POSIX version */
>
> pthread_key_t _glp_pth_key;
> /* must be initialized in the main program */
>
> void tls_set_ptr(void *ptr)
> { pthread_setspecific(_glp_pth_key, ptr);
>  return;
> }
>
> void *tls_get_ptr(void)
> { void *ptr;
>  ptr = pthread_getspecific(_glp_pth_key);
>  return ptr;
> }
>
> /* eof */
> -- next part --
> /* mtsamp.c */
>
> /***
> *  This is an example program which illustrates how to use GLPK API in
> *  multi-threaded application on POSIX platform.
> *
> *  To run this program use the following command:
> *
> * mtsamp.exe mps-file-1 mps-file-2 ... mps-file-n
> *
> *  Each mps file specified in the command line is processed by separate
> *  thread.
> ***/
>
> #include 
> #include 
> #include 
> #include 
>
> void *solve_mps(void *arg)
> { char *fname = arg;
>  glp_prob *P;
>  P = glp_create_prob();
>  if (glp_read_mps(P, GLP_MPS_FILE, NULL, fname) != 0)
>  {  fprintf(stderr, "Cannot read mps file `%s'\n", fname);
> return NULL;
>  }
>  glp_simplex(P, NULL);
>  glp_delete_prob(P);
>  glp_free_env();
>  return NULL;
> }
>
> #define MAX_THREADS 20
>
> extern pthread_key_t _glp_pth_key;
>
> int main(int argc, char *argv[])
> { pthread_t h[1+MAX_THREADS];
>  int t, ret;
>  if (argc < 2)
>  {  fprintf(stderr, "At least one mps file must be specified\n");
> exit(EXIT_FAILURE);
>  }
>  if (argc-1 > MAX_THREADS)
>  {  fprintf(stderr, "Too many mps files\n");
> exit(EXIT_FAILURE);
>  }
>  ret = pthread_key_create(&_glp_pth_key, NULL);
>  if (ret != 0)
>  {  fprintf(stderr, "Unable to create thread-specific key\n");
> exit(EXIT_FAILURE);
>  }
>  for (t = 1; t < argc; t++)
>  {  ret = pthread_create(&h[t], NULL, solve_mps, argv[t]);
> if (ret != 0)
> {  fprintf(stderr, "Unable to create thread for `%s'\n",
>   argv[t]);
>exit(EXIT_FAILURE);
> }
>  }
>  for (t = 1; t < argc; t++)
>  {  ret = pthread_join(h[t], NULL);
> if (ret != 0)
> {  fprintf(stderr, "Waiting failure for thread %d\n", t);
>exit(EXIT_FAILURE);
> }
>  }
>  fprintf(stderr, "GLPK multi-threaded DLL seems to work\n");
>  return 0;
> }
>
> /* eof */
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Re: Help-glpk Digest, Vol 86, Issue 32

2010-01-25 Thread Sylvain Fournier
Thanks Xypron and Andrew for solving my problem! This new error routine will
be a good reason for me to upgrade my GLPK version. :-)

Sylvain

Date: Sun, 24 Jan 2010 07:55:22 +0300
> From: Andrew Makhorin 
> Subject: Re: [Help-glpk] Application crash due to assert in GLPK
> To: xypron 
> Cc: Help-glpk@gnu.org
> Message-ID: <472239281.20100124075...@gnu.org>
> Content-Type: text/plain; charset=us-ascii
>
> > Unfortunately a failed xassert will completely stop the program that
> > called the glpk native library. With the current design it is not
> > possible to catch a Java exception.
>
> > I wonder if it was wise to put an assert here since GLPK should not
> > fail due to a change the system time.
>
> > Hence I suggest Andrew could remove the assert in function x_time.
>
> I replaced the old version of xtime by a new one, which does not call
> xassert. The new version is configurable and attempts to use a native
> time function, for example, gettimeofday on POSIX platforms. I also
> added a new api routine glp_error_hook to install a user-defined hook
> routine called from xerror before the latter calls abort; this feature
> can be used to prevent abnormal termination caused by glpk api.
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Application crash due to assert in GLPK

2010-01-20 Thread Sylvain Fournier
Hi everybody,
I have been using GLPK (version 4.38) for Java for almost one year now. I
just encontered (for the first time, fortunately) an assert that crashed in
GLPK and that killed my whole Java application. This assert is located
glplib10.c, line 109: xassert(xlcmp(env->t_last, t) <= 0);
It seems to be a strange time problem, but I wonder if I can do something to
prevent this error to occur once again in the future.
Am I responsible for this error? Is there a way for me to be sure that I
won't run into the error again? If not, can I catch this type of errors in
my Java application in order to treat it appropriately?
Thanks,

Sylvain Fournier
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] RE: Feature request - option to flush output

2009-09-14 Thread Sylvain Fournier
I don't use GLPK this way. In fact, I am using the Java library inside my
code. And that's why I don't want to redirect the stdout either, because I
have other outputs that may be redirected to other files.
My question was: does there exist a function in the GLPK allowing this
redirection, only for the GLPK routines? I see that there is a routine
glp_term_hook, but I'd like to see an example (in Java) of how to use it in
the case of the Java interface developed by Xypron (
http://winglpk.sourceforge.net/).

2009/9/14 Michael Hennebry 

> On Mon, 14 Sep 2009, Sylvain Fournier wrote:
>
>  Extending the subject, is it possible with GLPK to redirect this output to
>> a
>> file instead of stdout?
>>
>
> glpsol  > file.txt
>
> --
> Michael   henne...@web.cs.ndsu.nodak.edu
> "Pessimist: The glass is half empty.
> Optimist:   The glass is half full.
> Engineer:   The glass is twice as big as it needs to be."
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] RE: Feature request - option to flush output

2009-09-14 Thread Sylvain Fournier
Extending the subject, is it possible with GLPK to redirect this output to a
file instead of stdout?


> Date: Mon, 14 Sep 2009 19:47:20 +0400
> From: "Hart, William E" 
> Subject: RE: [Help-glpk] Feature request - option to flush output
> To: help-glpk@gnu.org
> Message-ID: <467045031.20090914194...@gnu.org>
> Content-Type: text/plain; charset=us-ascii
>
> Excellent!  I see that I _do_ need to update glpk.
>
> --Bill
>
>
> > -Original Message-
> > From: Andrew Makhorin [mailto:m...@gnu.org]
> > Sent: Monday, September 14, 2009 9:16 AM
> > To: Hart, William E
> > Cc: help-glpk@gnu.org
> > Subject: Re: [Help-glpk] Feature request - option to flush output
> >
> > > By default, IO streams are not regularly flushed; they are
> > buffered in
> > > the computer until 'enough' IO has been done (or until the
> > stream is
> > > closed).
> >
> > > I'm piping glpsol through some Python code and this buffering is
> > > creating a noticable delay in my processing.  What I'd like is an
> > > option that enables explicit flushing of glpsol's output.  For
> > > example, after each status line is printed, you might execute:
> >
> > >   flush(stdout)
> >
> > > (or do "cout << flush" in C++).
> >
> > Exactly this feature was added in glpk 4.35:
> >
> >The statement "if (c = '\n') fflush(stdout)" was added to the
> >internal routine xputc to provide "real-time" terminal output.
> >
> > Probably you are using an older version of the package. If
> > so, download the most recent version, which is 4.39.
> >
> > GLPK distribution can be ftp'ed from
> > ftp://ftp.gnu.org/gnu/glpk/ or from some mirror ftp sites;
> > see http://www.gnu.org/order/ftp.html .
> >
> >
> >
> >
>
>
>
>
>
>
>
> --
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-glpk
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Compiling GLPK for Java under Linux

2009-06-24 Thread Sylvain Fournier
For the time being, my branch-and-bound algorithm is not optimal. Anyway, I
won't need an optimal solution (it may be difficult to reach it due to the
size of the problems I am facing).
So even if my branch-and-bound algorithm was correct, as I have to stop the
run before the optimal solution, I may get different final solutions on
Windows and on Linux. But fortunately, this does not occur very often.

2009/6/23 Andrew Makhorin 
>
>
> If your branch-and-price algorithm is correct, it must not depend
> on which *optimal* basic solution is reported by lp solver. Don't you
> expect a particular optimal basis, do you?
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Compiling GLPK for Java under Linux

2009-06-23 Thread Sylvain Fournier
Thanks for the link, from now on I won't expect the same behavior for
Windows and Linux when solving a linear model.
But what about the difference in the number of digits?

2009/6/23 Andrew Makhorin 

> > I am getting back to this subject because I am facing a small
> > problem using GLPK both on Windows and Linux.
> > As I said in my previous e-mail, I managed to compile the library
> > to use GLPK in java for Linux, and it works fine. However, I get a
> > difference when running an instance under Windows on the one hand and
> > on Linux on the other hand: it is the same optimal solution (same
> > primal values for variables), but the basis is different, as well as
> > the dual values of constraints and variables. It is a problem as I
> > need to use these dual values in a Branch-and-Price algorithm to get
> > new columns.
>
> > During my investigation, I saw a difference that might be linked to
> > this behaviour: when printing the solution into a file (using
> > glp_print_sol), the Karush-Kuhn-Tucker optimality conditions (at the
> > end) don #39;t provide exactly the same display. On the one hand
> > (Linux), there are 2 digits for the powers of 10 (ex: 0.00e+00), and
> > on the other hand (Windows), there are 3 (ex: 0.00e+000).
> > Could the problem I am facing be linked to a rounding problem? If
> > so, how can I make the result identical for Windows and Linux?
> > If you need the model for which this problem occurs, feel free to ask.
>
> Please see:
> http://list.coin-or.org/pipermail/coin-discuss/2009-March/003548.html
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Compiling GLPK for Java under Linux

2009-06-23 Thread Sylvain Fournier
Hi,

I am getting back to this subject because I am facing a small problem using
GLPK both on Windows and Linux.
As I said in my previous e-mail, I managed to compile the library to use
GLPK in java for Linux, and it works fine. However, I get a difference when
running an instance under Windows on the one hand and on Linux on the other
hand: it is the same optimal solution (same primal values for variables),
but the basis is different, as well as the dual values of constraints and
variables. It is a problem as I need to use these dual values in a
Branch-and-Price algorithm to get new columns.
During my investigation, I saw a difference that might be linked to this
behaviour: when printing the solution into a file (using glp_print_sol), the
Karush-Kuhn-Tucker optimality conditions (at the end) don't provide exactly
the same display. On the one hand (Linux), there are 2 digits for the powers
of 10 (ex: 0.00e+00), and on the other hand (Windows), there are 3 (ex:
0.00e+000).
Could the problem I am facing be linked to a rounding problem? If so, how
can I make the result identical for Windows and Linux?
If you need the model for which this problem occurs, feel free to ask.

Sylvain

2009/6/1 Sylvain Fournier 

> I just tested it (only the target "all" of the Makefile), and it seems to
> work well. Many thanks Xypron!
> I have to point out that I had to make small changes in the Makefile to
> make it work:
> In the first call to libtool (gcc ... src/java/glpk_wrap.c), I had to add
> "-I$(PREFIX)/include" because I had some errors.
> In the second call of libtool, I got the following error : "/usr/bin/ld:
> cannot find -lgmp"
> So, I removed -lgmp, and it worked! Is this library really necessary? What
> is the use of the other (ltdl)?
>
> Sylvain
>
>
> Date: Sun, 31 May 2009 08:38:39 -0700 (PDT)
>> From: xypron 
>> Subject: [Help-glpk] Compiling GLPK for Java under Linux
>> To: Help-glpk@gnu.org
>> Message-ID: <23804217.p...@talk.nabble.com>
>> Content-Type: text/plain; charset=us-ascii
>>
>>
>> Hello Sylvain
>>
>> Sylvain Fournier wrote:
>> >
>> > I then saw that there is a glpk_4_38_java library available (
>> > http://winglpk.sourceforge.net/),
>> > ... has the glpk_4_38_java.dll also been compiled under
>> > Linux as a .so?
>> >
>> I have created a Makefile and added a source code package
>>
>> https://sourceforge.net/project/downloading.php?group_id=244007&filename=glpk-java-4.38.tar.gz&a=38892371
>> glpk-java-4.38.tar.gz<https://sourceforge.net/project/downloading.php?group_id=244007&filename=glpk-java-4.38.tar.gz&a=38892371%0Aglpk-java-4.38.tar.gz>
>> to the download page of  http://winglpk.sourceforge.net/ GLPK for Windows
>> .
>>
>> Best regards
>>
>> Xypron
>
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Re: Help-glpk Digest, Vol 78, Issue 31

2009-06-01 Thread Sylvain Fournier
I just tested it (only the target "all" of the Makefile), and it seems to
work well. Many thanks Xypron!
I have to point out that I had to make small changes in the Makefile to make
it work:
In the first call to libtool (gcc ... src/java/glpk_wrap.c), I had to add
"-I$(PREFIX)/include" because I had some errors.
In the second call of libtool, I got the following error : "/usr/bin/ld:
cannot find -lgmp"
So, I removed -lgmp, and it worked! Is this library really necessary? What
is the use of the other (ltdl)?

Sylvain

Date: Sun, 31 May 2009 08:38:39 -0700 (PDT)
> From: xypron 
> Subject: [Help-glpk] Compiling GLPK for Java under Linux
> To: Help-glpk@gnu.org
> Message-ID: <23804217.p...@talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hello Sylvain
>
> Sylvain Fournier wrote:
> >
> > I then saw that there is a glpk_4_38_java library available (
> > http://winglpk.sourceforge.net/),
> > ... has the glpk_4_38_java.dll also been compiled under
> > Linux as a .so?
> >
> I have created a Makefile and added a source code package
>
> https://sourceforge.net/project/downloading.php?group_id=244007&filename=glpk-java-4.38.tar.gz&a=38892371
> glpk-java-4.38.tar.gz<https://sourceforge.net/project/downloading.php?group_id=244007&filename=glpk-java-4.38.tar.gz&a=38892371%0Aglpk-java-4.38.tar.gz>
> to the download page of  http://winglpk.sourceforge.net/ GLPK for Windows
> .
>
> Best regards
>
> Xypron
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] GLPK 4.38 for Java under Linux

2009-05-27 Thread Sylvain Fournier
I already thought of this way of getting rid of a variable. But keeping all
the variables in the model, even bounded to 0, won´t slow down the simplex
method? (there may be quite a lot of "removed" variables)

2009/5/27 Andrew Makhorin 

> Rather than to "physically" remove a basic column from the problem
> object with glp_del_cols you can "logically" remove it fixing it at
> zero with glp_set_col_bnds(..., GLP_FX, 0, 0). In this case the basis
> remains valid.
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] GLPK 4.38 for Java under Linux

2009-05-25 Thread Sylvain Fournier
Many thanks Xypron for the way to compile the library. I will try it and get
back to you if something is going wrong.

Sylvain


> Date: Sat, 23 May 2009 10:04:09 -0700 (PDT)
> From: xypron 
> Subject: Re: [Help-glpk] GLPK 4.38 for Java under Linux
> To: Help-glpk@gnu.org
> Message-ID: <23686380.p...@talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hello Sylvain,
>
> Sylvain Fournier wrote:
> >
> > I then saw that there is a glpk_4_38_java library available (
> > http://winglpk.sourceforge.net/), I tried it on Windows and it seems to
> > work
> > fine. But there is a problem of organization in my code, as I use a
> > different Java interface when running on Linux and when running on
> > Windows.
> > So finally, my question on this subject is: is there a Java interface
> > equivalent as the one found at http://winglpk.sourceforge.net/, but for
> > Linux? In other words, has the glpk_4_38_java.dll also been compiled
> under
> > Linux as a .so?
> >
>
> The commands below can be used to create the libraries.
> Currently I am puzzled because the call to GLPK.glp_create_prob() works
> fine, while
> GLPK.glp_mpl_alloc_wksp() fails with
> java: symbol lookup error: /usr/local/lib/libglpk_4_38_java.so: undefined
> symbol: glp_mpl_alloc_wksp
>
> Best regards
>
> Xypron
>
>
> # download and unzip
> wget ftp://ftp.gnu.org/gnu/glpk/glpk-4.38.tar.gz
> tar -xzf glpk-4.38.tar.gz
> wget
>
> http://freefr.dl.sourceforge.net/sourceforge/winglpk/glpsol_dll-4.38-32bit.zip
> unzip -o glpsol_dll-4.38-32bit.zip
>
> # make and install glpk
> cd glpk-4.38
> ./configure --enable-dl --enable-odbc
> sudo make install
>
> # create libraries with swig
> cd swig
> mkdir src
> mkdir src/java
> mkdir java
> mkdir java/org
> mkdir java/org/gnu
> mkdir java/org/gnu/glpk
> swig -c++ -java -package org.gnu.glpk -o src/java/glpk_wrap.c -outdir
> java/org/gnu/glpk glpk.i
> g++ -c -fpic src/java/glpk_wrap.c -I../include
> -I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
> g++ -shared glpk_wrap.o -lglpk -lltdl -lgmp -o libglpk_4_38_java.so
> sudo cp libglpk_4_38_java.so /usr/local/lib
> cd java/org/gnu/glpk
> javac *.java
> cd ../../..
> jar cf glpk.jar *
>
> # make and try example
> cd ../../examples
> javac -cp ../swig/java/glpk.jar GLPKSwig.java
> java --cp ../swig/java/glpk.jar:. GLPKSwig
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] GLPK 4.38 for Java under Linux

2009-05-25 Thread Sylvain Fournier
2009/5/23 Andrew Makhorin 
>
>
> Lpx_warm_up will be replaced by glp_warm_up, which will provide the
> same functionality.
>
>
Thanks for the quick and detailed answer. I will keep using the warm up
functionality, because I don´t really have an idea of which variable(s)
should enter the basis.

Sylvain
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] GLPK 4.38 for Java under Linux

2009-05-22 Thread Sylvain Fournier
Hi,

I have been working with GLPK for 2 or 3 months, and I´d really like to
congratulate all the people that contribute to the development of this
solver.
In fact, I am working with Java, and most of the time under Linux. But I
need to have my code run under Windows as well. As I am not sure there is a
GLPK for Java under Linux delivered with the Gnu release, I use a Java
interface found on the following website: http://bjoern.dapnet.de/glpk/
As this Java interface was written for a version of GLPK rather old (4.8), I
had to modify it for my own purposes and re-compile both the .jar and the
.so, but it was ok on Linux. For the time being, however, I didn´t manage to
compile the .dll on Windows yet (I don´t have enough knowledge in compiling
shared libraries).
I then saw that there is a glpk_4_38_java library available (
http://winglpk.sourceforge.net/), I tried it on Windows and it seems to work
fine. But there is a problem of organization in my code, as I use a
different Java interface when running on Linux and when running on Windows.
So finally, my question on this subject is: is there a Java interface
equivalent as the one found at http://winglpk.sourceforge.net/, but for
Linux? In other words, has the glpk_4_38_java.dll also been compiled under
Linux as a .so?
The question could be also: has the Java interface found at
http://bjoern.dapnet.de/glpk/ been updated by someone for the latest
versions of GLPK?

I have another question about my algorithm. I am using a Branch&Price
scheme. When I add variables, I want to use the basis of the previous run as
the first basis of the current run (I don´t want to solve the model from
scratch each time!) When I delete columns however, it may occur that one of
them was in the basis, that consequently is not valid any more.
Is there a simple way for me to use the same basis in the next run in case
it was not modified, and update this basis in the case it has lost at least
one variable? (I used the warm_up function and I was looking at its return
code, but this function seems to be deprecated on the newest versions.)

If you want more information,  feel free to ask!

Sylvain Fournier



> Date: Sat, 2 May 2009 16:32:01 +0300
> From: Andrew Makhorin 
> Subject: [Help-glpk] glpk 4.38 release information
> To: help-glpk@gnu.org
> Message-ID: <1566961953.20090502163...@gnu.org>
> Content-Type: text/plain; charset=us-ascii
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> GLPK 4.38 -- Release Information
> 
>
> Release date: May 02, 2009
>
> GLPK (GNU Linear Programming Kit) is intended for solving large-scale
> linear programming (LP), mixed integer linear programming (MIP), and
> other related problems. It is a set of routines written in ANSI C and
> organized as a callable library.
>
> In this release:
>
>API routines glp_read_mps and glp_write_mps were improved.
>
>Some improvements were made in the dual simplex routines.
>
>Two external software modules AMD and COLAMD were included in
>the distribution (for more details please see src/amd/README
>and src/colamd/README). Now they are used in the interior-point
>solver to reorder the matrix prior to Cholesky factorization.
>
>API routine glp_ipt_status may return two new statuses due to
>changes in the routine glp_interior. For details please see the
>reference manual included in the distribution.
>
>A minor bug was fixed in the graph/network routines. Thanks to
>Nelson H. F. Beebe  for bug report.
>
> See GLPK web page at <http://www.gnu.org/software/glpk/glpk.html>.
>
> GLPK distribution can be ftp'ed from <ftp://ftp.gnu.org/gnu/glpk/> or
> from some mirror ftp sites; see <http://www.gnu.org/order/ftp.html>.
>
> MD5 check-sum is the following:
>
> 83d4b345800b3f30e4ef570216f94fbe *glpk-4.38.tar.gz
>
> GLPK is also available as a Debian GNU/Linux package. See its web page
> at <http://packages.debian.org/etch/glpk>.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.1 (MingW32)
>
> iD8DBQFJ/Er50XvyMFmB6BgRAvGeAJ9eufhSp7uDEpD/4uo9sRaOaopoRACffwqt
> 6j/ivvCPcPz6kRmN1Dpz+Js=
> =foOY
> -END PGP SIGNATURE-
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Re: Help-glpk Digest, Vol 77, Issue 8

2009-04-07 Thread Sylvain Fournier
The problem is that I am using GLPK on Linux, and I need a .so file rather
than .dll.

Sylvain


>
> Date: Tue, 07 Apr 2009 17:07:07 +0200
> From: Denis Debarbieux 
> Subject: RE : [Help-glpk] Obtain the variables values in a GLPK 4.8
>JavaInterface
> To: help-glpk@gnu.org
> Message-ID: <49db6c1b.60...@ateji.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear Sylvain,
>
> I advise you to use a newer version of GLPK. I use version 4.36 with
> Java and I have no problem.
>
> For example, you can download the archive glpsol_dll-4.37-32bit.zip
> <
> http://sourceforge.net/project/downloading.php?group_id=244007&use_mirror=freefr&filename=glpsol_dll-4.37-32bit.zip&a=15130901
> >
> from the site http://sourceforge.net/projects/winglpk/. It contains the
> *. jar and *. dll files (for windows) you need.
>
> Regards
>
> Denis
>
> --
> Denis Debarbieux
> OptimJ Product Manager
> Ateji
> 14-16 rue Soleillet - BL14 - 75020 Paris
> Tel. (33|0)1-40-33-38-46
> www.ateji.com
>
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] Obtain the variables values in a GLPK 4.8 Java Interface

2009-04-06 Thread Sylvain Fournier
Hello,

I am currently using GLPK with the Java interface developped and made
available in the following website: http://bjoern.dapnet.de/glpk/
When I solve a LP and I want to retrieve the values of the solution (using
getColPrim() and getColDual(), for example), these values (they are of type
double) are always rounded to the lower integer. Yet, the routine
printSol(), that prints the solution into a file, doesn´t approximate these
values. The objective value (accessed by getObjVal()) isn´t approximated
either.

Is there some parameter to customize this rounding? Or do I have to contact
the designer of the Java interface to solve my problem?
I am sorry I cannot provide a piece of code quickly (mine is rather
complex), but I hope you won´t need it to answer my question.

Sylvain
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk