# How can I interface my own solver to AMPL?

**URL:** <https://discuss.ampl.com/t/how-can-i-interface-my-own-solver-to-ampl/35>\
**Category:** FAQs\
**Tags:** solvers\
**Created:** [December 15, 2021, 5:03pm UTC](https://discuss.ampl.com/t/how-can-i-interface-my-own-solver-to-ampl/35 "2021-12-15T17:03:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![megrobert](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Post date:** [December 15, 2021, 5:03pm UTC](https://discuss.ampl.com/t/how-can-i-interface-my-own-solver-to-ampl/35/1 "2021-12-15T17:03:07Z")

</div>

AMPL has a publicly documented interface that you can use to make your own link to any solver you are developing. The interface works through files; AMPL writes a problem file to be read by your solver, and your solver writes a solution file to be read back by AMPL. The file format has equivalent binary and ASCII versions. It offers the flexibility needed to support a wide variety of solvers, yet is designed to afford very efficient reading and writing.

The AMPL interface is described and illustrated in [Hooking Your Solver to AMPL](https://ampl.com/REFS/hooking2.pdf). You can also download standard interface routines (in C) for reading and writing the AMPL file formats, along with a variety of examples of complete AMPL/solver links; see our [hooking page](https://ampl.com/resources/hooking-your-solver-to-ampl/) for details.
