https://github.com/ampl/rampl
R API for AMPL
https://github.com/ampl/rampl
ampl integer-linear-programming integer-programming linear-optimization linear-programming milp mip mixed-integer-optimization mixed-integer-programming modeling-language nonlinear-optimization nonlinear-programming optimization r rampl rlang
Last synced: 19 days ago
JSON representation
R API for AMPL
- Host: GitHub
- URL: https://github.com/ampl/rampl
- Owner: ampl
- License: bsd-3-clause
- Created: 2018-02-11T20:23:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-27T17:59:56.000Z (2 months ago)
- Last Synced: 2025-03-27T06:22:33.979Z (about 1 month ago)
- Topics: ampl, integer-linear-programming, integer-programming, linear-optimization, linear-programming, milp, mip, mixed-integer-optimization, mixed-integer-programming, modeling-language, nonlinear-optimization, nonlinear-programming, optimization, r, rampl, rlang
- Language: C++
- Homepage: http://rAMPL.ampl.com
- Size: 930 KB
- Stars: 15
- Watchers: 9
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### rAMPL
[](https://dev.azure.com/ampldev/rAMPL/_build/latest?definitionId=10&branchName=master) [](https://github.com/ampl/rAMPL/actions/workflows/build-and-test.yaml)
AMPL API is an interface that allows developers to access the features of the
AMPL interpreter from within a programming language. 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 read
back from AMPL, the size of the model as such is irrelevant. Functions for
directly assigning data to AMPL parameters and sets are provided, which can
be used instead of the normal AMPL data reading procedures. AMPL API has been
written with usability in mind, and it is easy to access its functionalities
from C++, Java, C#, MATLAB, Python, and R.The AMPL API can function as an add-on to any existing AMPL installation. If
you do not yet have an AMPL installation on the computer where you will be
working with the API. Use our [Community Edition](http://ampl.com/ce)
to download a working version that can be installed quickly.#### Documentation
- http://rAMPL.readthedocs.io
#### Setup
In order to install the latest version of the R API you just need to run:
```
> install.packages("Rcpp", type="source")
> install.packages("https://ampl.com/dl/API/rAMPL.tar.gz", repos=NULL)
```Note: this package requires R development tools on Windows and macOS, which can be installed as follows:
* Windows: https://cran.r-project.org/bin/windows/Rtools/
* macOS: https://cran.r-project.org/bin/macosx/tools/
* On Linux, this package requires a C++ compiler such as g++.Alternatively, you can download, build, and install the package locally:
```
$ git clone [email protected]:ampl/rAMPL.git
$ cd rAMPL
$ python updatelib.py
$ cd ..
$ R CMD build rAMPL
$ R CMD INSTALL rAMPL_.tar.gz
```#### License
BSD-3
***
Copyright © 2023 AMPL Optimization inc. All rights reserved.