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

[Bug]: Empty index results in nan #166

Open
willu47 opened this issue Apr 20, 2023 · 0 comments
Open

[Bug]: Empty index results in nan #166

willu47 opened this issue Apr 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@willu47
Copy link
Member

willu47 commented Apr 20, 2023

The Issue

If a parameter index in an Excel workbook is empty, otoole writes nan in the CSV or datafile.

For example AccumulatedAnnualDemand tab has following values:

REGION	FUEL	2015		2016
	BJFW3X	76.26378	78.37409
	BJHE3X	0		0
	BJHF3X	0.6906382	0.7178051
	BJLF3X	68.3731818	71.0627049

This is converted to csv as:

REGION,FUEL,YEAR,VALUE
nan,BJFW3X,2015,76.26378,
nan,BJFW3X,2016,78.37409
nan,BJHE3X,2015,0,
nan,BJHE3X,2016,0
nan,BJHF3X,2015,0.6906382,
nan,BJHF3X,2016,0.7178051
nan,BJLF3X,2015,68.3731818,
nan,BJLF3X,2016,71.0627049

Expected Behavior

EITHER

  • Blank indexes should be left blank. For example, I believe it is possible to run GNU MathProg without defining a REGION set
    OR
  • An OtooleDataError should be raised. All rows in a datafile should have data for each index.

Steps To Reproduce

No response

Log output

No response

Operating System

MacOS

What version of otoole are you running?

v1.0.1

Possible Solution

No response

Anything else?

No response

@willu47 willu47 added the bug Something isn't working label Apr 20, 2023
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

1 participant