1 |
REQUIRE "system.a4l"; |
2 |
(* => system.a4l, basemodel.a4l *) |
3 |
PROVIDE "z-indirect.a4c"; |
4 |
(* |
5 |
* This file is part of the ASCEND Modeling Library and is released |
6 |
* under the GNU Public License as described at the end of this file. |
7 |
* |
8 |
* Use of this module requires an empty ASCEND system. |
9 |
*) |
10 |
|
11 |
MODEL testindirect; |
12 |
(* |
13 |
NOTES 'test' SELF { |
14 |
This test compilation of indirectly indexed sparse arrays and |
15 |
sparse arrays of relations. |
16 |
} |
17 |
END NOTES; |
18 |
*) |
19 |
n,m[1..n] IS_A integer_constant; |
20 |
m[2] :==2; |
21 |
x IS_A generic_real; |
22 |
FOR i IN [1..3] CREATE |
23 |
p[m[i]] IS_A real; |
24 |
q[m[i]]: x = 1; |
25 |
END FOR; |
26 |
m[3] :==m[1]-2; |
27 |
m[1] :==n; |
28 |
n:==3; |
29 |
END testindirect; |
30 |
|
31 |
|
32 |
(* |
33 |
* z-indirect.a4c |
34 |
* by Benjamin Allan |
35 |
* Part of the ASCEND Library |
36 |
* $Date: 1998/06/17 19:39:37 $ |
37 |
* $Revision: 1.3 $ |
38 |
* $Author: mthomas $ |
39 |
* $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/z-indirect.a4c,v $ |
40 |
* |
41 |
* This file is part of the ASCEND Modeling Library. |
42 |
* |
43 |
* Copyright (C) 1997 Carnegie Mellon University |
44 |
* |
45 |
* The ASCEND Modeling Library is free software; you can redistribute |
46 |
* it and/or modify it under the terms of the GNU General Public |
47 |
* License as published by the Free Software Foundation; either |
48 |
* version 2 of the License, or (at your option) any later version. |
49 |
* |
50 |
* The ASCEND Modeling Library is distributed in hope that it will be |
51 |
* useful, but WITHOUT ANY WARRANTY; without even the implied |
52 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
53 |
* See the GNU General Public License for more details. |
54 |
* |
55 |
* You should have received a copy of the GNU General Public License |
56 |
* along with the program; if not, write to the Free Software |
57 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check |
58 |
* the file named COPYING. |
59 |
*) |