Is bintprog still invokable post-R2013? (2024)

9 views (last 30 days)

Show older comments

Matt J on 15 Nov 2014

  • Link

    Direct link to this question

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013

  • Link

    Direct link to this question

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013

Commented: Star Strider on 15 Nov 2014

Accepted Answer: Star Strider

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?

0 Comments

Show -2 older commentsHide -2 older comments

Sign in to comment.

Sign in to answer this question.

Accepted Answer

Star Strider on 15 Nov 2014

  • Link

    Direct link to this answer

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#answer_159063

  • Link

    Direct link to this answer

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#answer_159063

Open in MATLAB Online

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 Comments

Show 4 older commentsHide 4 older comments

Matt J on 15 Nov 2014

Direct link to this comment

https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249769

  • Link

    Direct link to this comment

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249769

Open in MATLAB Online

Thanks. Sounds ominous, though. Do you have the R2014 Optimization Toolbox? If so, could you tell me what you get in response to

>>which bintprog

Star Strider on 15 Nov 2014

Direct link to this comment

https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249775

  • Link

    Direct link to this comment

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249775

Edited: Star Strider on 15 Nov 2014

Open in MATLAB Online

My pleasure.

I do. I get:

C:\Program Files\MATLAB\R2014b\toolbox\optim\optim\bintprog.m

so it exists, but searching in the online or offline documentation for it brings up only intlinprog. (I wonder if intlinprog is a wrapper for it, or if bintprog is just there for legacy purposes?)

EDIT —

If you have a small sample routine you’d like to run to test bintprog on R2014b, send it along and I’ll see if it works.

Matt J on 15 Nov 2014

Direct link to this comment

https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249800

  • Link

    Direct link to this comment

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249800

Edited: Matt J on 15 Nov 2014

Open in MATLAB Online

I wonder if intlinprog is a wrapper for it, or if bintprog is just there for legacy purposes?

Yes, I'm still curious about that as well. I see now that the optimoptions for intlinprog are rather different than bintprog. That could be why making one a wrapper for the other isn't so simple.

If you have a small sample routine you’d like to run to test bintprog on R2014b, send it along and I’ll see if it works.

Could you try this,

>> bintprog(1,1,1,1,1)

Star Strider on 15 Nov 2014

Direct link to this comment

https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249802

  • Link

    Direct link to this comment

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249802

Open in MATLAB Online

I’ll be glad to.

Unfortunately, the bintprog call gets an mlint red underline with the same message as it throws when I run it:

Error using bintprog (line 7)

BINTPROG has been removed. Use INTLINPROG instead. See the Tips section in the INTLINPROG function reference page.

You have my sympathies!

Matt J on 15 Nov 2014

Direct link to this comment

https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249805

  • Link

    Direct link to this comment

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249805

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 on 15 Nov 2014

Direct link to this comment

https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249808

  • Link

    Direct link to this comment

    https://matlabcentral.mathworks.com/matlabcentral/answers/162840-is-bintprog-still-invokable-post-r2013#comment_249808

Open in MATLAB Online

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' )));

Sign in to comment.

More Answers (0)

Sign in to answer this question.

See Also

Categories

Mathematics and OptimizationOptimization ToolboxGet Started with Optimization Toolbox

Find more on Get Started with Optimization Toolbox in Help Center and File Exchange

Tags

  • bintprog
  • intlinprog
  • optimization

Products

  • Optimization Toolbox

Community Treasure Hunt

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

Start Hunting!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.


Is bintprog still invokable post-R2013? (9)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asia Pacific

Contact your local office

Is bintprog still invokable post-R2013? (2024)
Top Articles
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 6222

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.