AMPL Model Reader Object

Systems and Computer Engineering

Carleton University

Ottawa, Canada

AMPL is a popular language for describing mathematical programs – see www.ampl.com for further information.  The AMPL developers provide a set of C language routines for hooking a solver or modeling system to AMPL (known as the AMPLsolver library), however, it still requires significant programming effort and knowledge to make the interface work smoothly.  We have simplified this task by creating an object wrapper for some of the more commonly used interface routines.  This allows programmers to simply reference the associated AMPL Model Reader object in their code, thereby exposing the properties of the model and providing a set of useful methods. 

Exposed properties include the names of variables, constraints and objectives, variable bounds, constraint types, etc.  Methods include the ability to calculate the value of a constraint or objective at a given point, ability to return gradients at a point, etc.  The properties and methods exposed by the object can be conveniently viewed via the object browser in the programming development environment.  The object also simplifies other programming tasks.  For example, an appropriate dialog box is provided when the user wishes to locate an AMPL model.

Two items are provided here:

Version History

Download and Installation

The full-featured software is available for free download.  Instructions:

 

Notes

 

COM Object

 

.NET Object

 

Authors

 

Last update: January 22, 2004.