function semiLinear input Real x; input Real positiveSlope; input Real negativeSlope; output Real result; end semiLinear;