Last change
on this file since 1 was
1,
checked in by Rafael de Pelegrini Soares, 16 years ago
|
Initial import of the library
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
883 bytes
|
Line | |
---|
1 | #*--------------------------------------------------------------------- |
---|
2 | * This file is property of the author and cannot be used, copyed |
---|
3 | * or modified without permission. |
---|
4 | * |
---|
5 | * Copyright (C) 2002-2005 the author |
---|
6 | *---------------------------------------------------------------------- |
---|
7 | * Author: Rafael de Pelegrini Soares |
---|
8 | * $Id: sample_if.mso 1 2006-06-20 17:33:53Z rafael $ |
---|
9 | *---------------------------------------------------------------------- |
---|
10 | * |
---|
11 | * EMSO sample file. |
---|
12 | * |
---|
13 | * FlowSheet showing how to use the 'if' conditional. |
---|
14 | * |
---|
15 | *-------------------------------------------------------------------*# |
---|
16 | |
---|
17 | FlowSheet TestIF |
---|
18 | VARIABLES |
---|
19 | y as Real(Lower = -2); |
---|
20 | x as Real; |
---|
21 | z as Real; |
---|
22 | |
---|
23 | EQUATIONS |
---|
24 | if x < 1 then |
---|
25 | diff(y) = 1 / "s"; |
---|
26 | z = 3; |
---|
27 | else |
---|
28 | diff(y) = - 1 / "s"; |
---|
29 | if y < 1 then |
---|
30 | z = x + y; |
---|
31 | else |
---|
32 | z = 10; |
---|
33 | end |
---|
34 | end |
---|
35 | |
---|
36 | diff(x) = y / "s"; |
---|
37 | |
---|
38 | INITIAL |
---|
39 | x = 0; |
---|
40 | y = 0; |
---|
41 | |
---|
42 | OPTIONS |
---|
43 | time = [0:0.01:10]; |
---|
44 | outputLevel = "medium"; |
---|
45 | end |
---|
46 | |
---|
Note: See
TracBrowser
for help on using the repository browser.