AMPL R API¶
In the same way that AMPL’s syntax matches naturally the mathematical description of the model, the input and output data matches naturally R data types such as vectors and dataframes.
All model generation and solver interaction is handled directly by AMPL, which leads to great stability and speed; the library just acts as an intermediary, and the added overhead (in terms of memory and CPU usage) depends mostly on how much data is sent and read back from AMPL, the size of the expanded model as such is irrelevant.
rAMPL you can model and solve large scale optimization problems in R with the performance of heavily optimized C code
without losing model readability. The same model can be deployed on applications
built on different languages by just switching the API used.
- Initial Setup
- Quick Start
- Complete listing
- Needed headers and AMPL environment creation
- Load a model from file
- Solve a problem
- Get an AMPL entity in the programming environment (get objective value)
- Modify model data (assign values to parameters)
- Get numeric values from variables
- Get arbitrary values via ampl expressions
- Delete the AMPL object to free the resources
- Class structure
- R API Reference
- R API Examples