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

Introduce basic sanity checks on input data before model creation #90

Open
ojdo opened this issue Aug 30, 2016 · 2 comments
Open

Introduce basic sanity checks on input data before model creation #90

ojdo opened this issue Aug 30, 2016 · 2 comments
Assignees
Labels
discussion enhancement help wanted validation Issue should be included into validation.py

Comments

@ojdo
Copy link
Contributor

ojdo commented Aug 30, 2016

As the input data specification has grown very big over the years, a set of simple plausibility checks should be added, so that creating a new input file becomes a less frustrating experience.

@ojdo
Copy link
Contributor Author

ojdo commented Aug 30, 2016

Here are some ideas, structured by spreadsheet

Commodity

  • Stock commodities must have a numeric attributes for 'price', 'max' and 'maxperstep'. Attribute 'price' must be finite, while the other two may be infinite.
  • Environmental commodities must have numeric (may be inf) values in attributes 'max' and 'maxperstep'.
  • Emit a (suppressable) warning for all numeric values that are set for Demand and SupIm commodities. They are ignored.

Further thought: Should these basically empty rows point to a bad data model? Essentially, this table could only declare existing (Commodity, Type) tuples and an additional Site-Commodity table could bundle all attributes (including DSM) which are defined over those combinations. Continue this train of thought in another issue, once there is time.

Process

  • All columns must be numeric.
  • Interval checks: 'cap-lo' <= 'cap-up' and 'inst-cap' <= 'cap-up'. Note that 'inst-cap' < 'cap-lo' is allowed (to enforce minimum capacity expansion goals).

Process-Commodity

  • All columns must be numeric.
  • Much more advanced: Calculate an indicator from the (hard to spot, if one is not aware of the startup & partial feature) relationship between 'ratio-min' (if set) and the process properties 'min-fraction' and 'startup-cost'. This could trigger an informational message to STDOUT, listing proportional (process, commodity) combinations with an "easy to understand" (whatever that means) indicator of the process characteristic (e.g. efficiency ranges that are possible).

Transmission

  • All columns must be numeric.
  • Same as for process: checks for 'inst-cap', 'cap-lo', 'cap-up'.
  • Efficiency <= 1. At least emit a STRONG warning if not.

Storage

  • All columns must be numeric.
  • Same as for process: checks for 'inst-cap-c', 'cap-lo-c', 'cap-up-c' and 'inst-cap-p', 'cap-lo-p', 'cap-up-p'.
  • As to efficiency: there might be reasons to have 'eff-in' and 'eff-out' assume "interesting" values. Their product, however, should probably be <= 1. Otherwise, emit a warning.

Demand

  • All columns must be numeric, finite and non-negative.

SupIm

  • All columns must be numeric, non-negative and <= 1.

Buy-Sell-Price

  • All columns must be numeric and bounded (but may be negative).

Hacks

  • 'Global CO2 limit' must be numeric, though may be inf to disable the constraint.

DSM

  • All columns must be numeric.

Please add your thoughts and experiences with funny errors caused by logical glitches in your input files, which you hoped that urbs would have told you about right away!

@lodersky lodersky added enhancement validation Issue should be included into validation.py labels Jun 3, 2019
@lodersky lodersky self-assigned this Jun 3, 2019
@lodersky
Copy link
Contributor

lodersky commented Jun 3, 2019

validation.py already exists. Will be further improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement help wanted validation Issue should be included into validation.py
Projects
None yet
Development

No branches or pull requests

2 participants