{"id":22222187,"url":"https://github.com/davewalker5/odesolver","last_synced_at":"2025-03-25T07:44:17.924Z","repository":{"id":58657459,"uuid":"532595043","full_name":"davewalker5/OdeSolver","owner":"davewalker5","description":"Ordinary Differential Equation Solver","archived":false,"fork":false,"pushed_at":"2024-07-25T08:23:09.000Z","size":203,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T07:15:40.184Z","etag":null,"topics":["differential-equations","mathematical-modelling","mathematics","maths","ode","ode-solver","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davewalker5.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-04T16:30:05.000Z","updated_at":"2024-11-28T16:56:33.000Z","dependencies_parsed_at":"2023-01-21T19:32:27.165Z","dependency_job_id":"25423267-1f44-4fba-b0e1-94cf5072af06","html_url":"https://github.com/davewalker5/OdeSolver","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davewalker5%2FOdeSolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davewalker5%2FOdeSolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davewalker5%2FOdeSolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davewalker5%2FOdeSolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davewalker5","download_url":"https://codeload.github.com/davewalker5/OdeSolver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245422921,"owners_count":20612725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["differential-equations","mathematical-modelling","mathematics","maths","ode","ode-solver","python","python3"],"created_at":"2024-12-02T23:17:28.655Z","updated_at":"2025-03-25T07:44:17.900Z","avatar_url":"https://github.com/davewalker5.png","language":"Python","readme":".. image:: https://github.com/davewalker5/OdeSolver/workflows/Python%20CI%20Build/badge.svg\n    :target: https://github.com/davewalker5/OdeSolver/actions\n    :alt: Build Status\n\n.. image:: https://codecov.io/gh/davewalker5/OdeSolver/branch/main/graph/badge.svg?token=U86UFDVD5S\n    :target: https://codecov.io/gh/davewalker5/OdeSolver\n    :alt: Coverage\n\n.. image:: https://sonarcloud.io/api/project_badges/measure?project=davewalker5_OdeSolver\u0026metric=alert_status\n    :target: https://sonarcloud.io/summary/new_code?id=davewalker5_OdeSolver\n    :alt: Quality Gate\n\n.. image:: https://img.shields.io/github/issues/davewalker5/OdeSolver\n    :target: https://github.com/davewalker5/OdeSolver/issues\n    :alt: GitHub issues\n\n.. image:: https://img.shields.io/github/v/release/davewalker5/OdeSolver.svg?include_prereleases\n    :target: https://github.com/davewalker5/OdeSolver/releases\n    :alt: Releases\n\n.. image:: https://img.shields.io/badge/License-mit-blue.svg\n    :target: https://github.com/davewalker5/OdeSolver/blob/main/LICENSE\n    :alt: License\n\n.. image:: https://img.shields.io/badge/language-python-blue.svg\n    :target: https://www.python.org\n    :alt: Language\n\n.. image:: https://img.shields.io/github/languages/code-size/davewalker5/OdeSolver\n    :target: https://github.com/davewalker5/OdeSolver/\n    :alt: GitHub code size in bytes\n\n\nOdeSolver\n=========\n\nOrdinary Differential Equation Solver\n\n\nStructure\n=========\n\n+-------------------------------+----------------------------------------------------------------------+\n| **Package**                   | **Contents**                                                         |\n+-------------------------------+----------------------------------------------------------------------+\n| ode_solver.gui                | Implementation of a PySimpleGUI desktop user interface               |\n+-------------------------------+----------------------------------------------------------------------+\n| ode_solver.solvers            | Implementation of the integration methods and solution runner        |\n+-------------------------------+----------------------------------------------------------------------+\n| ode_solver.utils              | Supporting utilities for the integration methods and data I/O        |\n+-------------------------------+----------------------------------------------------------------------+\n\n\nRunning the Application\n=======================\n\nPre-requisites\n--------------\n\nTo run the application, a virtual environment should be created, the requirements should be installed using pip and the\nenvironment should be activated.\n\nRunning the Desktop Application\n-------------------------------\n\nThe application can then be run from the command line, at the root of the project folder, as follows:\n\n::\n\n    export PYTHONPATH=`pwd`/src/\n    python -m ode_solver\n\nThe first command adds the source folder, containing the application source , to the PYTHONPATH environment variable\nso the packages will be found at run time. The command will need to be modified based on the current operating system.\n\nWhen the application starts, a window similar to the following will be displayed, though it will not contain a chart\nuntil solution options have been set and the solution has been run:\n\n.. image:: https://github.com/davewalker5/OdeSolver/blob/main/docs/images/chart_tab.png?raw=true\n    :width: 400\n    :alt: ODE Solver Main Window\n\nSetting and Saving Options\n--------------------------\n\nFrom the \"Simulation\" menu, select \"Options\" to show a tabbed options dialog as follows:\n\n.. image:: https://github.com/davewalker5/OdeSolver/blob/main/docs/images/options_function_tab.png?raw=true\n    :width: 400\n    :alt: Options Dialog\n\nThe following table summarises the available options:\n\n+-----------------------+---------------------+------------------------------------------------------------+\n| Tab                   | Option              | Comments                                                   |\n+-----------------------+---------------------+------------------------------------------------------------+\n| Chart Properties      | Title               | Chart title (optional)                                     |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | Y(min)              | Optional if automatic scaling is enabled                   |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | Y(max)              | Optional if automatic scaling is enabled                   |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | X(max)              | Optional if automatic scaling is enabled                   |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | Automatic scaling   | If ticked, chart axes are automatically scaled to the data |\n+-----------------------+---------------------+------------------------------------------------------------+\n| Function              | Function definition | Definition of the ODE to solve, in Python (see below)      |\n+-----------------------+---------------------+------------------------------------------------------------+\n| Simulation Parameters | Method              | Integration method to use                                  |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | Limit of x          | End the simulation when x reaches this limit or;           |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | No. steps           | End the simulation after this number of steps              |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | Initial step size   | Initial step size                                          |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | Initial y           | Initial value of y                                         |\n+-----------------------+---------------------+------------------------------------------------------------+\n| Step Adjustment       | Tolerance           | Tolerance to be used when automatic step size is enabled   |\n+-----------------------+---------------------+------------------------------------------------------------+\n|                       | Adjust step size    | If ticked, automatically adjust step size                  |\n+-----------------------+---------------------+------------------------------------------------------------+\n\nOnce set, options can be saved to a JSON format file using the \"Save\" option on the \"File\" menu. Saved settings\ncan be loaded from the \"Load\" option, also on the \"File\" menu.\n\nThe Function Definition\n-----------------------\n\nThe ordinary differential equation to be solved is set on the \"Function\" tab of the options dialog, as\nillustrated above. It must conform to the following conventions:\n\n- It must be written in Python\n- It must be called \"f\" and must take two arguments; the current values of the independent variable and dependent variable, in that order\n- It must return a single Decimal value that is the value of the function calculated from the input parameters\n\nAdditional supporting methods and constants may be defined in the function definition, if needed.\n\nThe following is an example:\n\n::\n\n    from decimal import Decimal\n\n    A = Decimal(\"0.5\")\n\n\n    def f(_, y):\n        \"\"\"\n        dy/dx = Ay\n\n        :param _: Independent variable (not used in this example)\n        :param y: Dependent variable\n        :return: Next value of the dependent variable\n        \"\"\"\n        return A * y\n\n\nRunning the Solution\n--------------------\n\nTo solve the current ODE using the current options, select the \"Run\" option from the \"Simulation\" menu.\nIf the options are all valid, and all mandatory options have been specified, the solution is run and\nboth the chart (see above) and the data table will be updated as each point is added to the solution.\n\nAn example of the data table is hown below:\n\n.. image:: https://github.com/davewalker5/OdeSolver/blob/main/docs/images/data_table_tab.png?raw=true\n    :width: 400\n    :alt: Data Table\n\nIf the options are invalid or incomplete when the solution is run, a warning message will be displayed,\nindicating which options have not been specified, and the solution will not run.\n\nExporting Results\n-----------------\n\nOnce the solution has been run, the data can be exported from the \"Export\" option on the \"File\" menu. Supported\nformats are CSV, JSON and XML. If an export option is selected without having run the solution, a warning dialog\nis displayed.\n\nUnit Tests and Coverage\n=======================\n\nTo run the unit tests, a virtual environment should be created, the requirements should be installed using pip and the\nenvironment should be activated.\n\nThe tests can then be run from the command line, at the root of the project folder, as follows:\n\n::\n\n    export PYTHONPATH=`pwd`/src/\n    python -m pytest\n\nThe first command adds the source folder, containing the packages under test, to the PYTHONPATH environment\nvariable so the packages will be found when the tests attempt to import them. The command will need to be modified\nbased on the current operating system.\n\nSimilarly, a coverage report can be generated by running the following commands from the root of the project folder:\n\n::\n\n    export PYTHONPATH=`pwd`/src/\n    python -m pytest --cov=src --cov-branch --cov-report html\n\nThis will create a folder \"htmlcov\" containing the coverage report in HTML format.\n\n\nGenerating Documentation\n========================\n\nTo generate the documentation, a virtual environment should be created, the requirements should be installed\nusing pip and the environment should be activated.\n\nHTML documentation can then be created by running the following commands from the \"docs\" sub-folder:\n\n::\n\n    export PYTHONPATH=`pwd`/../src/\n    make html\n\nThe resulting documentation is written to the docs/build/html folder and can be viewed by opening \"index.html\" in a\nweb browser.\n\n\nDependencies\n============\n\nThe ODE Solver application has dependencies listed in requirements.txt.\n\n\nLicense\n=======\n\nThis software is licensed under the MIT License:\n\nhttps://opensource.org/licenses/MIT\n\nCopyright 2022 David Walker\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the\nSoftware.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavewalker5%2Fodesolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavewalker5%2Fodesolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavewalker5%2Fodesolver/lists"}