[R] R: constrained optimization

Patrick Burns pburns at pburns.seanet.com
Tue Apr 28 09:55:00 CEST 2009


A genetic algorithm would probably be
a pretty good choice for this problem.
It is not in a package, but you can get
the code for the 'genopt' function from
S Poetry on the public domain page of
www.burns-stat.com.

However, I think I understand enough of
the problem to predict that a bespoke
algorithm will be needed.  In which case
the introduction to genetic algorithms on
the Tutorials page may be of use.

Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of "The R Inferno" and "A Guide for the Unwilling S User")

mauede at alice.it wrote:
> Thank you. 
> Unluckily what makes the problem only apparenttly simple (for me) is that we have not differentiable functions and the parameter space is not continuous ... which reduces dramatically the number of choices.
> I would be grateful to chat with anyone who has tackled a similar problem.
> 
> Maura
> 
> -----Messaggio originale-----
> Da: David Winsemius [mailto:dwinsemius at comcast.net]
> Inviato: dom 26/04/2009 6.55
> A: mauede at alice.it
> Cc: r-help at stat.math.ethz.ch
> Oggetto: Re: [R] constrained optimization
>  
> http://search.r-project.org/cgi-bin/namazu.cgi?query=%22constrained+optimization%22&max=100&result=normal&sort=score&idxname=functions&idxname=Rhelp08
> 
> And that is only the help messages from the last two years.'
> 
> 
> 
> On Apr 26, 2009, at 12:00 AM, <mauede at alice.it> wrote:
> 
>> Is there any R package addressing problems of constrained  
>> optimization ?
>> I have the following "apparently" simple problem:
>>
>> Given a set V with fixed cardinality:                        nv
>> Given a set S whose cardinality is a parameter:        nHat
>> Let the cardinality of the intersection S.and.V be:   nHatv
>>
>> The problem consists of maximizing   nHatv/nv  subject to a penalty  
>> if  nHat > nHatv
>>
>> It is allowed and even desirable to make set S contain set V
>>
>> Thank you so much
>>
>>
>> tutti i telefonini TIM!
>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
> 
> 
> 
> 
> 
> tutti i telefonini TIM!
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
>




More information about the R-help mailing list