︙ | | | ︙ | |
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.165 1998/07/19 16:00:22 peterg
## Added smx representation
##
## Revision 1.164 1998/07/17 19:45:58 peterg
## Component aliases implemented.
##
## Revision 1.163 1998/07/17 08:27:33 peterg
|
>
>
>
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.
###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.166 1998/07/22 08:37:30 peterg
## Implicit integration now the default - for octave anyway.
##
## Revision 1.165 1998/07/19 16:00:22 peterg
## Added smx representation
##
## Revision 1.164 1998/07/17 19:45:58 peterg
## Component aliases implemented.
##
## Revision 1.163 1998/07/17 08:27:33 peterg
|
︙ | | | ︙ | |
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
|
echo Creating $1_subs.r
( \
echo "%% Reduce substitution statements for system $1 ($1_subs.r)"; \
cat $MTTPATH/trans/m/rcs_header.txt; \
echo 'END;'; \
)> $1_subs.r
#SUMMARY obspar GPC observability function parameters
$1_obspar.r:
echo Creating $1_obspar.r
( \
echo "%% Reduce GPC observability function parameters for system $1 ($1_obspar.r)"; \
cat $MTTPATH/trans/m/rcs_header.txt; \
echo 'MTTGPCNy := 5;'; \
echo 'MTTGPCNu := 0;'; \
|
|
|
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
|
echo Creating $1_subs.r
( \
echo "%% Reduce substitution statements for system $1 ($1_subs.r)"; \
cat $MTTPATH/trans/m/rcs_header.txt; \
echo 'END;'; \
)> $1_subs.r
#SUMMARY obspar GPC observability function parameters (r)
$1_obspar.r:
echo Creating $1_obspar.r
( \
echo "%% Reduce GPC observability function parameters for system $1 ($1_obspar.r)"; \
cat $MTTPATH/trans/m/rcs_header.txt; \
echo 'MTTGPCNy := 5;'; \
echo 'MTTGPCNu := 0;'; \
|
︙ | | | ︙ | |
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
|
echo 'END;'; \
)> $1_obspar.r
#SUMMARY simpar simulation information (txt)
$1_simpar.txt:
echo Creating $1_simpar.txt
( \
echo "%% Simulation parameters for system $1 ($1_simpar.txt)"; \
cat $MTTPATH/trans/m/rcs_header.txt; \
echo 'LAST=10.0'; \
echo 'DT=0.1'; \
echo 'STEPFACTOR=1'; \
echo 'METHOD=Implicit'; \
)> $1_simpar.txt
#SUMMARY simpar simulation information (m)
$1_simpar.m: $1_simpar.txt
echo Creating $1_simpar.m
sed 's/txt/m/'<$1_simpar.txt >$1_simpar.m
#SUMMARY simpar simulation information (h) (c) header file
$1_simpar.h: $1_simpar.txt
simpar_txt2h $1
#SUMMARY numpar numerical parameter declaration (txt) -- default
$1_numpar.txt:
mtt $mtt_switches -q -u $1 sympar txt;
sympar2numpar_txt2txt $1
#SUMMARY numpar numerical parameter declaration (m)
$1_numpar.m: $1_numpar.txt $1_sympar.txt
numpar_txt2m $1
#SUMMARY numpar numerical parameter declaration (c)
$1_numpar.c: $1_numpar.txt $1_sympar.c
txt2c $1 numpar
#SUMMARY input numerical input declaration (txt) -- default
ifeq ($switches,0)
$1_input.txt:
mtt $mtt_switches $1 struc txt;
mtt $mtt_switches $1 ss r;
struc2input_txt2txt $1
endif
ifeq ($switches,1)
$1_input.txt:
mtt $mtt_switches -q -u $1 struc txt;
mtt $mtt_switches $1 ss r;
mtt $mtt_switches -q -u $1 switch txt;
struc2input_txt2txt -s $1
endif
#SUMMARY input numerical input declaration (m)
$1_input.m: $1_input.txt $1_sympar.txt $1_ss.r
input_txt2m $1
#SUMMARY state state declaration (txt) -- default
$1_state.txt:
mtt $mtt_switches $1 struc txt;
mtt $mtt_switches $1 ss r;
struc2state_txt2txt $1
#SUMMARY state state declaration (m)
$1_state.m: $1_state.txt $1_sympar.txt
|
|
>
|
|
|
|
|
|
|
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
|
echo 'END;'; \
)> $1_obspar.r
#SUMMARY simpar simulation information (txt)
$1_simpar.txt:
echo Creating $1_simpar.txt
( \
echo "# Simulation parameters for system $1 ($1_simpar.txt)"; \
echo "# Generated by MTT on" `date`.; \
cat $MTTPATH/trans/rcs_header.sh; \
echo 'LAST=10.0'; \
echo 'DT=0.1'; \
echo 'STEPFACTOR=1'; \
echo 'METHOD="Implicit"'; \
)> $1_simpar.txt
#SUMMARY simpar simulation information (m)
$1_simpar.m: $1_simpar.txt
echo Creating $1_simpar.m
sed 's/txt/m/'<$1_simpar.txt >$1_simpar.m
#SUMMARY simpar simulation information c header file (h)
$1_simpar.h: $1_simpar.txt
simpar_txt2h $1
#SUMMARY numpar numerical parameter declaration -- default (txt)
$1_numpar.txt:
mtt $mtt_switches -q -u $1 sympar txt;
sympar2numpar_txt2txt $1
#SUMMARY numpar numerical parameter declaration (m)
$1_numpar.m: $1_numpar.txt $1_sympar.txt
numpar_txt2m $1
#SUMMARY numpar numerical parameter declaration (c)
$1_numpar.c: $1_numpar.txt $1_sympar.c
txt2c $1 numpar
#SUMMARY input numerical input declaration -- default (txt)
ifeq ($switches,0)
$1_input.txt:
mtt $mtt_switches $1 struc txt;
mtt $mtt_switches $1 ss r;
struc2input_txt2txt $1
endif
ifeq ($switches,1)
$1_input.txt:
mtt $mtt_switches -q -u $1 struc txt;
mtt $mtt_switches $1 ss r;
mtt $mtt_switches -q -u $1 switch txt;
struc2input_txt2txt -s $1
endif
#SUMMARY input numerical input declaration (m)
$1_input.m: $1_input.txt $1_sympar.txt $1_ss.r
input_txt2m $1
#SUMMARY state state declaration -- default (txt)
$1_state.txt:
mtt $mtt_switches $1 struc txt;
mtt $mtt_switches $1 ss r;
struc2state_txt2txt $1
#SUMMARY state state declaration (m)
$1_state.m: $1_state.txt $1_sympar.txt
|
︙ | | | ︙ | |
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
|
ifeq ($documenttype,book)
$1_rep.txt:
dir2rep $1 $dotdot;
else
$1_rep.txt:
echo Creating $1_rep.txt;
( \
echo "# Outline report file for system $1 ($1_rep.txt)"; \
cat $MTTPATH/trans/m/rcs_header.txt; \
echo "mtt $1 abg tex"; \
)> $1_rep.txt
endif
#SUMMARY rbg raw bond graph (m)
#Raw bond graph: fig file to mfile
$1_rbg.m: $1_abg.fig $1_lbl.txt
rbg_fig2m $1
$1_cmp.m: $1_rbg.m
|
<
<
<
<
<
|
|
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
|
ifeq ($documenttype,book)
$1_rep.txt:
dir2rep $1 $dotdot;
else
$1_rep.txt:
makerep_txt $1;
endif
#SUMMARY rbg raw bond graph (m)
#Raw bond graph: fig file to mfile
$1_rbg.m: $1_abg.fig $1_lbl.txt
rbg_fig2m $1
$1_cmp.m: $1_rbg.m
|
︙ | | | ︙ | |
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
|
#SUMMARY ss steady-state equations (r)
#SUMMARY ss steady-state equations (m)
#SUMMARY ss steady-state equations (tex)
#SUMMARY ss steady-state equations (view)
#SUMMARY ss steady-state equations (ps)
#Steady-states
$1_ss.r: $1_def.r $1_sspar.r $1_cr.r $1_cse.r
sspar2ss_r $1; tidy $1_ss.r
$1_ss.m: $1_def.r $1_ss.r $1_numpar.m
ss_r2m $1; matlab_tidy $1_ss.m
$1_ss.tex: $1_def.r $1_ss.r $1_simp.r
ss_r2tex $1; latex_tidy $1_ss.tex
|
|
|
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
|
#SUMMARY ss steady-state equations (r)
#SUMMARY ss steady-state equations (m)
#SUMMARY ss steady-state equations (tex)
#SUMMARY ss steady-state equations (view)
#SUMMARY ss steady-state equations (ps)
#Steady-states
$1_ss.r: $1_def.r $1_sspar.r $1_cr.r $1_ode.r
sspar2ss_r $1; tidy $1_ss.r
$1_ss.m: $1_def.r $1_ss.r $1_numpar.m
ss_r2m $1; matlab_tidy $1_ss.m
$1_ss.tex: $1_def.r $1_ss.r $1_simp.r
ss_r2tex $1; latex_tidy $1_ss.tex
|
︙ | | | ︙ | |
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
|
#SUMMARY sro step response - output (view)
#SUMMARY odes ode solution - state (m)
#SUMMARY odes ode solution - state (dat)
#SUMMARY odes ode solution - state (ps)
#SUMMARY odes ode solution - state (view)
#SUMMARY sms ode (in state matrix form) solution - state & output(c)
#SUMMARY odeso ode solution - output (m)
#SUMMARY odeso ode solution - output (dat)
#SUMMARY odeso ode solution - output for spreadsheet(sdat)
#SUMMARY odeso ode solution - output (ps)
#SUMMARY odeso ode solution - output (view)
#SUMMARY daes dae solution - state (m)
#SUMMARY daes dae solution - state (dat)
#SUMMARY daes dae solution - state (ps)
#SUMMARY daes dae solution - state (view)
|
|
|
|
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
|
#SUMMARY sro step response - output (view)
#SUMMARY odes ode solution - state (m)
#SUMMARY odes ode solution - state (dat)
#SUMMARY odes ode solution - state (ps)
#SUMMARY odes ode solution - state (view)
#SUMMARY sms ode (in state matrix form) solution - state & output (c)
#SUMMARY odeso ode solution - output (m)
#SUMMARY odeso ode solution - output (dat)
#SUMMARY odeso ode solution - output for spreadsheet (sdat)
#SUMMARY odeso ode solution - output (ps)
#SUMMARY odeso ode solution - output (view)
#SUMMARY daes dae solution - state (m)
#SUMMARY daes dae solution - state (dat)
#SUMMARY daes dae solution - state (ps)
#SUMMARY daes dae solution - state (view)
|
︙ | | | ︙ | |
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
|
echo Creating view of $1_$2
$DVIVIEW $1_$2.dvi&
#Generate pdf
$1_$2.pdf: $1_$2.ps
echo Creating $1_$2.pdf
ps2pdf $1_$2.ps $1_$2.pdf
#Report generation
$1_rep.make: $1_rep.txt $1_args.m
rep_txt2make $1 "$mtt_switches"
make_reps:
rep_txt2sh $1; # touch $1_rep.txt
$1_rep.tex: $1_rep.txt make_reps
rep_txt2tex $1 "$documenttype" "$directory";
#SUMMARY abg Acausal bond graph report (tex)
$1_abg.tex: $1_sub.sh
abg2tex $1
|
>
|
|
|
|
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
|
echo Creating view of $1_$2
$DVIVIEW $1_$2.dvi&
#Generate pdf
$1_$2.pdf: $1_$2.ps
echo Creating $1_$2.pdf
ps2pdf $1_$2.ps $1_$2.pdf
#Report generation
$1_rep.make: $1_rep.txt $1_args.m
rep_txt2make $1 "$mtt_switches"
reps_made:
rep_txt2sh $1; touch reps_made
$1_rep.tex: $1_rep.txt reps_made
rep_txt2tex $1 "$documenttype" "$directory";
#SUMMARY abg Acausal bond graph report (tex)
$1_abg.tex: $1_sub.sh
abg2tex $1
|
︙ | | | ︙ | |