In a modeling framework for solving systems of differential equations with GEKKO that I am writing I want to calculate the maximum of a parameter (an external forcing) and a