-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TechnologyToStorage and TechnologyFromStorage - Mode of operation not correctly assigned #80
Comments
Hi @EmiFej - can you also post the structure of the model file? I'm wondering if the file is read in wrongly because of the way the parameter is formatted. Also wonder if you can compare the structure of the code for something like InputActivityRatio vs. TechToStorage? |
Could you provide a minimal reproducible example that reproduces this bug? Isolating the pieces in the data file that causes this behaviour will make solving the bug easier. |
Hi @tniet , everything else seems to be working fine from what I can see. The structure follows the Momani format, but the data file is written using a text editor, and not Momani. The input and output activity ratios are written differently from the TechnologyToStorage and TechnologyFromStorage. In the picture below, we see the TechnologyToStorage which connects the river segment BACWTRS6DR to the storage it fills up BASVISEG. As the picture suggests, the river segment should feed water into the storage in mode of operation 1, and it fills it up with 1 unit of water (lines 17796-17798). However, when plotting the technologies and their respective modes of operation from the Pre_processing script, the output is shown as this: tech mode are RSPHYDMHI5 2 The script treats the storage, in this case BASVISEG, as a mode of operation connected to the technology, in this case the river segment BACWTRS6DR So the final output from the preprocess file gives output that look like this: Instead of this for example, a technology without storage: |
Hi @EmiFej - I think you've clearly identified the problem. The format you use for TechnologyToStorage is read in incorrectly. This is likely the format you use rather than the script being incorrect. I suggest you install MoManI and enter some data into TechnologyToStorage, download the executable and check what format MoManI produces in its data file. If you replicate this format the script will likely work correctly. |
Hi @tniet. I asked a colleague to provide me with a simple model that has been created using MoManI. It was a simple use case developed for the EMB3RS project. The TechnologyToStorage and TechnologyFromStorage seem to be written out just as they are in my model. Using this new data file, the same issue appears as in my model. When plotting out "technology and mode", it gives technology and storage. And when you write out "storage and mode", it does it correctly, as in my case. Picture attached below. The SINK1 is a technology, while STOA is the storage. Data file attached: |
Hey @EmiFej - it's clear that the script is reading this format incorrectly. You'll have to dig into the script and see how it reads things in, and what changes you can make to have it read those parameters correctly. You might also want to ask @abhishek0208 as he's the original author of the script and might be able to give you a quick fix. |
I am using @tniet's model file with storage equations to run my model. When trying to run the pre-processing script, I encounter an issue where instead of returning the technology and mode of operation for technologies which are connected to the storage via TechnologyToStorage and TechnologyFromStorage, the script instead returns Technology and Storage. The model has 2 modes of operation [1, 2]. Below is an example, where RSCWTRS1UC is the technology connected to the RSSUVAC1 storage via TechnologyToStorage:
When I added the print statements below (for storage, values, and storage_to) it all seems fine.
However, when I add a print statement to:
the output from the picture above appears and it is clear that something is not working. Any suggestions as to why this is happening and how I could potentially solve it would be highly appreciated.
The text was updated successfully, but these errors were encountered: