Is bintprog still invokable post-R2013?

2 次查看(过去 30 天)
I'm still using R2013, and I notice that bintprog has no online documentation in the R2014 version of the Optimization Toolbox. I understand that intlinprog would render bintprog obsolete, and for that reason use of it should be discontinued. However, I am wondering if R2104 will be backward compatible with any current code I have that calls bintprog, once I do finally get around to upgrading. Is bintprog still alive in R2104, invisible in the documentation, but perhaps calling intlinprog under the hood?

采纳的回答

Star Strider
Star Strider 2014-11-15
According to the ‘Tips’ section of the intlinprog documentation:
  • intlinprog replaces bintprog. To update old bintprog code to use intlinprog, make the following changes:
Set |intcon| to |1:numVars|, where |numVars| is the number of variables in your problem.
Set |lb| to |zeros(numVars,1)|.
Set |ub| to |ones(numVars,1)|.
Update any relevant options. Use |optimoptions| to create options for |intlinprog|.
Change your call to |bintprog| as follows:
[x,fval,exitflag,output] = bintprog(f,A,b,Aeq,Beq,x0,options)
% Change your call to:
[x,fval,exitflag,output] = intlinprog(f,intcon,A,b,Aeq,Beq,lb,ub,options)
No recent experience with this. Just quoting from the documentation.
  6 个评论
Matt J
Matt J 2014-11-15
Aargh. That is unfortunate, and a bit strange on the part of the developers not to at least leave a legacy version in there.
But, in my case, I can probably cook up a wrapper for intlinprog without too much pain.
Thanks again.
Star Strider
Star Strider 2014-11-15
My pleasure, as always.
I was thinking that perhaps its .m file would offer the possibility of copying it and renaming it something convenient and using it as before, but when I opened its .m file in the Editor, I got this:
function [x,fval,exitflag,output] = bintprog(f,A,b,Aeq,beq,x0,options)
%BINTPROG has been removed. Use INTLINPROG instead.
% Copyright 1990-2014 The MathWorks, Inc.
% Error for deprecation
error(message('optim:bintprog:NotSupported', ...
addLink( 'Tips section', 'intlinprog_replaces_bintprog' )));

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surrogate Optimization 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by