pycollocation

Python package for solving initial value problems (IVP) and two-point boundary value problems (2PBVP).

https://github.com/davidrpugh/pycollocation

Science Score: 41.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Python package for solving initial value problems (IVP) and two-point boundary value problems (2PBVP).

Basic Info
  • Host: GitHub
  • Owner: davidrpugh
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 2.8 MB
Statistics
  • Stars: 17
  • Watchers: 5
  • Forks: 8
  • Open Issues: 8
  • Releases: 0
Created over 11 years ago · Last pushed almost 10 years ago
Metadata Files
Readme License Citation

README.rst

pyCollocation
=============

|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
.. |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
   :target: https://pypi.python.org/pypi/pyCollocation/
.. |DOI| image:: https://zenodo.org/badge/doi/10.5281/zenodo.33724.svg
   :target: http://dx.doi.org/10.5281/zenodo.33724
.. |Documentation Status| image:: https://readthedocs.org/projects/pycollocation/badge/?version=latest
   :target: https://readthedocs.org/projects/pycollocation/?badge=latest


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:

- 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
.. _Hermite: http://en.wikipedia.org/wiki/Hermite_polynomials

Installation
------------

Assuming you have `pip`_ on your computer (as will be the case if you've `installed Anaconda`_) you can install the latest stable release of ``pycollocation`` by typing
    
.. code:: bash

    pip install pycollocation

at a terminal prompt.

.. _pip: https://pypi.python.org/pypi/pip
.. _`installed Anaconda`: http://quant-econ.net/getting_started.html#installing-anaconda

Example notebooks
-----------------

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
- Various `auction models`_ (currently symmetric and asymmetric IPVP)

.. _`Solow model` : https://github.com/davidrpugh/pyCollocation/blob/master/examples/solow-model.ipynb
.. _`Ramsey model`: https://github.com/davidrpugh/pyCollocation/blob/master/examples/ramsey-cass-koopmans-model.ipynb
.. _`Spence model`: https://github.com/davidrpugh/pyCollocation/blob/master/examples/spence-model.ipynb
.. _`auction models` : https://github.com/davidrpugh/pyCollocation/blob/master/examples/auction-models.ipynb


Physics
~~~~~~~

- `A simple heat exchanger`_ 

.. _`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!)...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.

- Support for free boundary conditions.  This comes up a lot in auction theory applications where the upper bounds on the bidder valuation distributions are unknown.

.. _`scikits.bvp_solver` : https://github.com/jsalvatier/scikits.bvp_solver 

Owner

  • Name: David R. Pugh
  • Login: davidrpugh
  • Kind: user
  • Location: Thuwal, Saudi Arabia
  • Company: King Abdullah University of Science and Technology

Instructional Assistant Professor in AI, KAUST; Certified Instructor, @swcarpentry; Associate, @INET-Complexity, Oxford University

Citation (CITATION)

@Manual{pyCollocation,
        title = {\pkg{pyCollocation}: \proglang{Python} library for solving boundary value problems},
        author = {David R. Pugh},
        organization = {pyCollocation},
        year = {2015},
        doi = {10.5281/zenodo.16761},
        url = {https://github.com/davidrpugh/pyCollocation}
        }

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 231
  • Total Committers: 1
  • Avg Commits per committer: 231.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
David R. Pugh d****h@g****m 231

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 27
  • Total pull requests: 19
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 2 days
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 0.56
  • Average comments per pull request: 1.68
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • davidrpugh (25)
  • crisla (1)
  • fusion809 (1)
Pull Request Authors
  • davidrpugh (18)
Top Labels
Issue Labels
enhancement (19) bug (4) quick fix (1)
Pull Request Labels
enhancement (1) bug (1)

Dependencies

docs/rtd-pip-requirements.txt pypi
  • Sphinx *
  • ipython *
  • matplotlib *
  • numpy *
  • numpydoc *
  • pandas *
  • scipy *
  • sympy *