#*------------------------------------------------------------------- * 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: Integration.mso 2012$ *---------------------------------------------------------------------*# using "types"; Model Integrator ATTRIBUTES Pallete=true; Icon="icon/Integration"; Info="== Integrator== It integrates the value of the input signal with respect to the time. The resulting value is assigned to the output variable."; PARAMETERS Initial_Condition as Real(Brief="Initial value of the integral",Default=0); VARIABLES in In as Real(PosX=0,PosY=0.5,Protected=true); w as Real(Brief="Integral of the input signal",Hidden=true); out Out as Real(PosX=1,PosY=0.5,Protected=true); EQUATIONS Out=w; diff(w)*'s'=In; INITIAL w=Initial_Condition; end