Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: fmincon + interior point algorithm + memory problems
Replies: 9   Last Post: Dec 5, 2012 1:00 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Saad

Posts: 23
Registered: 11/26/12
Re: fmincon + interior point algorithm + memory problems
Posted: Dec 5, 2012 5:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Alan_Weiss <aweiss@mathworks.com> wrote in message <k9li2i$bjj$1@newscl01ah.mathworks.com>...
> On 12/4/2012 1:32 PM, Saad wrote:
> > Alan_Weiss <aweiss@mathworks.com> wrote in message
> > <k9kv0r$o2t$1@newscl01ah.mathworks.com>...

> >> On 12/4/2012 8:35 AM, Saad wrote:
> >> > Dear All,
> >> > I keep receiving this error message when implementing an

> >> optimization > with fmincon (interior point algorithm). I seems that
> >> it is a memory > problem, any clue of how to fix this one please?

> >> >
> >> > ??? Error using ==> ldl
> >> > Out of memory. Type HELP MEMORY for your options.
> >> >
> >> > Here is my code:
> >> >
> >> > beq = [ 1 const1 const2]' ;
> >> > months={'Jan', 'Feb', ...,'Dec'};
> >> > for i=1997
> >> >
> >> > for j=1:length(months)
> >> > w0=xlsread(P:\excelfile.xls ,'Begin','S5:S5000');
> >> > a1=xlsread(['P:\excelfile.xls,'Begin','H5:H5000');
> >> > a2=xlsread(['P:\excel file.xls'],'Begin','Z5:Z5000');
> >> > a = [a1, a2];
> >> > n = size(a,1) ; Aeq = >

> >> vertcat(ones(1,n),a') ; lb = zeros(n,1) ; H = > eye(n)
> >> ; [w,fval, exitflag] = >
> >> fmincon(@(x)norm(H*x-w0)^2,w0,[],[],Aeq,beq,lb,[],[],options);

> >> > end
> >> > end
> >> >
> >> > Any guidance or advice is much appreciated. Regards
> >> >
> >> > Saad

> >>
> >> It is possible that you need to use a memory-saving Hessian. Try
> >> setting the option Hessian to 'lbfgs'. See
> >> http://www.mathworks.com/help/optim/ug/fmincon.html#f186882
> >>
> >> Alan Weiss
> >> MATLAB mathematical toolbox documentation

> >
> > Hi Alan
> >
> > Thanks a lot for your reply. I did try what you suggested:
> > 'Hessian','lbfgs' with the fmincon and this time it works but when I
> > check the optimized variables they all have the same value. Don't get
> > me wrong I am not an expert in optimization, but it is weird to have
> > the same value for the optimized variables? Shall I relax the
> > tolerance? or do you think that it may be a problem inherent to my
> > optimization function?
> >
> > Thank you
> >
> > With Regards
> >
> > S

>
> I don't know what your data files contain, and I don't understand how
> your loops change the optimization results, but I bet you can figure it
> out yourself. Try some of the suggestions in
> http://www.mathworks.com/help/optim/ug/when-the-solver-might-have-succeeded.html
>
> Alan Weiss
> MATLAB mathematical toolbox documentation


Thank you Alan. I will investigate the issue a bit more. Thanks again!

Regards

S



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.