Differences From Artifact [0a2c9156c8]:

To Artifact [f8d94a9670]:


12
13
14
15
16
17
18



19
20
21
22
23
24
25

###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$



## 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
## mtt_xargs.sh eliminates Arg list too long error for large models.
## (UNIX xargs does not work if the environment is too large).
##







>
>
>







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

###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$
## 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
## mtt_xargs.sh eliminates Arg list too long error for large models.
## (UNIX xargs does not work if the environment is too large).
##
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
}


get_indices ()
{
  sys=$1
  which=$2
  awk '{if ($1==which) print $2}' which=$which < ${sys}_struc.txt
}

convert_indices ()
{
  sys=$1
  Which="input output state"
  for which in $Which; do







|







249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
}


get_indices ()
{
  sys=$1
  which=$2
  gawk '{if ($1==which) print $2}' which=$which < ${sys}_struc.txt
}

convert_indices ()
{
  sys=$1
  Which="input output state"
  for which in $Which; do
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# Sort the struc file
mv $structurefile junk
sort -k 1,1 -k 2,2n junk >$structurefile

# Relabel states with multiple ports
relabel_multiple_definitions(){
  mv $structurefile junk
  awk '
  BEGIN{
     var_type_index=1;  
     oldname="";
  }
  {
     name=$4;
     newname=name;







|







341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# Sort the struc file
mv $structurefile junk
sort -k 1,1 -k 2,2n junk >$structurefile

# Relabel states with multiple ports
relabel_multiple_definitions(){
  mv $structurefile junk
  gawk '
  BEGIN{
     var_type_index=1;  
     oldname="";
  }
  {
     name=$4;
     newname=name;

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