Overview
Comment:mtt_xargs.sh eliminates Arg list too long error for large models.
(UNIX xargs does not work if the environment is too large).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/numerical-algebraic-solution | trunk
Files: files | file ages | folders
SHA3-256: 6ec7d47592969ce69c8431e705744b69464ab56d0fd5502a020775ab61ce88c0
User & Date: geraint@users.sourceforge.net on 2001-06-26 22:29:05
Other Links: branch diff | manifest | tags
Context
2001-06-26
23:16:12
Moved from trans directory to bin directory. check-in: a1d300ea5b user: geraint@users.sourceforge.net tags: origin/numerical-algebraic-solution, trunk
22:29:05
mtt_xargs.sh eliminates Arg list too long error for large models.
(UNIX xargs does not work if the environment is too large).
check-in: 6ec7d47592 user: geraint@users.sourceforge.net tags: origin/numerical-algebraic-solution, trunk
01:06:59
Initial guess set to one. check-in: 498c1e0b78 user: geraint@users.sourceforge.net tags: origin/numerical-algebraic-solution, trunk
Changes

Modified mttroot/mtt/bin/trans/cbg2ese_m2r from [93dc7c2cf2] to [80a3e5695c].

12
13
14
15
16
17
18



19
20
21
22
23
24
25

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



## 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
##
## Revision 1.27  2000/12/05 12:09:56  peterg
## Changed function name to name()
##







>
>
>







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

###############################################################
## 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
##
## Revision 1.27  2000/12/05 12:09:56  peterg
## Changed function name to name()
##
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
  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







|




|







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
  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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
    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







|







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
  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

Added mttroot/mtt/bin/trans/mtt_xargs.sh version [0e001e0d54].















>
>
>
>
>
>
>
1
2
3
4
5
6
7
#! /bin/sh

cmd=$1
for arg in $2; do
	eval $cmd $arg
done


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