An implementation of Kreisselmeier Steinhauser smooth maximum. This does not return the exact value of x1 or x2, only an approximation, though the error diminishes as the transition region is exited.
Sources:
function smoothMax_exponential extends TRANSFORM.Icons.Function; import Modelica.Math; input Real x1 "First argument of smooth max operator"; input Real x2 "Second argument of smooth max operator"; input Real dx "Approximate difference between x1 and x2, below which regularization starts"; output Real y "Result of smooth max operator"; end smoothMax_exponential;