Coder Social home page Coder Social logo

rl-institut / mvs_eland_api Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 179 KB

This server recieves json input files, build an oemof model and run a simulation, then sends a json file back.

License: GNU Affero General Public License v3.0

Dockerfile 13.00% HTML 23.11% Python 60.23% Shell 3.48% CSS 0.18%

mvs_eland_api's People

Contributors

bachibouzouk avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mvs_eland_api's Issues

No results retrieved by EPA after simulation is run - status: ERROR

There are some examples of energy systems that can be sent to the MVS (no 500 Error), but then no results are received by the EPA and an ERROR is displayed in the status bar. There is an energy system in the testUser account that runs through, so we need to figure out where the issue arises - at EPA side when parsing the inputs, when reading into the MVS, parsing the MVS results into EPA format or on EPA side when parsing the results.

Examples of energy systems in account martha.hoffmann:

Todos:

  • Post screenshots of "network analysis" when executing a simulation
  • Retrieve input data from the "network analysis" for all three scenarios, create json files from it
  • Read the inputs with the EPA-MVS parser and try to execute simulation
  • Post error messages, if any

The json file returned by the api could be zipped to save space

Something along those lines

zipped_file = BytesIO()
with zipfile.ZipFile(zipped_file, 'a', zipfile.ZIP_DEFLATED) as zipped:
csv_data = StringIO()
writer = csv.writer(csv_data, delimiter=',')
writer.writerow(["test", "data"])
csv_data.seek(0)
csv_buffer = csv_data.read()
zipped.writestr(f"test_data.csv", csv_buffer)
zipped_file.seek(0)
response = StreamingResponse(zipped_file, media_type="application/x-zip-compressed")
response.headers["Content-Disposition"] = "attachment; filename=test.zip"

return JSONResponse(content=jsonable_encoder(answer))

MVS fails with EPA inputs - missing key "dispatchable"

One of the scenarios in martha.hoffmann on the EPA online version is the "Warehouse 14" scenario. It terminates with status ERROR.

MVS json request file send from EPA:
warehouse_14.txt

The file can be parsed and initiates the simulation, but one key seems to be missing:

Traceback (most recent call last):
  File "tests/test_benchmark_scenarios.py", line 369, in <module>
    help_execute(file_4)
  File "tests/test_benchmark_scenarios.py", line 361, in help_execute
    run_simulation(dict_values)
  File "d:\pycharmprojects\mvs_eland\src\multi_vector_simulator\server.py", line 95, in run_simulation
    C0.all(dict_values)
  File "d:\pycharmprojects\mvs_eland\src\multi_vector_simulator\C0_data_processing.py", line 78, in all
    C1.check_feedin_tariff_vs_levelized_cost_of_generation_of_production(dict_values)
  File "d:\pycharmprojects\mvs_eland\src\multi_vector_simulator\C1_verification.py", line 189, in check_feedin_tariff_vs_levelized_cost_of_generation_of_production
    dict_values[ENERGY_PRODUCTION][production_asset][DISPATCHABILITY]
KeyError: 'dispatchable'

No keys are indicated to be missing, so I suppose that the issue is within the MVS. It may have to do with some decisions in C0, where dispatchablility might have been attibuted depending on whether or not a file_name was provided for the timeseries.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.