Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Optmizaing a vector of 1-D functions

Subject: Optmizaing a vector of 1-D functions

From: Andrey Orlov

Date: 8 Apr, 2010 17:17:26

Message: 1 of 11

Hello,

I need to maximize a vector of 1D scalar functions (so to get a vector of variables that maximize corresponding elements of this vector of functions). As far as I know /fminbnd/ can only work with scalar functions.

So, what's the possible solution to my problem?

Subject: Optmizaing a vector of 1-D functions

From: us

Date: 8 Apr, 2010 17:36:26

Message: 2 of 11

"Andrey Orlov" <user771-30@freemail.ru> wrote in message <hpl336$p7k$1@fred.mathworks.com>...
> Hello,
>
> I need to maximize a vector of 1D scalar functions (so to get a vector of variables that maximize corresponding elements of this vector of functions). As far as I know /fminbnd/ can only work with scalar functions.
>
> So, what's the possible solution to my problem?

what is a ...vector of 1D scalar functions...
this is all so vague, it makes most CSSMers cry...

us

Subject: Optmizaing a vector of 1-D functions

From: Andrey Orlov

Date: 8 Apr, 2010 17:49:06

Message: 3 of 11

I mean, I've got a vector-function of one variable: F(x) = (f1(x), ..., fn(x))' where x is a real number. My problem is that I need to attain (x1, ..., xn)' where xj is a maximum of fj(x) over some interval (a,b).

Subject: Optmizaing a vector of 1-D functions

From: us

Date: 8 Apr, 2010 18:05:21

Message: 4 of 11

"Andrey Orlov" <user771-30@freemail.ru> wrote in message <hpl4ui$s0u$1@fred.mathworks.com>...
> I mean, I've got a vector-function of one variable: F(x) = (f1(x), ..., fn(x))' where x is a real number. My problem is that I need to attain (x1, ..., xn)' where xj is a maximum of fj(x) over some interval (a,b).

ok...
what about a small example(?)...

us

Subject: Optmizaing a vector of 1-D functions

From: Andrey Orlov

Date: 8 Apr, 2010 18:26:05

Message: 5 of 11

For example, F(x) = (f1(x), f2(x))', f1(x) = x^4 - x^3 + 4, f2(x) = x^8-x^10+x^5+100, (a,b) = (-30,30). I want to avoid using iterations if it's possible.

For my real computation number of those functions fj(x) equals 400....

Subject: Optmizaing a vector of 1-D functions

From: Andrey Orlov

Date: 8 Apr, 2010 18:40:21

Message: 6 of 11

For example, F(x) = (f1(x), f2(x))', f1(x) = x^4 - x^3 + 4, f2(x) = x^8-x^10+x^5+100, (a,b) = (-30,30). I want to avoid using iterations if it's possible.

For my real computation number of those functions fj(x) equals 400....

Subject: Optmizaing a vector of 1-D functions

From: James Allison

Date: 8 Apr, 2010 18:47:47

Message: 7 of 11

This is a multiobjective optimization problem, which cannot be solved
directly by any MATLAB optimization function except gamultiobj. You
either need to aggregate the components of F into a single objective
function (such as least squares, a weighted sum, etc.), or you need to
use a multiobjective optimization technique.

The functions you described are simple enough that you should be able to
derive an analytical solution (assuming your aggregation function is not
too complex) by differentiating and setting to zero (help roots) to find
stationary points. You will probably have more than one zero. Check the
sign of the second derivative to confirm whether you have a minimum or
maximum.

One simpler multiobjective optimization technique is to choose one
function as the objective, and the other(s) as constraints(s). You then
vary the limits of the constraint(s) parametrically and solve each
version of the problem (with something like fmincon, or other
constrained optimization functions if appropriate such as quad prog) to
obtain a set of solutions known as the Pareto set or Pareto front:

http://en.wikipedia.org/wiki/Pareto_efficiency

You can then visualize and explore the tradeoffs present in the
multiobjective optimization problem, and choose a solution that best
meets your needs.

-James


