{"id":13702749,"url":"https://github.com/sdu-cfei/modest-py","last_synced_at":"2025-10-21T19:45:25.916Z","repository":{"id":22099462,"uuid":"94491468","full_name":"sdu-cfei/modest-py","owner":"sdu-cfei","description":"FMI-compliant Model Estimation in Python","archived":false,"fork":false,"pushed_at":"2022-06-22T19:24:29.000Z","size":9485,"stargazers_count":52,"open_issues_count":3,"forks_count":13,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-29T06:42:41.988Z","etag":null,"topics":["fmi","fmu","genetic-algorithm","optimization","parameter-estimation","pattern-search"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdu-cfei.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-16T01:07:15.000Z","updated_at":"2025-03-27T02:37:43.000Z","dependencies_parsed_at":"2022-08-18T02:40:59.340Z","dependency_job_id":null,"html_url":"https://github.com/sdu-cfei/modest-py","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdu-cfei%2Fmodest-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdu-cfei%2Fmodest-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdu-cfei%2Fmodest-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdu-cfei%2Fmodest-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdu-cfei","download_url":"https://codeload.github.com/sdu-cfei/modest-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252451948,"owners_count":21750008,"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":["fmi","fmu","genetic-algorithm","optimization","parameter-estimation","pattern-search"],"created_at":"2024-08-02T21:00:42.008Z","updated_at":"2025-10-21T19:45:25.828Z","avatar_url":"https://github.com/sdu-cfei.png","language":"Python","funding_links":[],"categories":["FMI 2"],"sub_categories":["Libraries"],"readme":"FMI-compliant Model Estimation in Python\n========================================\n\n.. figure:: /docs/img/modest-logo.png\n   :alt: modestpy\n\n.. figure:: https://github.com/sdu-cfei/modest-py/actions/workflows/python-package.yml/badge.svg?branch=master\n   :alt: unit_test_status\n   :target: https://github.com/sdu-cfei/modest-py/actions/workflows/python-package.yml\n\n.. figure:: https://img.shields.io/pypi/dm/modestpy.svg\n   :alt: downloads\n   :target: https://pypistats.org/packages/modestpy\n\nDescription\n-----------\n\n**ModestPy** facilitates parameter estimation in models compliant with\n`Functional Mock-up Interface \u003chttps://fmi-standard.org/\u003e`__.\n\nFeatures:\n\n- combination of global and local search methods (genetic algorithm, pattern search, truncated Newton method, L-BFGS-B, sequential least squares),\n- suitable also for non-continuous and non-differentiable models,\n- scalable to multiple cores (genetic algorithm from `modestga \u003chttps://github.com/krzysztofarendt/modestga\u003e`_),\n- Python 3.\n\n**Due to time constraints, ModestPy is no longer actively developed. The last system known to work well was Ubuntu 18.04.** \nUnit tests in GitHub Actions are run on Ubuntu 18.04 and Python 3.6/3.7.\nIt does not mean it will not work on other systems, but it is not guaranteed.\nUse Docker (as described below) if you want to run ModestPy on a tested platform.\n\nInstallation with pip (recommended)\n-----------------------------------\n\nIt is now possible to install ModestPy with a single command:\n\n::\n\n    pip install modestpy\n\nAlternatively:\n\n::\n\n    pip install https://github.com/sdu-cfei/modest-py/archive/master.zip\n\nInstallation with conda\n-----------------------\n\nConda is installation is less frequently tested, but should work:\n\n::\n\n   conda config --add channels conda-forge\n   conda install modestpy\n\nDocker\n------------\n\n**Due to time constraints, Modestpy is no longer actively developed.\nThe last system known to work well was Ubuntu 18.04.**\nIf you encounter any issues with running ModestPy on your system (e.g. some libs missing), try using Docker.\n\nI prepared a ``Dockerfile`` and some initial ``make`` commands:\n\n- ``make build`` - build an image with ModestPy, based on Ubuntu 18.04 (tag = ``modestpy``)\n- ``make run`` - run the container (name = ``modestpy_container``)\n- ``make test`` - run unit tests in the running container and print output to terminal\n- ``make bash`` - run Bash in the running container\n\nMost likely you will like to modify ``Dockerfile`` and ``Makefile`` to your needs, e.g. by adding bind volumes with your FMUs.\n\nTest your installation\n----------------------\n\nThe unit tests will work only if you installed ModestPy with conda or cloned the project from GitHub. To run tests:\n\n.. code:: python\n\n    \u003e\u003e\u003e from modestpy.test import run\n    \u003e\u003e\u003e run.tests()\n\nor\n\n::\n\n    cd \u003cproject_directory\u003e\n    python ./bin/test.py\n\n\nUsage\n-----\n\nUsers are supposed to call only the high level API included in\n``modestpy.Estimation``. The API is fully discussed in the `docs \u003cdocs/documentation.md\u003e`__.\nYou can also check out this `simple example \u003c/examples/simple\u003e`__.\nThe basic usage is as follows:\n\n.. code:: python\n\n    from modestpy import Estimation\n\n    if __name__ == \"__main__\":\n        session = Estimation(workdir, fmu_path, inp, known, est, ideal)\n        estimates = session.estimate()\n        err, res = session.validate()\n\nMore control is possible via optional arguments, as discussed in the `documentation\n\u003cdocs/documentation.md\u003e`__.\n\nThe ``if __name__ == \"__main__\":`` wrapper is needed on Windows, because ``modestpy``\nrelies on ``multiprocessing``. You can find more explanation on why this is needed\n`here \u003chttps://docs.python.org/3/library/multiprocessing.html#multiprocessing-programming\u003e`__.\n\n``modestpy`` automatically saves results in the working\ndirectory including csv files with estimates and some useful plots,\ne.g.:\n\n1) Error evolution in combined GA+PS estimation (dots represent switch\n   from GA to PS): |Error-evolution|\n\n2) Visualization of GA evolution: |GA-evolution|\n\n3) Scatter matrix plot for interdependencies between parameters:\n   |Intedependencies|\n\nCite\n----\n\nTo cite ModestPy, please use:\n\n\\K. Arendt, M. Jradi, M. Wetter, C.T. Veje, ModestPy: An Open-Source Python Tool for Parameter Estimation in Functional Mock-up Units, *Proceedings of the American Modelica Conference 2018*, Cambridge, MA, USA, October 9-10, 2018.\n\nThe preprint version of the conference paper presenting ModestPy is available `here\n\u003chttps://findresearcher.sdu.dk:8443/ws/portalfiles/portal/145001430/ModestPy_preprint_2018.pdf\u003e`__. The paper was based on v.0.0.8.\n\nLicense\n-------\n\nCopyright (c) 2017-2019, University of Southern Denmark. All rights reserved.\n\nThis code is licensed under BSD 2-clause license. See\n`LICENSE \u003c/LICENSE\u003e`__ file in the project root for license terms.\n\n.. |Error-evolution| image:: /docs/img/err_evo.png\n.. |GA-evolution| image:: /docs/img/ga_evolution.png\n.. |Intedependencies| image:: /docs/img/all_estimates.png\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdu-cfei%2Fmodest-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdu-cfei%2Fmodest-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdu-cfei%2Fmodest-py/lists"}