A genetic optimization method for dynamic processes