Differences From Artifact [f8d94a9670]:

To Artifact [fe2612a1bc]:


12
13
14
15
16
17
18




19
20
21
22
23
24
25
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







+
+
+
+








###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$
## Revision 1.32  2002/04/28 18:41:26  geraint
## Fixed [ 549658 ] awk should be gawk.
## Replaced calls to awk with call to gawk.
##
## Revision 1.31  2001/07/13 04:54:04  geraint
## Branch merge: numerical-algebraic-solution back to main.
##
## Revision 1.30  2001/07/12 04:02:53  gawthrop
## Now fixes multiports for input and output as well as state
##
## Revision 1.29.2.1  2001/06/26 22:29:05  geraint
161
162
163
164
165
166
167
168

169
170

171
172

173
174
175
176
177
178
179
165
166
167
168
169
170
171

172
173

174
175

176
177
178
179
180
181
182
183







-
+

-
+

-
+







echo Creating $structurefile

# Use matrix manipulation to accomplish the transformation
# This creates an ese file for every subsystem.
$MATRIX << EOF > cbg2ese_m2r.log 2>mtt_error.txt

infofile = "$infofile";;
infofilenum = fopen(infofile,"w");
infofilenum = fopen(infofile,"wt");
structurefile = "$structurefile";;
structurefilenum = fopen(structurefile,"w");
structurefilenum = fopen(structurefile,"wt");
deffile = "$1_def.r";
deffilenum = fopen(deffile,"w");
deffilenum = fopen(deffile,"wt");

system_name = "$1";
system_type = "";
system_cr = "";
system_args = "";
full_name = "";
full_name_repetition = "";
226
227
228
229
230
231
232
233

234
235
236
237
238
239
240
230
231
232
233
234
235
236

237
238
239
240
241
242
243
244







-
+







Nuc=`mtt_getsize -internal $1 u`

# echo Ny $Ny Nu $Nu Nx $Nx Nui $Nui Nuc $Nuc

## Definitions file
octave -q <<EOF
  deffile = '$1_def.r';
  deffilenum = fopen(deffile,'w');
  deffilenum = fopen(deffile,'wt');

  ## Set up the structure vector
  structure = zeros(1,7);  
  structure(1) = $Nx; # States
  structure(2) = $Nz; # Non-states
  structure(3) = $Nu; # Inputs
  structure(4) = $Ny; # Outputs

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]