[R] Rdonlp2 package question

Ravi Varadhan rvaradhan at jhmi.edu
Fri Sep 4 01:34:02 CEST 2009


Hi Richard,

If not for your condition (d), which imposes nonlinear constraints, you could have used `constrOptim'.  I have written a function called `constrOptim.nl" that can handle nonlinear inequality constraints, and it also improves upon `constrOptim' in a couple of aspects.  Fortunately, you do not have any nonlinear equality constraints, which it does not handle.  If you are interested,  I can share this function with you.

Just curious - how big is H?  How successful were you with Rdonlp2?

Ravi.
____________________________________________________________________

Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvaradhan at jhmi.edu


----- Original Message -----
From: Richard Valliant <rvalliant at survey.umd.edu>
Date: Thursday, September 3, 2009 3:05 pm
Subject: Re: [R] Rdonlp2 package question
To: rvaradhan at jhmi.edu, r-help at r-project.org


> Ravi & list,
>  
>  Here is a simplified example of the type of problem I need to solve.
>  It's a constrained allocation problem of a finite population sample:
>  
>  Decision vars: n[h] , h=1:H,   i.e an H-vector of stratum sample sizes
>  Objective: Min the sum over h=1:H of ( W[h]^2 * S[h]^2 / n[h] )  
>          where W[h] = proportion of pop in stratum h
>                     S[h] = pop standard deviation of some variable Y
>  
>  Constraints: 
>    a) sum over h of n[h] * c[h] <= (total budget); c[h] are costs
>    b) all n[h] <= pop size in stratum h
>    c) all n[h] >= some minimum sample size
>    d) sum over a subset of strata of ( W[h]^2 * S[h]^2 / n[h] ) <= (some
>  bound)
>          require d) for several subsets.
>  
>  So, the Objective is in terms of 1/n[h] and the constraints are in
>  terms of both n[h] and 1/n[h].
>  
>  Will BB do this?
>  
>  Thanks
>  rv
>  
>  Richard Valliant, Ph.D.
>  University of Maryland
>  Joint Program for Survey Methodology
>  1218 Lefrak Hall
>  College Park MD 20742
>  (301)-405-0932
>  FAX: (301) 314-7912
>  
>  
>  >>> Ravi Varadhan <rvaradhan at jhmi.edu> 9/3/2009 2:42:12 PM >>>
>  Hi Richard,
>  
>  Others have written to me about the non-availability of the Rdonlp2
>  package on CRAN and on package author's website.  Some of these emails
>  had expressed the hardships that thay are experiencing because a lot 
> of
>  their codes are dependent upon Rdonlp2.  They had also expressed their
>  frustration at the non-response of the package author. 
>  
>  This is a really bad situation and highlights a (rectifiable) weaknesse
>  of an open-source enterprise such as R.     
>  
>  Your situation brings up an important issue for the R core/community 
> to
>  address.   My guess is that the non-availability of Rdonlp2 is due to
>  GPL licensing issues related to the DONLP2 code that is owned by Peter
>  Spellucci.  I am guessing that the Rdonlp2 package author did not obtain
>  clear permission and GPL licensing from Spellucci before releasing his
>  package.  This is very unfortunate. It should not be allowed to happen
>  in the future.  
>  
>  When I created my BB package to solve high-dimensional optimization
>  problems, I wrote to Marcos Raydan and Ernesto Birgin and got their
>  "blessings" to base my package on their Fortran code, befroe releasing
>  the package.  They even gave me a TPL license (total public license)! 
> ,
>  which means "do whatever you like with it."
>  
>  I am not sure what the best way is to ensure that the user-contributed
>  packages do not have licensing issues associated with them.  But this
>  needs to be done.  
>  
>  Coming back to your specific problem, can you give us more details on
>  your optimization problem?  For example, (a) what is the nature of your
>  objective function?  what sort of constraints do you have
>  (linear/nonlinear, equality/inequality)?  This would help us suggest
>  alternatives to Rdonlp2, if possible.
>  
>  Hope this helps,
>  Ravi.
>  
>  
>  ____________________________________________________________________
>  
>  Ravi Varadhan, Ph.D.
>  Assistant Professor,
>  Division of Geriatric Medicine and Gerontology
>  School of Medicine
>  Johns Hopkins University
>  
>  Ph. (410) 502-2619
>  email: rvaradhan at jhmi.edu 
>  
>  
>  ----- Original Message -----
>  From: Richard Valliant <rvalliant at survey.umd.edu>
>  Date: Thursday, September 3, 2009 11:03 am
>  Subject: [R] Rdonlp2 package question
>  To: r-help at r-project.org 
>  
>  
>  > Previous versions have this question have partially bounced. 
>  >  I apologize if parts of this are showing up multiple times on the
>  >  list.
>  >  Another try ...
>  >   
>  >  There was at one time an R package called Rdonlp2 for solving
>  >  constrained nonlinear programming problems. Both the objective
>  >  function
>  >  and the constraints could be nonlinear in the decision variables.
>  >   
>  >  The package is no longer in the CRAN list. Does anyone know what
>  >  happened to it? At one point a zip file of the package was
>  available
>  >  at
>  >  arumat.net/Rdonlp2/, but now that is missing also. I sent an
>  >  email to the author but received no response.
>  >   
>  >  Are there any alternatives for constrained nonlinear programming
>  >  problems among the active packages? I need something that will
>  solve
>  >  the
>  >  same kinds of problems that, say, Excel Solver will do using the
>  grg2
>  >  algorithm (or something similar).
>  >   
>  >  Thanks
>  >  Richard Valliant
>  >  
>  >  ______________________________________________
>  >  R-help at r-project.org mailing list
>  >  
>  >  PLEASE do read the posting guide 
>  >  and provide commented, minimal, self-contained, reproducible code. 
> 
>




More information about the R-help mailing list