Maximum and Minimum variables in model