How to automatically find proper initial values for fmincon?

Viewed 2183

I am trying to minimize a target function with nonlinear constrains. My problem is to conveniently find a proper initial value set for the parameters. Because the initial values must satisfy the nonlinear constrains, too, however, in my objective function, I have more than 1000 data points, resulting in 1000 function values. As a consequence, the initial values I chose usually cannot make my target function get meaningful value at every data point, namely, my objective function gets NaN at some data point, which stops the minimization procedure...

I am curious is there any good way for me to search a proper initial value automatically? (Because I have a bunch of functions to minimize...) Any thoughts and suggestions would be helpful!

For example, my objective function is a function handle like:

      myFUN = @(a,b,theta,u1,u2)function_handle.

the u1 and u2 here need to be put into data.

what I did is like this:

    [para,fval,exitflag1] = fmincon(@(para)myFUN(para(1),para(2),para(3),u1,u2),para_initial,[],[],[],[],lb,ub,@ucon,options1);

my problem is that my initial values sometimes get NaN for certain points of u1/u2 for myFUN.

Now what I am trying to do is to use some other constrains to get meaningful initial values. For example I have an integral function like this:

    conFUN1 = integral(integral(conFUN2,u1,0...1),u2, 0...1) = constant.

I would like to use this constrain to guess some initial values. However, I don't know how to numerically get the integral value with unknown parameters a, b, and theta.

What I'm doing with the integral is like this:

     inner = @(a,b,th,u2)quadgk(@(u1)conFUN2(a,b,th,u1,u2),0.0001,0.9999)

     DBintegral = @(a,b,th)quadgk(@(u2)arrayfun(inner(a,b,th,u2)), 0.0001,0.9999)

and I want to get values for

     DBintegral(1,1,3), 

something like that...

I am not sure whether I explained my problem clearly...

1 Answers
Related