/[ascend]/trunk/models/johnpye/testcmslv2.a4c
ViewVC logotype

Annotation of /trunk/models/johnpye/testcmslv2.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 808 - (hide annotations) (download) (as text)
Fri Aug 4 09:08:16 2006 UTC (14 years, 2 months ago) by johnpye
File MIME type: text/x-ascend
File size: 756 byte(s)
Some debug output in cond_config.
Working on adding PyGTK GUI functionality to show inactive relaitons.
1 johnpye 807 REQUIRE "atoms.a4l";
2    
3     (*
4     Model an even simpler CMSlv model
5    
6     ^
7 johnpye 808 1 + .
8     | .'
9     | .'
10     |.'
11 johnpye 807 <-+------*------+->
12 johnpye 808 -1 .-'`| 1
13     ,-'` + -1/2
14     |
15 johnpye 807 *)
16     MODEL testcmslv2;
17     x IS_A factor;
18     y IS_A factor;
19    
20     rhs: y = x;
21 johnpye 808 lhs: y = -0.5*x;
22 johnpye 807
23     CONDITIONAL
24     ispos: x > 0;
25     END CONDITIONAL;
26    
27     isposp IS_A boolean_var;
28     isposp == SATISFIED(ispos);
29    
30     WHEN (isposp)
31     CASE TRUE:
32     USE rhs;
33     CASE FALSE:
34     USE lhs;
35     END WHEN;
36    
37     METHODS
38     METHOD default_self;
39     ispos := TRUE;
40     y := 0.0;
41     x := 0.0;
42     END default_self;
43    
44     METHOD values;
45     x := 3;
46     END values;
47    
48     METHOD specify;
49     FIX x;
50     END specify;
51    
52     METHOD on_load;
53     RUN default_self; RUN values; RUN specify;
54     END on_load;
55    
56     END testcmslv2;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22