Applying Genetic Algorithm to Minimize Power Loss and Establish Voltage Control