#*------------------------------------------------------------------- * 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 is distributed under the terms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. *----------------------------------------------------------------------- * Author: Jonathan Ospino P. * $Id: MultDiv.mso 2012$ *---------------------------------------------------------------------*# using "types"; Model MultDiv ATTRIBUTES Pallete=true; Icon="icon/MultDiv"; Info="== Multiplication/Division block == It takes the input variables and computes the product or division between them. The resulting value is assigned to the output variable"; PARAMETERS Select_operation as Switcher(Valid=["Product","Division"],Default="Product"); VARIABLES in In1 as Real(Brief="First term",PosX=0.5,PosY=0); in In2 as Real(Brief="Second term",PosX=0.5,PosY=1); out Out as Real(Brief="Result is (In1*In2) or (In1/In2)",PosX=1,PosY=0.5,Protected=true); EQUATIONS switch Select_operation case "Product": Out=In1*In2; case "Division": Out=In1/In2; end end