#*--------------------------------------------------------------------- * This file is property of the author and cannot be used, copyed * or modified without permission. * * Copyright (C) 2002-2005 the author *---------------------------------------------------------------------- * Author: Rafael de Pelegrini Soares * $Id: sample_if.mso 1 2006-06-20 17:33:53Z rafael $ *---------------------------------------------------------------------- * * EMSO sample file. * * FlowSheet showing how to use the 'if' conditional. * *-------------------------------------------------------------------*# FlowSheet TestIF VARIABLES y as Real(Lower = -2); x as Real; z as Real; EQUATIONS if x < 1 then diff(y) = 1 / "s"; z = 3; else diff(y) = - 1 / "s"; if y < 1 then z = x + y; else z = 10; end end diff(x) = y / "s"; INITIAL x = 0; y = 0; OPTIONS time = [0:0.01:10]; outputLevel = "medium"; end