x = intlinprog(f, intcon, A, b)
[x, fval, exitflag, output] = intlinprog(f, intcon, A, b, Aeq, beq, lb, ub, x0, options)
[x, fval, exitflag, output] = intlinprog(problem)
| Parameter | Description |
|---|---|
| f | linear objective coefficients. |
| intcon | indices of integer variables. |
| A, b | linear inequality constraints A*x <= b. |
| Aeq, beq | linear equality constraints Aeq*x = beq. |
| lb, ub | lower and upper variable bounds. |
| options | solver options created with optimoptions or optimset. |
| Parameter | Description |
|---|---|
| x | computed minimizer. |
| fval | objective value f'*x. |
| exitflag | termination indicator. |
| output | diagnostic structure. |
intlinprog solves linear optimization problems where selected variables are integer-valued. Nelson uses HiGHS when available.
The accepted problem structure can contain solver, f, intcon, Aineq or A, bineq or b, Aeq, beq, lb, ub, x0 and options fields.
The output structure reports relative and absolute gap, number of feasible points, node count, constraint violation, iterations, elapsed time, algorithm, normalized backend status, primal solution status and backend message. The exitflag distinguishes optimal, infeasible, unbounded, limit-reached and early-stop statuses when the backend provides that status.
Options such as MaxTime, MaxNodes, MaxIterations, MaxFeasiblePoints, AbsoluteGapTolerance, RelativeGapTolerance, IntegerTolerance, LPPreprocess, RootLPAlgorithm, Heuristics and CutGeneration are mapped to HiGHS where possible. Recognized options without a direct backend equivalent are accepted and ignored.
f = [8; 1];
intcon = 2;
A = [-1 -2; -4 -1; 2 1];
b = [14; -33; 20];
opts = optimoptions('intlinprog', 'Display', 'off');
[x, fval, exitflag, output] = intlinprog(f, intcon, A, b, [], [], [], [], [], opts)
| Version | Description |
|---|---|
| 2.0.0 | initial version |