R2024a

New Features, Bug Fixes, Compatibility Considerations

  HiGHS Algorithm for intlinprog: Solve mixed-integer linear programming problems faster and more reliably

The intlinprog solver has a new algorithm based on the open-source HiGHS code. The new algorithm is the default for intlinprog. Testing shows that the new algorithm often solves MILP problems faster and more reliably than before. To choose this algorithm using optimoptions, set the Algorithm option to "highs".

 Compatibility Considerations

To use the previous algorithm, set the Algorithm option to "legacy" using optimoptions. Iterative display is different than before. For details, see intlinprog algorithm.

  HiGHS Algorithm for linprog: Solve linear programming problems faster and more reliably

The linprog solver has a new algorithm based on the open-source HiGHS code. The new algorithm is the default for linprog. Testing shows that the new algorithm often solves linear programming problems faster and more reliably than before. To choose this algorithm using optimoptions, set the Algorithm option to "dual-simplex-highs".

 Compatibility Considerations

To use the previous default algorithm, set the Algorithm option to "dual-simplex-legacy" using optimoptions. Iterative display is different than before. For algorithmic details, see Dual-Simplex-Highs Algorithm.

 Single-precision code generation for fmincon

The fmincon solver can generate code for single-precision floating point hardware. To generate single-precision code, all relevant data such as constraint matrices and nonlinear function outputs must be of type 'single'. For details, see Single-Precision Code Generation.

Note

This single-precision capability is available for code generation only; it is not available for general MATLAB® computations.

coneprog LinearSolver option: Accelerate solutions of problems with dense constraint matrices

The coneprog solver has a new LinearSolver algorithm, "normal-dense", that has good performance on dense cone programming problems. Try this algorithm when your problem has a constraint matrix (cone constraint or linear constraint) with a large fraction of nonzero elements. Set LinearSolver="normal-dense" using optimoptions:

options = optimoptions("coneprog",LinearSolver="normal-dense");

For an example, see Compare Speeds of coneprog Algorithms.

Optimization expressions support 'like' syntax

You can create optimization expressions using the 'like' syntax, which can simplify initialization of expressions in a loop. See Initialize Optimization Expressions.

Evaluate objectives and constraints in an optimization problem at a set of points

The evaluate function can now evaluate all objective and constraint values for an optimization problem at a set of points.

Similarly, the new issatisfied function can evaluate all constraints in an optimization problem at a set of points, determining feasibility to within a settable tolerance. For details and examples, see the function reference pages.

 More robust handling of unconstrained problems in lsqlin

The lsqlin solver now takes extra steps when solving an ill-conditioned unconstrained problem with a square input matrix C. The results can have improved accuracy and the likelihood of obtaining an Inf or NaN result is decreased.

 Compatibility Considerations

For unconstrained problems, the output.algorithm field is now 'direct' instead of the previous 'mldivide'.

 Functionality being removed or changed

intlinprog algorithm

The HiGHS algorithm (Algorithm="highs") usually solves MILP problems faster and more reliably than the previous algorithm (Algorithm="legacy"). As a result of this change, intlinprog options and default display have changed.

  • The following options are not available with the HiGHS algorithm.

    • BranchRule

    • CutGeneration

    • CutMaxIterations

    • Heuristics

    • HeuristicsMaxNodes

    • IntegerPreprocess

    • IntegerTolerance

    • LPMaxIterations

    • LPOptimalityTolerance

    • MaxFeasiblePoints

    • NodeSelection

    • ObjectiveImprovementThreshold

    • OutputFcn

    • PlotFcn

    • RootLPAlgorithm

    • RootLPMaxIterations

    Testing has shown that the HiGHS algorithm generally performs well without the removed options.

  • In particular, when using the HiGHS algorithm, intlinprog does not use output functions or plot functions.

  • Iterative display is different than before.

For algorithmic details, see HiGHS MILP Algorithm.