Skip to content

cor3bit/pyautonlp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyAutoNLP - JAX Implementation of Differentiable NLP Solvers

Usage

  • Install the library with pip:
$ pip install git+https://github.com/cor3bit/pyautonlp.git
  • Specify the problem using jax.numpy arrays:
import jax.numpy as jnp

def loss(x):
    return 0.5 * jnp.dot(x, x) + jnp.sum(x)

def equality_constr(x):
    return jnp.dot(x, x) - 1
  • Select a solver and run PyAutoNLP solve() method:
import pyautonlp as pan

sln, info = pan.solve(
    loss_fn=loss,
    eq_constr=[equality_constr],
    solver_type='newton',
    guess=(1., 1.),
)

Supported Solvers

Currently supported methods:

  • First Order Methods
    • Gradient Descent (solver id: 'gd')
  • Second Order Methods
    • Newton's method (solver id: 'newton')
  • Constrained Optimization
    • Newton's method (solver id: 'newton')
    • SQP (solver id: 'sqp')
    • IP (solver id: 'ip')
  • Optimal Control [in progress]
    • HJB (solver id: 'hjb')
    • Pontryagin's method (solver id: 'pmp')
    • Dynamic Programming (solver id: 'dp')
    • Direct Optimal Control (solver id: 'doc')

Acknowledgements

References

More detailed description of the optimization algorithms can be found in

  1. Numerical Optimization - Jorge Nocedal and Stephen J. Wright, Springer, 2006.
  2. Algorithms for Optimization - Mykel J. Kochenderfer and Tim A. Wheeler, MIT Press, 2019.
  3. Optimal Control Theory - Suresh P. Sethi, Springer, 2019.

About

JAX Implementation of Differentiable NLP Solvers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages