Skip to content

export a world simulation as json to allow ASSUME-GUI import#705

Draft
jrasko wants to merge 9 commits into
mainfrom
export-simulation-json
Draft

export a world simulation as json to allow ASSUME-GUI import#705
jrasko wants to merge 9 commits into
mainfrom
export-simulation-json

Conversation

@jrasko

@jrasko jrasko commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

Signed-off-by: Jannik raskob@fh-aachen.de

Description

add a json encoder to allow a visualisation of the simulation using assume-gui

Checklist

  • Consent to release this PR's code under the GNU Affero General Public License v3.0

@jrasko
jrasko requested a review from a team December 11, 2025 14:44
@codecov

codecov Bot commented Dec 11, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 21.73913% with 126 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.94%. Comparing base (1413b2f) to head (b4138eb).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
assume/scenario/loader_json.py 18.51% 66 Missing ⚠️
assume/scenario/exporter_json.py 21.05% 60 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #705      +/-   ##
==========================================
- Coverage   81.31%   76.94%   -4.38%     
==========================================
  Files          54       60       +6     
  Lines        8032     8561     +529     
==========================================
+ Hits         6531     6587      +56     
- Misses       1501     1974     +473     
Flag Coverage Δ
pytest 76.94% <21.73%> (-4.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maurerle maurerle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do like the idea but wait to merge this until we have the current release out.
We probably also need to have a json importer?

@jrasko

jrasko commented Dec 12, 2025

Copy link
Copy Markdown
Contributor Author

I do like the idea but wait to merge this until we have the current release out. We probably also need to have a json importer?

We currently have the json importer in the assume-gui part of the framework. I'd like to also move the import logic in this repository, so that it is closer to the code and can adjusted easier if the code changes.

@jrasko
jrasko requested a review from maurerle December 12, 2025 09:23
@maurerle
maurerle marked this pull request as draft December 12, 2025 14:01
@jrasko
jrasko force-pushed the export-simulation-json branch 3 times, most recently from c97d85a to 1c7929f Compare December 12, 2025 15:13
@maurerle
maurerle force-pushed the export-simulation-json branch 4 times, most recently from baf69bb to b4138eb Compare December 16, 2025 10:56
@gugrimm

gugrimm commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

I saw that you import and export 'max_soc'. This is ok, but please note the meaning changed and this needs to be adapted here too. max_soc previously meant the amount of energy a storage can contain in MWh. We now have max_soc and min_soc for representation of operational limits and both are between 0 and 1. The amount of energy a storage can contain (size, capacity) is now called 'capacity'.

jrasko and others added 9 commits February 4, 2026 15:01
Signed-off-by: Jannik <raskob@fh-aachen.de>
Signed-off-by: Jannik <raskob@fh-aachen.de>
Signed-off-by: Jannik <raskob@fh-aachen.de>
Signed-off-by: Jannik <raskob@fh-aachen.de>
Signed-off-by: Jannik <raskob@fh-aachen.de>
Signed-off-by: Jannik <raskob@fh-aachen.de>
* initialize unit-market connections
* do not use names as ids
* generate ids randomly
* map all unit attributes
* infer lambda_function, unit type and strategy correctly
* use correct ids for connections

Signed-off-by: Jannik <raskob@fh-aachen.de>
remove scenario from top init
@jrasko
jrasko force-pushed the export-simulation-json branch from b4138eb to 8282175 Compare February 4, 2026 14:02
@maurerle maurerle mentioned this pull request Feb 24, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants