Skip to content

Commit

Permalink
Merge c76eda0 into 97532a0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrpugh committed Oct 7, 2015
2 parents 97532a0 + c76eda0 commit fd30ee4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -12,6 +12,7 @@ notifications:
branches:
only:
- master
- develop

before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
Expand All @@ -21,7 +22,7 @@ before_install:
- conda update --yes conda

install:
- conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy nose pandas pip sympy
- conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy nose pip
- pip install coveralls coverage
- python setup.py install

Expand Down
41 changes: 25 additions & 16 deletions README.rst
@@ -1,16 +1,14 @@
pyCollocation
=============

|Build Status| |Coverage Status| |Documentation Status| |Codacy Badge| |Scrutinizer Code Quality| |Latest Version| |Downloads| |DOI|
|Build Status| |Coverage Status| |Documentation Status| |Code Climate| |Latest Version| |Downloads| |DOI|

.. |Build Status| image:: https://travis-ci.org/davidrpugh/pyCollocation.svg?branch=master
:target: https://travis-ci.org/davidrpugh/pyCollocation
.. |Coverage Status| image:: https://coveralls.io/repos/davidrpugh/pyCollocation/badge.svg?branch=master
:target: https://coveralls.io/r/davidrpugh/pyCollocation?branch=master
.. |Codacy Badge| image:: https://www.codacy.com/project/badge/4838082c243c48afa392aabc7cce54ab
:target: https://www.codacy.com/app/drobert-pugh/pyCollocation
.. |Scrutinizer Code Quality| image:: https://scrutinizer-ci.com/g/davidrpugh/pyCollocation/badges/quality-score.png?b=master
:target: https://scrutinizer-ci.com/g/davidrpugh/pyCollocation/?branch=master
.. |Code Climate| image:: https://codeclimate.com/github/davidrpugh/pyCollocation/badges/gpa.svg
:target: https://codeclimate.com/github/davidrpugh/pyCollocation
.. |Latest Version| image:: https://img.shields.io/pypi/v/pyCollocation.svg
:target: https://pypi.python.org/pypi/pyCollocation/
.. |Downloads| image:: https://img.shields.io/pypi/dm/pyCollocation.svg
Expand All @@ -23,8 +21,9 @@ pyCollocation

Python package for solving initial value problems (IVP) and two-point boundary value problems (2PBVP) using the collocation method with various basis functions. Currently I have implemented the following basis functions:

- Orthogonal polynomials: Chebyshev_, Laguerre_, Legendre_, and Hermite_.
- Polynomials: Standard_, Chebyshev_, Laguerre_, Legendre_, and Hermite_.

.. _Standard: https://en.wikipedia.org/wiki/Polynomial
.. _Chebyshev: http://en.wikipedia.org/wiki/Chebyshev_polynomials
.. _Laguerre: http://en.wikipedia.org/wiki/Laguerre_polynomials
.. _Legendre: http://en.wikipedia.org/wiki/Legendre_polynomials
Expand Down Expand Up @@ -52,21 +51,31 @@ Economics

There are a number of example notebooks that demonstrate how to use the library to solve seminal models in the economics literature.

- `Solow model of economic growth`_
- `Ramsey model of optimal savings`_
- `Spence model of costly signaling`_
- `Kiyotaki and Moore model of credit cycles`_
- `Solow model`_ of economic growth
- `Ramsey-Cass-Koopmans model`_ of optimal savings

.. _`Solow model of economic growth`: http://nbviewer.ipython.org/github/davidrpugh/pyCollocation/blob/master/examples/solow-model.ipynb
.. _`Ramsey model of optimal savings`: http://nbviewer.ipython.org/github/ramseyPy/ramseyPy/blob/master/examples/ramsey-model.ipynb
.. _`Spence model of costly signaling`: http://nbviewer.ipython.org/github/davidrpugh/pyCollocation/blob/master/examples/spence-model.ipynb
.. _`Kiyotaki and Moore model of credit cycles`: http://nbviewer.ipython.org/github/davidrpugh/pyCollocation/blob/master/examples/credit-cycles.ipynb
.. _`Solow model` : https://github.com/davidrpugh/pyCollocation/blob/master/examples/solow-model.ipynb
.. _`Ramsey-Cass-Koopmans`: https://github.com/davidrpugh/pyCollocation/blob/master/examples/ramsey-cass-koopmans-model.ipynb

Physics
~~~~~~~

- `A simple heat exchanger`_

.. _`A simple heat exchanger`: http://nbviewer.ipython.org/github/davidrpugh/pyCollocation/blob/master/examples/heat-exchanger.ipynb
.. _`A simple heat exchanger`: https://github.com/davidrpugh/pyCollocation/blob/master/examples/heat-exchanger.ipynb

More notebooks will be added in the near future (hopefully!)
More notebooks will be added in the near future (hopefully!)...and suggestions for example notebooks are very welcome!

Roadmap to 1.0
--------------
Ultimately I am hoping to contribute this package to either SciPy or QuantEcon, depending. Ideally, version 1.0 of pyCollocation would include the following functionality...

- Support for at least two additional classes of basis functions: B-Splines, what else? Next obvious candidate would be some basis functions specifically used to approximate periodic functions.

- Support a solver for over-identified systems of equations. Currently the Solver class requires the system of equations defined by the collocation residuals to be exactly identified. Many economic applications, particularly models of optimal bidding functions for various types of auctions, naturally lead to over-identified systems.

- Built-in support for computing Jacobian matrix for the system of equations defined by the collocation residuals. Given a user-supplied Jacobian for the BVP, one can apply the chain rule to construct the Jacobian matrix for system of equations defined by the collocation residuals.

- Support for solving models with unknown parameters (similar to `scikits.bvp_solver`_). This would allow for the possibility to simultaneously solve and calibrate a model.

.. _`scikits.bvp_solver` : https://github.com/jsalvatier/scikits.bvp_solver
1 change: 0 additions & 1 deletion pycollocation/tests/test_ramsey_model.py
Expand Up @@ -59,7 +59,6 @@ def generate_random_params(scale, seed):
lower_bound = delta / (alpha * (g + n + delta) - g)
theta, = stats.lognorm.rvs(scale, loc=lower_bound, size=1)
rho = alpha * theta * (g + n + delta) - (delta * theta * g)
print theta, lower_bound
assert rho > 0

# choose k0 so that it is not too far from equilibrium
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -30,7 +30,7 @@ def read(*paths):
setup(
name="pycollocation",
packages=['pycollocation'],
version='0.4.5-alpha',
version='0.5-alpha',
description=DESCRIPTION,
long_description=read('README.rst'),
license="MIT License",
Expand Down

0 comments on commit fd30ee4

Please sign in to comment.