#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. * *---------------------------------------------------------------------- * Model HiLoSelect *----------------------------------------------------------------------- * - Inputs * - Two different input signals * * - Outputs * - One output signal * * *----------------------------------------------------------------------- * Author: Tiago Osório * $Id: HiLoSelect.mso 74 2006-12-08 18:43:02Z paula $ *---------------------------------------------------------------------*# using "types"; Model HiLoSelect PARAMETERS select as Real (Brief="HiLoSelect option: (1) output=higher input, (0) output=lower input"); VARIABLES input1 as Real (Brief="input signal 1"); input2 as Real (Brief="input signal 2"); output as Real (Brief="output signal"); EQUATIONS if ((select>0 and input1 > input2) or (select<1 and input2>input1)) then "Calculate output" output = input1; else "Calculate output" output = input2; end end