In designing an optimization experiment, can we consider duration as one of the parameters? (The experiment will be carried out in batch.)

Optimization using response surface methodology.