I'm writing a program that downloads PGE Green Button data and calculates the bill for each of the available tariff options, with consideration of net-metering, etc. I've yet to find any detailed algorithm published on how exactly PGE performs its bill calculations. If anyone has such a...