Andrey Orlov wrote:
> For example, F(x) = (f1(x), f2(x))', f1(x) = x^4 - x^3 + 4, f2(x) =
> x^8-x^10+x^5+100, (a,b) = (-30,30). I want to avoid using iterations if
> it's possible.
>
> For my real computation number of those functions fj(x) equals 400....

Subject: Optmizaing a vector of 1-D functions

From: Roger Stafford

Date: 8 Apr, 2010 18:52:09

Message: 8 of 11

"Andrey Orlov" <user771-30@freemail.ru> wrote in message <hpl73t$5u3$1@fred.mathworks.com>...
> For example, F(x) = (f1(x), f2(x))', f1(x) = x^4 - x^3 + 4, f2(x) = x^8-x^10+x^5+100, (a,b) = (-30,30). I want to avoid using iterations if it's possible.
>
> For my real computation number of those functions fj(x) equals 400....

  For each of the functions in your vector, the minimization problem is independent of all others. Just put the whole thing in a for-loop and do each component one at a time. The overhead involved in the for-loop will ordinarily be minuscule as compared to the minimization time. There is such a thing as carrying the "vectorization" craze too far!

  Incidentally, if your functions are all polynomials, there are better ways of minimizing them than using something like 'fminbnd'!

Roger Stafford

Subject: Optmizaing a vector of 1-D functions

From: James Allison

Date: 8 Apr, 2010 19:20:50

Message: 9 of 11

They are independent in the sense that it is possible to evaluate each
function independently, but the functions are coupled through the shared
optimization variable x. If Andrey is seeking a single optimal value of
x for the whole set of objective functions, the tradeoffs between the
objective functions will need to be considered. A value of x that is
best for one function may not be best for another. See my notes about
multi-objective optimization.

-James

Roger Stafford wrote:
> "Andrey Orlov" <user771-30@freemail.ru> wrote in message
> <hpl73t$5u3$1@fred.mathworks.com>...
>> For example, F(x) = (f1(x), f2(x))', f1(x) = x^4 - x^3 + 4, f2(x) =
>> x^8-x^10+x^5+100, (a,b) = (-30,30). I want to avoid using iterations
>> if it's possible.
>>
>> For my real computation number of those functions fj(x) equals 400....
>
> For each of the functions in your vector, the minimization problem is
> independent of all others. Just put the whole thing in a for-loop and
> do each component one at a time. The overhead involved in the for-loop
> will ordinarily be minuscule as compared to the minimization time.
> There is such a thing as carrying the "vectorization" craze too far!
>
> Incidentally, if your functions are all polynomials, there are better
> ways of minimizing them than using something like 'fminbnd'!
>
> Roger Stafford

Subject: Optmizaing a vector of 1-D functions

From: Matt J

Date: 8 Apr, 2010 19:33:09

Message: 10 of 11

James Allison <james.allison@mathworks.com> wrote in message <hplaai$9l$1@fred.mathworks.com>...

> If Andrey is seeking a single optimal value of
> x for the whole set of objective functions, the tradeoffs between the
> objective functions will need to be considered.

True, but he stated that he is not looking for a single optimal value of x.

Subject: Optmizaing a vector of 1-D functions

From: Roger Stafford

Date: 8 Apr, 2010 19:47:07

Message: 11 of 11

James Allison <james.allison@mathworks.com> wrote in message <hplaai$9l$1@fred.mathworks.com>...
> They are independent in the sense that it is possible to evaluate each
> function independently, but the functions are coupled through the shared
> optimization variable x. If Andrey is seeking a single optimal value of
> x for the whole set of objective functions, the tradeoffs between the
> objective functions will need to be considered. A value of x that is
> best for one function may not be best for another. See my notes about
> multi-objective optimization.
>
> -James
---------
  That's not my understanding of Andrey's statement, James. In his second article in this thread he wrote: "I mean, I've got a vector-function of one variable: F(x) = (f1(x), ..., fn(x))' where x is a real number. My problem is that I need to attain (x1, ..., xn)' where xj is a maximum of fj(x) over some interval (a,b)."

  In other words he is *not* "seeking a single optimal value of x for the whole set of objective functions", if we are to accept his statement in the second article. Each of the n optimal values of x is to maximize the corresponding f in his vector of functions.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us