/[ascend]/trunk/models/johnpye/extpy/extpytest.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/extpy/extpytest.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 862 - (show annotations) (download) (as text)
Tue Sep 26 13:47:27 2006 UTC (13 years, 10 months ago) by johnpye
File MIME type: text/x-ascend
File size: 591 byte(s)
Some work on the IMPORT handler functionality. Mostly just placeholders at this stage.
1 REQUIRE "atoms.a4l";
2 IMPORT "johnpye/extpy/extpy";
3 IMPORT "extpytest";
4
5 (*
6 A very simple model to illustrate the possibility to accessing a model
7 from an external python script during an interactive ASCEND session.
8 *)
9 MODEL extpytest;
10
11 a IS_A factor;
12 b IS_A factor;
13
14 x_1,y_1 IS_A delta_distance;
15 x_2,y_2 IS_A delta_distance;
16 y_1 = a * x_1 + b;
17 y_2 = a * x_2 + b;
18
19 METHODS
20 METHOD specify;
21 FIX x_1,y_1;
22 FIX x_2,y_2;
23 END specify;
24 METHOD values;
25 x_1 := 0{m};
26 y_1 := 1{m};
27 x_2 := 1{m};
28 y_2 := 0{m};
29 END values;
30 METHOD on_load;
31 RUN reset; RUN values;
32 END on_load;
33
34 END extpytest;

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