File Exchange

## Mixed-Integer Linear Programming in MATLAB

version 1.3.0.1 (1.53 MB) by
MATLAB files from the webinar

Updated 01 Sep 2016

These files accompany the webinar which can be viewed here: http://www.mathworks.com/videos/mixed-integer-linear-programming-in-matlab-91541.html
Learn how to use the new optimization solver for mixed-integer linear programming in Release 2014a. This new solver enables you to solve optimization problems in which some or all of the variables are constrained to take on integer values. Mixed-integer problems are commonly encountered in Finance, Energy, and Operations Research, such as when variables represent the number of shares of a stock to purchase, or a yes-or-no (binary) decision.

### Cite As

Seth DeLand (2021). Mixed-Integer Linear Programming in MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/46403-mixed-integer-linear-programming-in-matlab), MATLAB Central File Exchange. Retrieved .

Iman Khaleel

Azamat Ussenov

Mary Fenelon

The webinar that goes along with these files has been updated to use the new problem-based approach for specifying linear and mixed-integer linear problems. The solver-based approach used in these files is still supported but is only mentioned briefly in the webinar.

The files that go with the new version of the webinar are here: https://www.mathworks.com/matlabcentral/fileexchange/65158-linear-and-mixed-integer-linear-programming-in-matlab

zila ezz

%% Tuning
% The previous solve took a fair amoutn of time in the cut generation
% phase. Turn off cut generation to see if we're able to solve the problem
% efficiently without the cuts.
options = optimoptions('intlinprog');
options.CutGeneration = 'none';
tic;
[xopt,fval,eflag] = intlinprog(-f, intcon, A, b, Aeq, beq, lb, ub, options);
toc

ERROR: Error using intlinprog (line 130)
INTLINPROG has stopped because it encountered an internal error. We are sorry for the inconvenience.

zila ezz

%% Tuning
% The previous solve took a fair amoutn of time in the cut generation
% phase. Turn off cut generation to see if we're able to solve the problem
% efficiently without the cuts.
options = optimoptions('intlinprog');
options.CutGeneration = 'none';
tic;
[xopt,fval,eflag] = intlinprog(-f, intcon, A, b, Aeq, beq, lb, ub, options);
toc

ERROR: Error using intlinprog (line 130)
INTLINPROG has stopped because it encountered an internal error. We are sorry for the inconvenience.

Syed Taha Munir

Dear Author
It was a very useful tutorial , but i was trying to apply the same technique to solve my problem but my machine has almost 100 states on which it can work. where as in this example the generator had only 3 states .
How should i formulate my problem for 100 states of my machine.

Syed Taha Munir

##### MATLAB Release Compatibility
Created with R2014a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux