-1
$\begingroup$

I want to solve a nonlinear programming problem with the objective function being coded as a recursive function in Matlab. I have tried “fmincon”, but it could not get the solution due to large number of recursive calling. Thus, I wonder if there is any other efficient software/package/toolbox for such kind of problem (especially, large-scale problem) for Matlab. Or, can you give me some suggestions?

Thank you very much.

$\endgroup$
2
  • 3
    $\begingroup$ I suspect that you would be better off asking this on a matlab-specific mailing list or forum. $\endgroup$ Aug 22, 2011 at 12:17
  • 3
    $\begingroup$ @ Bing: as you may have noticed, the MO software does not really allow for threaded discussion as on a blog. So rather than leave comments as "answers", it is better to edit your original question and add extra remarks as updates or edits. $\endgroup$
    – Yemon Choi
    Aug 24, 2011 at 1:35

2 Answers 2

3
$\begingroup$

Hi Bing, without knowing about your objective function it is hard to give an answer. The main problem seems to be the evaluation of your objective function and I don't see how a generic optimizer could solve that.

Maybe you have tried that already but two things that immediately come to my mind are: 1) Can you cast the recursion into a dynamic program? That might speed up things. 2) Another cheap way would be to create a lookup table that stores results of your objective for given input arguments. That way everything only needs to be computed once (because it's in the lookup table afterwards). That should pay of if you think that you recomputing many objective values again and again. In python you could do that with decorators. In matlab I would use a global array.

$\endgroup$
0
$\begingroup$

Thanks Fabee.

The recursive objective function can be roughly described as follows, although the original one is more complicated.

T1(i)=a+sum(T2(k)X(k))-b-T1(i-1), k

where X is the variable vector, a,b,c are constants.

It seems impossible to get the non-recursive form, since I have tried several times.

Do you think the above form of objective function can be casted into dynamic program?

I think the way of using lookup table may be working. But, for large scale problem, the possible number of values is very large. You can't be obtained all the possible values in limited computing time. In fact, I have already used global variables to avoid recomputing of the objective values with the same input.

$\endgroup$
2
  • 2
    $\begingroup$ @Bing: If you want to include additional information, you should edit your question rather than posting an answer. $\endgroup$ Aug 24, 2011 at 2:31
  • $\begingroup$ Bing, unfortunately your notation is not very clear. As you wrote it, it's not clear what that function is you want to resolve for. $\endgroup$
    – fabee
    Aug 26, 2011 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.