"intlinprog" error

11 次查看(过去 30 天)
Ismaeel
Ismaeel 2016-12-9
I am trying to add some options to my solver (intlinprog) for my integer-linear-programming problem. Why do I get an error for most options I add:
Error using optimoptions (line 105) 'IntegerPreprocess' is not an option for INTLINPROG. A list of options can be found on the INTLINPROG documentation page.
This is the related part of my code: options = optimoptions('intlinprog','IntegerPreprocess','None'); x = intlinprog(f,intcon,A,b,[],[],lb,ub,options);x=x';
The version of my Matlab is 2015a. Any idea? Thanks

回答(3 个)

John D'Errico
John D'Errico 2016-12-9
编辑:John D'Errico 2016-12-9
Upgrade your MATLAB release to the current version? You cannot use capability that was not introduced until after your release.
  1 个评论
Ismaeel
Ismaeel 2016-12-9
编辑:Ismaeel 2016-12-9
Thanks John, but it's 2015 release. I have tried on both 2015a and 2015b.

请先登录,再进行评论。


Steven Lord
Steven Lord 2016-12-9
The online documentation here is for the most recent release of Optimization Toolbox, which is currently release R2016b. In release R2016a many of the options used by Optimization Toolbox functions were renamed, and the current documentation will use the new names.
Use the documentation included in your installation (or the "Current and Legacy Option Name Tables" linked in that entry in the Release Notes) to learn the names used by the toolbox in the release you are using.
  1 个评论
Ismaeel
Ismaeel 2016-12-12
Thanks all. I've upgraded Matlab and now fixed.

请先登录,再进行评论。


marwan alasali
marwan alasali 2019-2-23
what the problem
>> f = [8;1];
intcon = 2;
>> A = [-1,-2;
-4,-1;
2,1];
b = [14;-33;20];
>> x = intlinprog(f,intcon,A,b)
Undefined function 'intlinprog' for input arguments of type 'double'.
  1 个评论
John D'Errico
John D'Errico 2019-2-23
STOP ADDING MULTIPLE NEW ANSWERS TO AN OLD QUESTION. In fact, do not add an answer when you just want to ask a question. Use a comment for that, as I just did.
Ask this as a separate question when you want to ask a question. However my answer there will be this:
if you do not have a license for the optimization toolbox, then you cannot use intlinprog. You would then need to add the optimization toolbox, paying for the new toolbox.
If you have an old MATLAB release that did not have intlinprog at the time, then you cannot use a tool that did not exist at the time. Nor can you use a new toolbox in the old release.
If you have a license that was provided to you, perhaps by your university, then you need to talk to them. Find out if you should have that toolbox in your installation.
You can test much of this by typing
ver
at the command line. It will tell you what is your release, and what toolboxes are installed with it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by