Last change
on this file since 8 was
1,
checked in by Rafael de Pelegrini Soares, 17 years ago

Initial import of the library


Property svn:eolstyle set to
native

Property svn:keywords set to
Id

File size:
921 bytes

Line  

1  #* 

2  * Model HiLoSelect 

3  * 

4  *  Inputs 

5  *  Two different input signals 

6  * 

7  *  Outputs 

8  *  One output signal 

9  * 

10  *  Assumptions 

11  * 

12  * 

13  * Author: Tiago Osório 

14  * $Id: HiLoSelect.mso 1 20060620 17:33:53Z rafael $ 

15  **# 

16  

17  using "types"; 

18  

19  Model HiLoSelect 

20  

21  PARAMETERS 

22  select as Real (Brief="HiLoSelect option: (1) output=higher input, (0) output=lower input"); 

23  

24  VARIABLES 

25  input1 as Real (Brief="input signal 1"); 

26  input2 as Real (Brief="input signal 2"); 

27  output as Real (Brief="output signal"); 

28  

29  EQUATIONS 

30  

31  if ((select>0 and input1 > input2) or (select<1 and input2>input1)) then 

32  "Calculate output" 

33  output = input1; 

34  else 

35  "Calculate output" 

36  output = input2; 

37  end 

38  

39  INITIAL 

40  

41  end 

Note: See
TracBrowser
for help on using the repository browser.