Re: Glpk and R

2023-03-16 Thread Andrew Makhorin
On Wed, 2023-03-15 at 13:02 +, Ma, Lingjie wrote:
> Hi,  Mr. Mao, 
> 
> I have some quantile regression type portfolio optimization programs
> which needs to call glpk package in R. 
> 
> My question is how to call glpk with R?

please see https://en.wikibooks.org/wiki/GLPK/R



> 
> Thanks,
> 
> Lingjie Ma
> 
> 
> 



Re: [Help-glpk] glpk and R (using SWIG)

2010-06-22 Thread glpk xypron
Hello Nigel,

I suggest you set up a project on www.sourceforge.net.

There you have subversion for your code and you can easily
make binary or source releases.

Furthermore you get webspace for describing your project(s).

If that is too much trouble, I can upload the file
to the GLPK-Java site.

Best regards

Xypron.


 Original-Nachricht 
> Datum: Tue, 22 Jun 2010 14:55:40 +0100
> Betreff: Re: [Help-glpk] glpk and R (using SWIG)
> 
> The bad news is I think these examples are lost to history.
> 
> The good news I have some better ones. Do you think the new wiki is a good
> place for them? Hopefully it will take better care of them than Yahoo did
> the old ones.
> 
> > - Original Message -----
> > Subject: Re: [Help-glpk] glpk and R (using SWIG)
> > Date: Thu, 17 Jun 2010 22:17:04 +0200
> > 
> > 
> > Hello Nigel,
> > 
> > the proposed iajaar.h looks promising.
> > 
> > Unfortunately the referenced download site
> > http://www.geocities.com/nigel_galloway/IAJAAR.zip
> > no longer exists.
> > 
> > Is there an alternative site?
> > 
> > > Do you rely on Java's garbage collector to dispose of these or do
> > > you call glpk's delete function (glp_delete_prob)?
> > Glp_delete_prob() only deletes objecst created by GLPK. GLPK-Java
> > relies on garbage collection for other objects like instances
> > of SWIGTYPE_p_double.
> > 
> > Best regards
> > 
> > Xypron
> > 
> >  Original-Nachricht 
> > > Datum: Thu, 17 Jun 2010 15:56:56 +0100
> > > Betreff: Re: [Help-glpk] glpk and R (using SWIG)
> > 
> > >
> > > I assume you are creating objects in GLPK, like say a constraint
> matrix.
> > > Do you rely on Java's garbage collector to dispose of these or do you
> call
> > > glpk's delete function (glp_delete_prob)? I do the latter. I don't
> recall
> > > ever noticing R's garbage collector.
> > >
> > > So don't use carrays. I use iajaar or sparse matrix from coin. See:
> > > http://www.mail-archive.com/help-glpk@gnu.org/msg02581.html
> > >
> > > I always think that writing ia[x] = etc; ja[x] = etc; ar[x] = etc; is
> > > tedious. GLPK should have an add triplet function. Until then use
> iajaar.
> > >
> > > > - Original Message -
> > > > From: Xypron 
> > > > To: Nigel Galloway 
> > > > Cc: "Eagle, Ken" , help-glpk@gnu.org
> > > > Subject: Re: [Help-glpk] glpk and R (using SWIG)
> > > > Date: Wed, 16 Jun 2010 00:36:54 +0200
> > > > > > Hello Nigel,
> > > > > the SWIG documentation on
> > > > http://www.swig.org/Doc1.3/R.html
> > > > says:
> > > > > Currently the following features are not implemented or broken:
> > > > * Garbage collection of created objects
> > > > * C Array wrappings
> > > > > Some sort of array wrapping is needed for using GLPK.
> > > > > Best regards
> > > > > Xypron
> > > > > Nigel Galloway wrote:
> > > > > The benefits (and drawbacks of SWIG) have been widely 
> > > discussed. > > Using the swig interface files discussed it is 
> > > possible to > > produce wrappers for all glpk api in R, and add a 
> > > few usful > > features.
> > > > >

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

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


Re: [Help-glpk] glpk and R (using SWIG)

2010-06-22 Thread Nigel Galloway

The bad news is I think these examples are lost to history.

The good news I have some better ones. Do you think the new wiki is a good 
place for them? Hopefully it will take better care of them than Yahoo did the 
old ones.

