dpinney / omf

The Open Modeling Framework for smart grid cost-benefit analysis.
https://omf.coop
GNU General Public License v2.0
112 stars 60 forks source link

SolarRates Model - "Residential Customers with solar" should accept 0 as input. #317

Closed drdanley closed 9 years ago

drdanley commented 9 years ago

Percent of customers should be input as a percent from 0-100. It is unclear right now whether the program is looking for "0.05" or "5". Also, if you enter "0", the program crashes. This should be a valid input. image

dpinney commented 9 years ago

This was fixed and put in to production. What model are you running? Also, re-run with that variable changed 0.05 -> 5 and tell me what you see.

dpinney commented 9 years ago

0 should be acceptable input. Mannan, up to you to debug. I suspect there's a divide by zero error somewhere. Also, some try/except logic should be added to avoid crashes like this in general.

Tooltip explains to the user what input we're looking for. So no changes needed there.

mannanj commented 9 years ago

The problem was with the solar charges being undefined when dividing by 0% penetration. The solar charge defaults to 0 now if this is the case. Try-except and traceback now also added.