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.49 1996/12/19 19:55:22 peterg
## Version 2.2 -- Linux.
##
## Revision 1.48 1996/12/07 21:33:52 peterg
## Changed _input file to give unit step on ALL inputs
##
## Revision 1.47 1996/12/07 20:50:16 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.50 1996/12/21 19:46:52 peterg
## Set to 2.2++
## Changed \* --> \\* in rbg_fig2m.awk
##
## Revision 1.49 1996/12/19 19:55:22 peterg
## Version 2.2 -- Linux.
##
## Revision 1.48 1996/12/07 21:33:52 peterg
## Changed _input file to give unit step on ALL inputs
##
## Revision 1.47 1996/12/07 20:50:16 peterg
|
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
288
289
|
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 *_sympar.r
rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.*
rm -f *_sub.sh *_type.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 $1_sympar.r
rm -f $1_rbg.* $1_cmp.* $1_fig.fig $1*_*cbg.* $1*_ese.* $1_def.*
rm -f $1_sub.sh $1_type.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
# Invoke explicit requests for modification
if [ "$2" = "abg" ] && [ "$3" = "fig" ]; then
echo Editing $1_$2.$3
|
|
|
|
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
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 *_sympar.r
rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.*
rm -f *_sub.sh *_type.sh
rm -f *_dae*.* *_cse.* *_ode*.* *_obs.* *_rfe.* *_ss.*
rm -f *_dm.* *_csm.* *_sm.* *_tf.* *_sr*.* *_ir*.* *_*fr.*
rm -f *_numpar.m *_numpar.c
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 $1_sympar.r
rm -f $1_rbg.* $1_cmp.* $1_fig.fig $1*_*cbg.* $1*_ese.* $1_def.*
rm -f $1_sub.sh $1_type.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 $1_numpar.c
rm -f mtt_error.txt mtt_info.txt
exit
fi
# Invoke explicit requests for modification
if [ "$2" = "abg" ] && [ "$3" = "fig" ]; then
echo Editing $1_$2.$3
|
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
|
cat $MTTPATH/trans/m/rcs_header.txt; \
echo 'END;'; \
)> $1_simp.r
#SUMMARY numpar numerical parameter declaration (m)
$1_numpar.m: $1_sympar.r $1_params.m
sympar2numpar_r2m $1
#SUMMARY params numerical parameter setting (m)
$1_params.m:
echo Creating $1_params.m
( \
echo "%% Parameter file for system $1 ($1_params.m)"; \
echo "%% This file provides the system params for simulation:";\
cat $MTTPATH/trans/m/rcs_header.txt; \
echo; \
)> $1_params.m
#SUMMARY params symbolic parameter setting (r)
$1_params.r:
echo Creating $1_params.r
( \
echo "%% Parameter file for system $1 ($1_params.r)"; \
echo "%% This file provides symbolic parameters for simplification";\
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
|
cat $MTTPATH/trans/m/rcs_header.txt; \
echo 'END;'; \
)> $1_simp.r
#SUMMARY numpar numerical parameter declaration (m)
$1_numpar.m: $1_sympar.r $1_params.m
sympar2numpar_r2m $1
#SUMMARY numpar numerical parameter declaration (c)
$1_numpar.c: $1_sympar.r $1_params.c
sympar2numpar_r2c $1
#SUMMARY params numerical parameter setting (m)
$1_params.m:
echo Creating $1_params.m
( \
echo "%% Parameter file for system $1 ($1_params.m)"; \
echo "%% This file provides the system params for simulation:";\
cat $MTTPATH/trans/m/rcs_header.txt; \
echo; \
)> $1_params.m
#SUMMARY params numerical parameter setting (c)
$1_params.c:
echo Creating $1_params.c
( \
echo '/*'; \
echo "%% Parameter file for system $1 ($1_params.c)"; \
echo "%% This file provides the system params for simulation:";\
echo '*/'; \
echo 'void $1_params()'; \
echo '{'; \
echo '};'; \
)> $1_params.c
#SUMMARY params symbolic parameter setting (r)
$1_params.r:
echo Creating $1_params.r
( \
echo "%% Parameter file for system $1 ($1_params.r)"; \
echo "%% This file provides symbolic parameters for simplification";\
|
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
|
$1_cse.m: $1_def.r $1_cse.r $1_sympar.r $1_numpar.m
cse_r2m $1; matlab_tidy $1_cse.m
$1_cse.tex: $1_cse.r $1_sympar.r $1_simp.r
cse_r2tex $1; latex_tidy $1_cse.tex
#SUMMARY ode ordinary differential equations (r)
#SUMMARY ode ordinary differential equations (m)
#SUMMARY ode ordinary differential equations (tex)
#SUMMARY ode ordinary differential equations (view)
#SUMMARY ode ordinary differential equations (ps)
#Ordinary differential equations
$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 $1_numpar.m
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
#SUMMARY obs observer equations for CGPC (r)
#SUMMARY obs observer equations for CGPC (m)
#SUMMARY obs observer equations for CGPC (tex)
#SUMMARY obs observer equations for CGPC (view)
|
>
>
>
|
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
|
$1_cse.m: $1_def.r $1_cse.r $1_sympar.r $1_numpar.m
cse_r2m $1; matlab_tidy $1_cse.m
$1_cse.tex: $1_cse.r $1_sympar.r $1_simp.r
cse_r2tex $1; latex_tidy $1_cse.tex
#SUMMARY ode ordinary differential equations (r)
#SUMMARY ode ordinary differential equations (m)
#SUMMARY ode ordinary differential equations (c)
#SUMMARY ode ordinary differential equations (tex)
#SUMMARY ode ordinary differential equations (view)
#SUMMARY ode ordinary differential equations (ps)
#Ordinary differential equations
$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 $1_numpar.m
ode_r2m $1; matlab_tidy $1_ode.m; matlab_tidy $1_odeo.m
$1_ode.c: $1_def.r $1_ode.r $1_sympar.r $1_numpar.c
ode_r2c $1
$1_ode.tex: $1_ode.r $1_sympar.r $1_simp.r
ode_r2tex $1; latex_tidy $1_ode.tex
#SUMMARY obs observer equations for CGPC (r)
#SUMMARY obs observer equations for CGPC (m)
#SUMMARY obs observer equations for CGPC (tex)
#SUMMARY obs observer equations for CGPC (view)
|