Wind farm optimization with multiple hub heights using gradient-based methods