how to set intlinprog options
Show older comments
how to set intlinprog options to increase options.maxnodes I've tried both
options=optimoptions('intlinprog') ;
options.MaxNodes=10^16;
and
optimoptions('intlinprog','MaxNodes',10^16);
intcon= zeros(34,1);
for i= 1 : 34
intcon(i,1)=25+i;
end
D = [ DDD ; eye(25), zeros(25,34); -eye(25), zeros(25,34) ] ;
f= [zeros(25,1) ; g ; -1 ] ;
b=[zeros(33,1); [1-0.0001 ] ; ones(25,1); ones(25,1) ] ;
options=optimoptions('intlinprog') ;
options.MaxNodes=10^16;
optimoptions('intlinprog','MaxNodes',10^16);
w = intlinprog(-f,intcon,D,b) ;
However, when I run my code the program keeps setting options.maxnodes to 10^8
Intlinprog stopped because it reached the maximum number of nodes,
options.MaxNodes = 10000000 (the default value).
Answers (1)
Matt J
on 2 Sep 2015
1 vote
You define "options", but never pass it to intlinprog.
5 Comments
Standardtrickyness
on 2 Sep 2015
Matt J
on 2 Sep 2015
You call intlinprog here,
w = intlinprog(-f,intcon,D,b) ;
with only 4 input arguments -f,intcon,D, and b. Your "options" is not among the inputs. You need to use the 9-argument syntax
w = intlinprog(f,intcon,A,b,Aeq,beq,lb,ub,options)
Standardtrickyness
on 2 Sep 2015
Walter Roberson
on 2 Sep 2015
Edited: Walter Roberson
on 2 Sep 2015
It creates an options structure using typical options for intlinprog and then setting MaxNodes to 10^16 in that structure.
Alan Weiss
on 2 Sep 2015
Alan Weiss
MATLAB mathematical toolbox documentation
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!