Added max values to the optimization constraints