Re: [R] Non-linearly constrained optimisation

From: Hans W. Borchers <>
Date: Sun, 20 Jul 2008 13:28:00 -0700 (PDT)

Please have a look at the 'Rdonlp2' package at <>. It provides non-linear optinization with nonlinear constraints, so it may be exactly what you are looking for.

Whether this algorithm is powerful enough for your task has to be seen. There are examples on the Web page that will enable a quick start.

You did not give information about the complexity of your task, nor whether you are seeking local or global solutions.

Hans Werner Borchers
ABB Corporate Research

Dear R Users,
I am looking for some guidance on setting up an optimisation in R with non-linear constraints.

Here is my simple problem:
- I have a function h(inputs) whose value I would like to maximise

This means the 'inputs' must not only lie within the bounds specified by the 'upper' and 'lower' bounds, but they must also not take on values such that f(inputs) and g(inputs) take on values outside defined values. h, f and g are all non-linear.

I believe constroptim would work if f and g were linear. Alas, they are not. Is there any other way I can achieve this in R ?

Thanks in advance,

Hans W. Borchers
ABB Corporate Research Germany
View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 20 Jul 2008 - 20:32:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 20 Jul 2008 - 21:32:45 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive