|
| 1 | +====================== |
| 2 | +OpenSPP Simulation API |
| 3 | +====================== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:341a99619ee4fc6dc0669b84803de47b0cf14405275a60681952e5cf1eb6025f |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Production/Stable |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html |
| 18 | + :alt: License: LGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OpenSPP%2FOpenSPP2-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_api_v2_simulation |
| 21 | + :alt: OpenSPP/OpenSPP2 |
| 22 | + |
| 23 | +|badge1| |badge2| |badge3| |
| 24 | + |
| 25 | +FastAPI-based REST endpoints for simulation scenario management, |
| 26 | +execution, comparison, and population aggregation. Provides external |
| 27 | +systems (dashboards, mobile apps, third-party tools) programmatic access |
| 28 | +to the simulation and analytics engine. |
| 29 | + |
| 30 | +Key Capabilities |
| 31 | +~~~~~~~~~~~~~~~~ |
| 32 | + |
| 33 | +- CRUD operations on simulation scenarios with entitlement rules |
| 34 | +- Execute simulations and retrieve run results (distribution, fairness, |
| 35 | + geographic data) |
| 36 | +- Compare multiple simulation runs side-by-side with overlap analysis |
| 37 | +- Compute population aggregation with demographic breakdowns via the |
| 38 | + aggregation engine |
| 39 | +- List available demographic dimensions and scenario templates |
| 40 | +- Convert simulation scenarios to real programs |
| 41 | + |
| 42 | +API Endpoints |
| 43 | +~~~~~~~~~~~~~ |
| 44 | + |
| 45 | ++--------+-----------------------------+-----------------------------+ |
| 46 | +| Method | Path | Description | |
| 47 | ++========+=============================+=============================+ |
| 48 | +| GET | ``/simulation/scenarios`` | List scenarios | |
| 49 | ++--------+-----------------------------+-----------------------------+ |
| 50 | +| POST | ``/simulation/scenarios`` | Create scenario | |
| 51 | ++--------+-----------------------------+-----------------------------+ |
| 52 | +| GET | ``/ | Get scenario details | |
| 53 | +| | simulation/scenarios/{id}`` | | |
| 54 | ++--------+-----------------------------+-----------------------------+ |
| 55 | +| PUT | ``/ | Update draft scenario | |
| 56 | +| | simulation/scenarios/{id}`` | | |
| 57 | ++--------+-----------------------------+-----------------------------+ |
| 58 | +| DELETE | ``/ | Archive scenario | |
| 59 | +| | simulation/scenarios/{id}`` | | |
| 60 | ++--------+-----------------------------+-----------------------------+ |
| 61 | +| POST | ``/simula | Mark scenario ready | |
| 62 | +| | tion/scenarios/{id}/ready`` | | |
| 63 | ++--------+-----------------------------+-----------------------------+ |
| 64 | +| POST | ``/simu | Execute simulation | |
| 65 | +| | lation/scenarios/{id}/run`` | | |
| 66 | ++--------+-----------------------------+-----------------------------+ |
| 67 | +| POST | ``/simulation/scenario | Convert to program | |
| 68 | +| | s/{id}/convert-to-program`` | | |
| 69 | ++--------+-----------------------------+-----------------------------+ |
| 70 | +| GET | ``/simulation/runs`` | List runs | |
| 71 | ++--------+-----------------------------+-----------------------------+ |
| 72 | +| GET | ``/simulation/runs/{id}`` | Get run with optional | |
| 73 | +| | | details | |
| 74 | ++--------+-----------------------------+-----------------------------+ |
| 75 | +| POST | ``/simulation/comparisons`` | Create run comparison | |
| 76 | ++--------+-----------------------------+-----------------------------+ |
| 77 | +| GET | ``/si | Get comparison | |
| 78 | +| | mulation/comparisons/{id}`` | | |
| 79 | ++--------+-----------------------------+-----------------------------+ |
| 80 | +| GET | ``/simulation/templates`` | List scenario templates | |
| 81 | ++--------+-----------------------------+-----------------------------+ |
| 82 | +| POST | ``/aggregation/compute`` | Compute population | |
| 83 | +| | | aggregation | |
| 84 | ++--------+-----------------------------+-----------------------------+ |
| 85 | +| GET | ``/aggregation/dimensions`` | List demographic dimensions | |
| 86 | ++--------+-----------------------------+-----------------------------+ |
| 87 | + |
| 88 | +OAuth Scopes |
| 89 | +~~~~~~~~~~~~ |
| 90 | + |
| 91 | +====================== ==================================== |
| 92 | +Scope Operations |
| 93 | +====================== ==================================== |
| 94 | +``simulation:read`` List/get scenarios, runs, templates |
| 95 | +``simulation:write`` Create/update/archive scenarios |
| 96 | +``simulation:execute`` Run simulations |
| 97 | +``simulation:convert`` Convert scenario to program |
| 98 | +``aggregation:read`` Compute aggregation, list dimensions |
| 99 | +====================== ==================================== |
| 100 | + |
| 101 | +UI Location |
| 102 | +~~~~~~~~~~~ |
| 103 | + |
| 104 | +No standalone menu; API-only module. |
| 105 | + |
| 106 | +Dependencies |
| 107 | +~~~~~~~~~~~~ |
| 108 | + |
| 109 | +``spp_api_v2``, ``spp_simulation``, ``spp_aggregation`` |
| 110 | + |
| 111 | +**Table of contents** |
| 112 | + |
| 113 | +.. contents:: |
| 114 | + :local: |
| 115 | + |
| 116 | +Bug Tracker |
| 117 | +=========== |
| 118 | + |
| 119 | +Bugs are tracked on `GitHub Issues <https://github.com/OpenSPP/OpenSPP2/issues>`_. |
| 120 | +In case of trouble, please check there if your issue has already been reported. |
| 121 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 122 | +`feedback <https://github.com/OpenSPP/OpenSPP2/issues/new?body=module:%20spp_api_v2_simulation%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 123 | + |
| 124 | +Do not contact contributors directly about support or help with technical issues. |
| 125 | + |
| 126 | +Credits |
| 127 | +======= |
| 128 | + |
| 129 | +Authors |
| 130 | +------- |
| 131 | + |
| 132 | +* OpenSPP.org |
| 133 | + |
| 134 | +Maintainers |
| 135 | +----------- |
| 136 | + |
| 137 | +.. |maintainer-jeremi| image:: https://github.com/jeremi.png?size=40px |
| 138 | + :target: https://github.com/jeremi |
| 139 | + :alt: jeremi |
| 140 | +.. |maintainer-gonzalesedwin1123| image:: https://github.com/gonzalesedwin1123.png?size=40px |
| 141 | + :target: https://github.com/gonzalesedwin1123 |
| 142 | + :alt: gonzalesedwin1123 |
| 143 | +.. |maintainer-reichie020212| image:: https://github.com/reichie020212.png?size=40px |
| 144 | + :target: https://github.com/reichie020212 |
| 145 | + :alt: reichie020212 |
| 146 | + |
| 147 | +Current maintainers: |
| 148 | + |
| 149 | +|maintainer-jeremi| |maintainer-gonzalesedwin1123| |maintainer-reichie020212| |
| 150 | + |
| 151 | +This module is part of the `OpenSPP/OpenSPP2 <https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_api_v2_simulation>`_ project on GitHub. |
| 152 | + |
| 153 | +You are welcome to contribute. |
0 commit comments