> - Original Message -
> From: "glpk xypron" 
> To: "Nigel Galloway" 
> Cc: help-glpk@gnu.org, eag...@consolidated.net
> Subject: Re: [Help-glpk] glpk and R (using SWIG)
> Date: Thu, 17 Jun 2010 22:17:04 +0200
> 
> 
> Hello Nigel,
> 
> the proposed iajaar.h looks promising.
> 
> Unfortunately the referenced download site
> http://www.geocities.com/nigel_galloway/IAJAAR.zip
> no longer exists.
> 
> Is there an alternative site?
> 
> > Do you rely on Java's garbage collector to dispose of these or do
> > you call glpk's delete function (glp_delete_prob)?
> Glp_delete_prob() only deletes objecst created by GLPK. GLPK-Java
> relies on garbage collection for other objects like instances
> of SWIGTYPE_p_double.
> 
> Best regards
> 
> Xypron
> 
>  Original-Nachricht 
> > Datum: Thu, 17 Jun 2010 15:56:56 +0100
> > Betreff: Re: [Help-glpk] glpk and R (using SWIG)
> 
> >
> > I assume you are creating objects in GLPK, like say a constraint matrix.
> > Do you rely on Java's garbage collector to dispose of these or do you call
> > glpk's delete function (glp_delete_prob)? I do the latter. I don't recall
> > ever noticing R's garbage collector.
> >
> > So don't use carrays. I use iajaar or sparse matrix from coin. See:
> > http://www.mail-archive.com/help-glpk@gnu.org/msg02581.html
> >
> > I always think that writing ia[x] = etc; ja[x] = etc; ar[x] = etc; is
> > tedious. GLPK should have an add triplet function. Until then use iajaar.
> >
> > > - Original Message -
> > > From: Xypron 
> > > To: Nigel Galloway 
> > > Cc: "Eagle, Ken" , help-glpk@gnu.org
> > > Subject: Re: [Help-glpk] glpk and R (using SWIG)
> > > Date: Wed, 16 Jun 2010 00:36:54 +0200
> > > > > Hello Nigel,
> > > > the SWIG documentation on
> > > http://www.swig.org/Doc1.3/R.html
> > > says:
> > > > Currently the following features are not implemented or broken:
> > > * Garbage collection of created objects
> > > * C Array wrappings
> > > > Some sort of array wrapping is needed for using GLPK.
> > > > Best regards
> > > > Xypron
> > > > Nigel Galloway wrote:
> > > > The benefits (and drawbacks of SWIG) have been widely 
> > discussed. > > Using the swig interface files discussed it is 
> > possible to > > produce wrappers for all glpk api in R, and add a 
> > few usful > > features.
> > > >
> >
> > >
> >
> >
> > -- ___
> > Surf the Web in a faster, safer and easier way:
> > Download Opera 9 at http://www.opera.com
> 
> --
> GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
> Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl

>


-- 
___
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com


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


Re: [Help-glpk] glpk and R (using SWIG)

2010-06-17 Thread glpk xypron
Hello Nigel,

the proposed iajaar.h looks promising.

Unfortunately the referenced download site
http://www.geocities.com/nigel_galloway/IAJAAR.zip
no longer exists.

Is there an alternative site?

> Do you rely on Java's garbage collector to dispose of these or do
> you call glpk's delete function (glp_delete_prob)?
Glp_delete_prob() only deletes objecst created by GLPK. GLPK-Java
relies on garbage collection for other objects like instances
of SWIGTYPE_p_double.

Best regards

Xypron

 Original-Nachricht 
> Datum: Thu, 17 Jun 2010 15:56:56 +0100
> Betreff: Re: [Help-glpk] glpk and R (using SWIG)

> 
> I assume you are creating objects in GLPK, like say a constraint matrix.
> Do you rely on Java's garbage collector to dispose of these or do you call
> glpk's delete function (glp_delete_prob)? I do the latter. I don't recall
> ever noticing R's garbage collector.
> 
> So don't use carrays. I use iajaar or sparse matrix from coin. See:
> http://www.mail-archive.com/help-glpk@gnu.org/msg02581.html
> 
> I always think that writing ia[x] = etc; ja[x] = etc; ar[x] = etc; is
> tedious. GLPK should have an add triplet function. Until then use iajaar.
> 
> > - Original Message -
> > From: Xypron 
> > To: Nigel Galloway 
> > Cc: "Eagle, Ken" , help-glpk@gnu.org
> > Subject: Re: [Help-glpk] glpk and R (using SWIG)
> > Date: Wed, 16 Jun 2010 00:36:54 +0200
> > 
> > 
> > Hello Nigel,
> > 
> > the SWIG documentation on
> > http://www.swig.org/Doc1.3/R.html
> > says:
> > 
> > Currently the following features are not implemented or broken:
> > * Garbage collection of created objects
> > * C Array wrappings
> > 
> > Some sort of array wrapping is needed for using GLPK.
> > 
> > Best regards
> > 
> > Xypron
> > 
> > Nigel Galloway wrote:
> > > The benefits (and drawbacks of SWIG) have been widely discussed. 
> > > Using the swig interface files discussed it is possible to 
> > > produce wrappers for all glpk api in R, and add a few usful 
> > > features.
> > >
> 
> >
> 
> 
> -- 
> ___
> Surf the Web in a faster, safer and easier way:
> Download Opera 9 at http://www.opera.com

-- 
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.  
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl

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


Re: [Help-glpk] glpk and R (using SWIG)

2010-06-17 Thread Nigel Galloway

