10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.
###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
# Revision 1.36 1996/11/03 21:19:02 peterg
# Recursice generation of Constitutive Relationship files.
#
## Revision 1.35 1996/11/02 10:19:19 peterg
## Constitutive Relationship generation from lbl file
##
## Revision 1.34 1996/11/01 13:34:35 peterg
|
>
>
>
>
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.
###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.37 1996/11/09 18:47:46 peterg
## Added new copy command (using find).
## More documaentation stuff.
##
# Revision 1.36 1996/11/03 21:19:02 peterg
# Recursice generation of Constitutive Relationship files.
#
## Revision 1.35 1996/11/02 10:19:19 peterg
## Constitutive Relationship generation from lbl file
##
## Revision 1.34 1996/11/01 13:34:35 peterg
|
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
exit
fi
# Clean up
if [ "$1" = "clean" ] && [ "$2" = "" ]; then
echo 'Removing all generated files for all systems'
rm -f *.log mtt_info.txt warning.txt
rm -f *_abg.m *_args.* *_cr.r
rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.* *_sub.sh
rm -f *_dae*.* *_cse.* *_ode*.* *_obs.* *_rfe.* *_ss.*
rm -f *_dm.* *_csm.* *_sm.* *_tf.* *_sr*.* *_ir*.* *_*fr.*
rm -f *_numpar.m
rm -f mtt_error.txt mtt_info.txt
exit
fi
# Clean up named system
if [ "$2" = "clean" ] && [ "$3" = "" ]; then
echo 'Removing all generated files for system ' $1
rm -f *.log mtt_info.txt warning.txt
rm -f $1_abg.m $1_args.* $1_cr.r
rm -f $1_rbg.* $1_cmp.* $1_fig.fig $1*_*cbg.* $1*_ese.* $1_def.* $1_sub.sh
rm -f $1_dae*.* $1_cse.* $1_ode*.* $1_obs.* $1_rfe.* $1_ss.*
rm -f $1_dm.* $1_csm.* $1_sm.* $1_tf.* $1_sr*.* $1_ir*.* $1_*fr.*
rm -f $1_numpar.m
rm -f mtt_error.txt mtt_info.txt
exit
fi
|
|
|
|
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
exit
fi
# Clean up
if [ "$1" = "clean" ] && [ "$2" = "" ]; then
echo 'Removing all generated files for all systems'
rm -f *.log mtt_info.txt warning.txt
rm -f *_abg.m *_abg.ps *_args.* *_cr.r
rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.* *_sub.sh
rm -f *_dae*.* *_cse.* *_ode*.* *_obs.* *_rfe.* *_ss.*
rm -f *_dm.* *_csm.* *_sm.* *_tf.* *_sr*.* *_ir*.* *_*fr.*
rm -f *_numpar.m
rm -f mtt_error.txt mtt_info.txt
exit
fi
# Clean up named system
if [ "$2" = "clean" ] && [ "$3" = "" ]; then
echo 'Removing all generated files for system ' $1
rm -f *.log mtt_info.txt warning.txt
rm -f $1_abg.m $1_abg.ps $1_args.* $1_cr.r
rm -f $1_rbg.* $1_cmp.* $1_fig.fig $1*_*cbg.* $1*_ese.* $1_def.* $1_sub.sh
rm -f $1_dae*.* $1_cse.* $1_ode*.* $1_obs.* $1_rfe.* $1_ss.*
rm -f $1_dm.* $1_csm.* $1_sm.* $1_tf.* $1_sr*.* $1_ir*.* $1_*fr.*
rm -f $1_numpar.m
rm -f mtt_error.txt mtt_info.txt
exit
fi
|
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
if [ -n "$file_exists" ]; then
if [ "$quiet" != "quiet" ]; then
echo $2_abg.fig exists already - no action taken
fi
else
path_name=$3
if [ "$path_name" = "" ]; then
path_name=$MTTPATH/examples
fi
echo Copying system $2 to here
find $path_name -name "$2_*.*" -exec cp {} . \;
fi
exit
fi
# Save up the argument list in a file; but only if argument has changed
ARGS=$4;
cat > $1_args.new <<EOF
$ARGS
EOF
DIFF=`diff -bq $1_args.m $1_args.new 2>/dev/null`
if [ -n "$DIFF" ]; then
|
|
>
>
>
>
>
|
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
|
if [ -n "$file_exists" ]; then
if [ "$quiet" != "quiet" ]; then
echo $2_abg.fig exists already - no action taken
fi
else
path_name=$3
if [ "$path_name" = "" ]; then
path_name=$MTTPATH/lib/examples
fi
echo Copying system $2 to here
find $path_name -name "$2_*.*" -exec cp {} . \;
fi
exit
fi
# Save up the argument list in a file; but only if argument has changed
ARGS=$4;
#DIFF doesn't like empty files - so put a blank if empty
if [ -z $ARGS ]; then
ARGS=' ';
fi
cat > $1_args.new <<EOF
$ARGS
EOF
DIFF=`diff -bq $1_args.m $1_args.new 2>/dev/null`
if [ -n "$DIFF" ]; then
|
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
|
$1_ode.r: $1_cse.r $1_def.r $1_sympar.r
cse2ode_r $1; tidy $1_ode.r
$1_ode.m: $1_def.r $1_ode.r $1_sympar.r
ode_r2m $1; matlab_tidy $1_ode.m; matlab_tidy $1_odeo.m
$1_ode.tex: $1_ode.r $1_sympar.r $1_simp.r
ode_r2tex $1; latex_tidy $1_ode.tex
#REPRESENTATION obs observer equations (r)
#REPRESENTATION obs observer equations (m)
#REPRESENTATION obs observer equations (tex)
#REPRESENTATION obs observer equations (view)
#REPRESENTATION obs observer equations (ps)
#Observer functions for GPC
$1_obs.r: $1_ode.r $1_def.r $1_sympar.r
ode2obs_r $1; tidy $1_obs.r
$1_obs.m: $1_def.r $1_obs.r $1_sympar.r
obs_r2m $1; matlab_tidy $1_obs.m
$1_obs.tex: $1_obs.r $1_sympar.r $1_simp.r
obs_r2tex $1; latex_tidy $1_obs.tex
|
|
|
|
|
|
|
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
|
$1_ode.r: $1_cse.r $1_def.r $1_sympar.r
cse2ode_r $1; tidy $1_ode.r
$1_ode.m: $1_def.r $1_ode.r $1_sympar.r
ode_r2m $1; matlab_tidy $1_ode.m; matlab_tidy $1_odeo.m
$1_ode.tex: $1_ode.r $1_sympar.r $1_simp.r
ode_r2tex $1; latex_tidy $1_ode.tex
#REPRESENTATION obs observer equations for CGPC (r)
#REPRESENTATION obs observer equations for CGPC (m)
#REPRESENTATION obs observer equations for CGPC (tex)
#REPRESENTATION obs observer equations for CGPC (view)
#REPRESENTATION obs observer equations for CGPC (ps)
#Observer functions for GPC
$1_obs.r: $1_ode.r $1_def.r $1_sympar.r
ode2obs_r $1; tidy $1_obs.r
$1_obs.m: $1_def.r $1_obs.r $1_sympar.r
obs_r2m $1; matlab_tidy $1_obs.m
$1_obs.tex: $1_obs.r $1_sympar.r $1_simp.r
obs_r2tex $1; latex_tidy $1_obs.tex
|