treats additional generators as negative demand

also improved some error checking and added more cases