I assume you are creating objects in GLPK, like say a constraint matrix. Do you 
rely on Java's garbage collector to dispose of these or do you call glpk's 
delete function (glp_delete_prob)? I do the latter. I don't recall ever 
noticing R's garbage collector.

So don't use carrays. I use iajaar or sparse matrix from coin. See:
http://www.mail-archive.com/help-glpk@gnu.org/msg02581.html

I always think that writing ia[x] = etc; ja[x] = etc; ar[x] = etc; is tedious. 
GLPK should have an add triplet function. Until then use iajaar.

> - Original Message -
> From: Xypron 
> To: Nigel Galloway 
> Cc: "Eagle, Ken" , help-glpk@gnu.org
> Subject: Re: [Help-glpk] glpk and R (using SWIG)
> Date: Wed, 16 Jun 2010 00:36:54 +0200
> 
> 
> Hello Nigel,
> 
> the SWIG documentation on
> http://www.swig.org/Doc1.3/R.html
> says:
> 
> Currently the following features are not implemented or broken:
> * Garbage collection of created objects
> * C Array wrappings
> 
> Some sort of array wrapping is needed for using GLPK.
> 
> Best regards
> 
> Xypron
> 
> Nigel Galloway wrote:
> > The benefits (and drawbacks of SWIG) have been widely discussed. 
> > Using the swig interface files discussed it is possible to 
> > produce wrappers for all glpk api in R, and add a few usful 
> > features.
> >

>


-- 
___
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com


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


Re: [Help-glpk] glpk and R (using SWIG)

2010-06-15 Thread Xypron

Hello Nigel,

the SWIG documentation on
http://www.swig.org/Doc1.3/R.html
says:

Currently the following features are not implemented or broken:
* Garbage collection of created objects
* C Array wrappings

Some sort of array wrapping is needed for using GLPK.

Best regards

Xypron

Nigel Galloway wrote:

The benefits (and drawbacks of SWIG) have been widely discussed. Using the swig 
interface files discussed it is possible to produce wrappers for all glpk api 
in R, and add a few usful features.
   



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


Re: [Help-glpk] glpk and R (using SWIG)

2010-05-19 Thread Nigel Galloway

The benefits (and drawbacks of SWIG) have been widely discussed. Using the swig 
interface files discussed it is possible to produce wrappers for all glpk api 
in R, and add a few usful features.

> - Original Message -
> From: "Eagle, Ken" 
> To: "glpk xypron" , help-glpk@gnu.org
> Subject: Re: [Help-glpk] glpk and R
> Date: Tue, 18 May 2010 23:30:03 -0400 (EDT)
> 
> 
> Hi Xypron.  I don't think Rglpk accesses the broad glpk API; it can 
> simply read
> problem description files and pass the specified problem to the glpk solver.
> 
> Ken
> 
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-glpk

>


-- 
___
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com


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


Re: [Help-glpk] glpk and R

2010-05-18 Thread Eagle, Ken
Hi Xypron.  I don't think Rglpk accesses the broad glpk API; it can simply read 
problem description files and pass the specified problem to the glpk solver.

Ken

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


Re: [Help-glpk] glpk and R

2010-05-18 Thread glpk xypron
Hello Ken,

have a look at
ftp://cran.r-project.org/pub/R/contrib/main/Rglpk_0.3-5.tar.gz

The changelog says
UPDATED: Rglpk now includes GLPK version 4.42

Best regards

Xypron

 Original-Nachricht 
> Datum: Tue, 18 May 2010 10:00:08 -0500
> Betreff: [Help-glpk] glpk and R

> I have been working with glpk accessed from R.  Originally I was  
> using the “glpk” R package in order to use the various API routines,  
> but eventually realized that this port is of glpk version 4.8 from  
> 2006.  To support my own work, I have updated the port to hook up  
> with version 4.43.
> 
> I have developed the interface routines to support roughly half of  
> the glpk API, and expect that I can extend this to cover the full API  
> without too much additional effort.  I would be happy to release the  
> suite as a new R package.  My questions for this forum are;
> 
> :  Are you aware of anyone else doing this (no need for two updates;   
> note that the developers of the prior R package apparently are not  
> working on an update)?
> 
> :  Is there a sense that there is some customer demand for this product?
> 
> Regards,
> Ken Eagle
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-glpk

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

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


[Help-glpk] glpk and R

2010-05-18 Thread family
I have been working with glpk accessed from R.  Originally I was  
using the “glpk” R package in order to use the various API routines,  
but eventually realized that this port is of glpk version 4.8 from  
2006.  To support my own work, I have updated the port to hook up  
with version 4.43.


I have developed the interface routines to support roughly half of  
the glpk API, and expect that I can extend this to cover the full API  
without too much additional effort.  I would be happy to release the  
suite as a new R package.  My questions for this forum are;


:  Are you aware of anyone else doing this (no need for two updates;   
note that the developers of the prior R package apparently are not  
working on an update)?


:  Is there a sense that there is some customer demand for this product?

Regards,
Ken Eagle
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk