electrical demand calculation