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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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