Differences From Artifact [906b34eb53]:

To Artifact [0a2c9156c8]:


12
13
14
15
16
17
18







19
20
21
22
23
24
25

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







## Revision 1.29  2001/03/29 19:24:14  gawthrop
## Can now use c representations of crs when using -c option
##
## Revision 1.28  2001/02/05 17:19:52  gawthrop
## Now gives unique names to the states of multiports. Second name
## onwards labeled with port number
##







>
>
>
>
>
>
>







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

###############################################################
## 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).
##
## Revision 1.29  2001/03/29 19:24:14  gawthrop
## Can now use c representations of crs when using -c option
##
## Revision 1.28  2001/02/05 17:19:52  gawthrop
## Now gives unique names to the states of multiports. Second name
## onwards labeled with port number
##
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
  cat $infofile
fi

if [ -z "$partition" ]; then
  ## Don't partition

  # Create the composite ese file
  cat $1_ese.r $1_*_ese.r $1_modpar.r  > $1_ese.tmp 2>> /dev/null

  mv $1_ese.tmp $1_ese.r

  # Zap the sub ese files
  rm -f $1_*_ese.r

  echo "END;" >> $1_ese.r

else # Partition the system

  # Save up the full def file
  mv $1_def.r mtt_all_def.r







|




|







191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
  cat $infofile
fi

if [ -z "$partition" ]; then
  ## Don't partition

  # Create the composite ese file
  mtt_xargs.sh cat "$1_ese.r $1_*_ese.r $1_modpar.r"  > $1_ese.tmp 2>> /dev/null

  mv $1_ese.tmp $1_ese.r

  # Zap the sub ese files
  mtt_xargs.sh "rm -f" "$1_*_ese.r"

  echo "END;" >> $1_ese.r

else # Partition the system

  # Save up the full def file
  mv $1_def.r mtt_all_def.r
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
    for i=1:$Nu
      printf("MTT_%s_uc(%i,1) := %s_1_MTTu%i;\n", "$subsystem", i, "$subsystem", i);
    endfor;
EOF
  ## Subsystems (Only works when no repetitions at this level)
  esefile=${subsystem}_ese.r
  echo Creating $esefile
  cat ${subsystem}_1_ese.r ${subsystem}_1_*_ese.r > $esefile 2> /dev/null
  echo "END;" >> $esefile

  ## Def file for subsystem
  makedef ${subsystem}
  
  echo Creating ${subsystem}_struc.txt
  grep $subsystem < $1_struc.txt > ${subsystem}_struc.txt







|







309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
    for i=1:$Nu
      printf("MTT_%s_uc(%i,1) := %s_1_MTTu%i;\n", "$subsystem", i, "$subsystem", i);
    endfor;
EOF
  ## Subsystems (Only works when no repetitions at this level)
  esefile=${subsystem}_ese.r
  echo Creating $esefile
  mtt_xargs.sh cat "${subsystem}_1_ese.r ${subsystem}_1_*_ese.r" > $esefile 2> /dev/null
  echo "END;" >> $esefile

  ## Def file for subsystem
  makedef ${subsystem}
  
  echo Creating ${subsystem}_struc.txt
  grep $subsystem < $1_struc.txt > ${subsystem}_struc.txt

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