image thumbnail

AMPL Interface to MATLAB

version (1.01 MB) by Steve Grikschat
Connect MATLAB - Optimization Toolbox™ to the AMPL API for MATLAB


Updated 06 Aug 2018

View License

This package (AMPL interface to Optimization Toolbox) connects MATLAB – Optimization Toolbox™ to the AMPL API for MATLAB (version 1.3 or higher).
It provides an interface to Optimization Toolbox solvers that enables

• Solving problems using the AMPL API for MATLAB
• Solving problems saved in NL-format files
• Querying characteristics including function values, gradients and Hessians of either AMPL problems or problems saved in NL-format files.

Linear, quadratic, mixed-integer linear and nonlinear optimization problems are solved with automatic selection of the appropriate Optimization Toolbox solver.

The problem characteristic query functionality is useful for those developing their own solvers or performing pre- and post-solution analysis.

The AMPL interface must be built for each platform where it will be used. Building the interface requires MATLAB, a C/C++ compiler, and a make utility. Instructions are in the readme_build_ampl_interface file.

To solve or query AMPL models, both AMPL (64-bit) and the AMPL API for MATLAB must be installed.

This package was developed by Aykut Bulut and Steve Grikschat from the development group at MathWorks.

Cite As

Steve Grikschat (2021). AMPL Interface to MATLAB (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017a
Compatible with R2017a to R2018a
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!