Skip to content
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

Asserion error while using Otoole Results #219

Open
vignesh1987 opened this issue Mar 1, 2024 · 5 comments
Open

Asserion error while using Otoole Results #219

vignesh1987 opened this issue Mar 1, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@vignesh1987
Copy link

The Issue

When I use Otoole to create result CSVs, I get an Assertion Error. I thought that this could be because I had hashed out important result variables like ProductionByTechnologyAnnual. However, the error persists even after I run the model with the variables enabled. Any pointers on what the reason could be? I have attached the error log along with the posts.
otoole_results_errorlog.txt

Expected Behavior

I did not expect any assertion error.

Steps To Reproduce

I used GLPSOL to create the *.lp file. I used otoole and ran CBC to create a solution file and then used otoole results to produce the results. Attached my model file and data file for reproduction.
osemosys_processed.txt
data_processed.txt

Log output

No response

Operating System

Windows

What version of otoole are you running?

1.1.2

Possible Solution

The member list on Amply.py does not match in length with some variables. I doubt if this is because I have not enabled any particular result variable that Otoole considers in its default results template. Or maybe there is a mismatch between my config file (result variables) and the result variables enabled in the model file. I will investigate the latter.

Anything else?

No response

@vignesh1987 vignesh1987 added the bug Something isn't working label Mar 1, 2024
@trevorb1
Copy link
Member

trevorb1 commented Mar 1, 2024

Hey @vignesh1987, thanks for reporting the error! :)

Are you able to try running your results command using the non pre-processed data file? (ie. the datafile without the additional MODExTECHNOLOGYperFUELout (and other) sets at the bottom). I believe I ran into a similar error previously, and this was the fix.

While this may solve the issue, we should probably leave this issue open since more people are running into it! Not sure if this bug originates from amply or otoole tho?

@vignesh1987
Copy link
Author

vignesh1987 commented Mar 1, 2024

HI @trevorb1
Thanks for the pointers. I ran it the usual way (without creating the super sets)and it ran smoothly. But this
exploded the running time by an order of 10 (in my case), and the LP file size is 10 times bigger. Will investigate more and get back.

@trevorb1
Copy link
Member

trevorb1 commented Mar 1, 2024

@vignesh1987, sorry, my response may have been unclear! I guess I meant, still run the model with the pre-processed data file, but then in the otoole results conversion use the non-pre-processed data file! Off the top of my head, I believe amply has trouble parsing the pre-processed datafile with the updated sets (but this could be wrong!)

@vignesh1987
Copy link
Author

@trevorb1 : Yes, the assertion error is avoided when using the original data file instead of the pre-processed one. Shall I close this bug, or do we still have this open? May be I can add somewhere in the documentation (as a caveat) about this. This can be a temporary solution.

@trevorb1
Copy link
Member

@vignesh1987, thanks for confirming it works! I agree with you, adding this in the documentation should be enough to close this bug, as the error (I think) originates with amply. Maybe this then gets converted to a new issue of "Cannot parse preprocessed datafiles" which links to amply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants