Solves a mixed-integer linear optimization problem in intlinprog format.
xopt = intlinprog(c,intcon,A,b) xopt = intlinprog(c,intcon,A,b,Aeq,beq) xopt = intlinprog(c,intcon,A,b,Aeq,beq,lb,ub) xopt = intlinprog(c,intcon,A,b,Aeq,beq,lb,ub,options) xopt = intlinprog('path_to_mps_file') xopt = intlinprog('path_to_mps_file',options) [xopt,fopt,status,output] = intlinprog( ... )
a vector of double, contains coefficients of the variables in the objective
Vector of integer constraints, specified as a vector of positive integers. The values in intcon indicate the components of the decision variable x that are integer-valued. intcon has values from 1 through number of variable.
A matrix of doubles, containing the coefficients of linear inequality constraints of size (m X n) where 'm' is the number of linear inequality constraints.
A vector of doubles, related to 'A' and containing the the Right hand side equation of the linear inequality constraints of size (m X 1).
A matrix of doubles, containing the coefficients of linear equality constraints of size (m1 X n) where 'm1' is the number of linear equality constraints.
A vector of doubles, related to 'Aeq' and containing the the Right hand side equation of the linear equality constraints of size (m1 X 1).
A vector of doubles, containing the lower bounds of the variables of size (1 X n) or (n X 1) where 'n' is the number of variables.
A vector of doubles, containing the upper bounds of the variables of size (1 X n) or (n X 1) where 'n' is the number of variables.
A list, containing the option for user to specify. See below for details.
A vector of doubles, containing the computed solution of the optimization problem.
A double, containing the the function value at x.
An integer, containing the flag which denotes the reason for termination of algorithm. See below for details.
A structure, containing the information about the optimization. See below for details.
Search the minimum or maximum of a constrained mixed-integer linear programming optimization problem specified by :
CBC, an optimization library written in C++, is used for solving the linear programming problems.
options= list("IntegerTolerance", [---], "MaxNodes",[---], "MaxIter", [---], "AllowableGap",[---] "CpuTime", [---],"gradobj", "off", "hessian", "off" );
options = list('integertolerance',1d-06,'maxnodes',2147483647,'cputime',1d10,'allowablegap')
The exitflag allows the user to know the status of the optimization which is returned by OSI-CBC. The values it can take and what they indicate is described below:
For more details on exitflag, see the Bonmin documentation which can be found on http://www.coin-or.org/Cbc
A few examples displaying the various functionalities of intlinprog have been provided below. You will find a series of problems and the appropriate code snippets to solve them.
Here we solve a simple objective function, subjected to three linear inequality constraints.
Find x in R^8 such that it minimizes:
Here we build up on the previous example by adding upper and lower bounds to the variables. We add the following bounds to the problem specified above:
In this example, we proceed to add the linear equality constraints to the objective function.
Primal Infeasible Problems: Find x in R^8 such that it minimizes:
Find x in R^8 such that it minimizes:
Unbounded Problems. Find x in R^8 such that it minimizes: