Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
140 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,64 @@ | ||
# NLP.py | ||
|
||
[![Build Status](https://travis-ci.com/PythonOptimizers/NLP.py.svg?token=MZezWHtArpsrWZ3Yyqzx&branch=develop)](https://travis-ci.com/PythonOptimizers/NLP.py) | ||
|
||
`NLP.py` is a Python package for modeling and solving continuous optimization problems. | ||
|
||
## Dependencies | ||
|
||
- Numpy | ||
- [`Numpy`](http://www.numpy.org) | ||
- [`PyKrylov`](https://github.com/PythonOptimizers/pykrylov) | ||
|
||
## Optional dependencies | ||
|
||
A strongly recommended dependency is the AMPL modeling language Solver Library. On OSX, the simplest is to use [Homebrew](https://brew.sh): | ||
``` | ||
brew tap homebrew/science | ||
brew install asl | ||
``` | ||
### Sparse matrix storage | ||
|
||
Python dependencies: | ||
One of: | ||
|
||
- [`CySparse`](https://github.com/PythonOptimizers/cysparse) (the successor of PySparse) | ||
- [`CySparse`](https://github.com/PythonOptimizers/cysparse) (recommended) | ||
- [`PySparse`](https://github.com/optimizers/pysparse.git) | ||
- [`Scipy`](http://scipy.org/scipylib) | ||
- [`Scipy`](http://scipy.org/scipylib) (does not have full support yet) | ||
|
||
Only certain numerical methods and functionalities are available without sparse matrix support. | ||
|
||
### Derivatives computation | ||
|
||
At least one of the following, depending on requirements: | ||
|
||
- [`ASL`](https://github.com/ampl/mp) | ||
- [`pyadolc`](https://github.com/b45ch1/pyadolc.git) | ||
- [`algopy`](https://github.com/b45ch1/algopy.git) | ||
- [`pycppad`](https://github.com/b45ch1/pycppad.git) | ||
|
||
Without one of the above dependencies, at least the first derivatives must be coded by hand. Second derivatives may be approximated used a quasi-Newton scheme. | ||
|
||
### Factorizations | ||
|
||
One or more of the following, depending on requirements: | ||
|
||
- [`HSL.py`](https://github.com/PythonOptimizers/HSL.py) | ||
- [`MUMPS.py`](https://github.com/PythonOptimizers/MUMPS.py) | ||
- [`qr_mumps.py`](https://github.com/PythonOptimizers/qr_mumps.py) | ||
- [`SuiteSparse.py`](https://github.com/PythonOptimizers/SuiteSparse.py) | ||
|
||
## Installation | ||
|
||
1. Clone this repo:: | ||
Only matrix-free methods are available without one of the above factorizations. | ||
|
||
git clone https://github.com/PythonOptimizers/NLP.py | ||
|
||
|
||
2. Copy `site.template.cfg` to `site.cfg` and modify `site.cfg` to match your configuration:: | ||
## Installation | ||
|
||
cp site.template.cfg site.cfg | ||
1. Clone this repo: | ||
```bash | ||
git clone https://github.com/PythonOptimizers/NLP.py | ||
``` | ||
|
||
2. Optional: Install optional dependencies. OSX users, see `Readme.osx`. | ||
|
||
3. Install:: | ||
3. Optional: if you would like ASL support, copy `site.template.cfg` to `site.cfg` and modify `site.cfg` to match your configuration:: | ||
```bash | ||
cp site.template.cfg site.cfg | ||
``` | ||
|
||
python setup.py build | ||
python setup.py install [--prefix=...] | ||
4. Install: | ||
```bash | ||
python setup.py build | ||
python setup.py install [--prefix=...] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters