Overview
Comment: | Uses Pascal as step on the way to c code -- MUCH nicer! State and input now use the simple default - no steady states |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e12a4db9ffc6353848bbcbdc7c8bb93f |
User & Date: | gawthrop@users.sourceforge.net on 1998-07-25 09:44:25 |
Other Links: | branch diff | manifest | tags |
Context
1998-07-25
| ||
09:47:43 | Initial revision check-in: 960a814037 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:44:25 |
Uses Pascal as step on the way to c code -- MUCH nicer! State and input now use the simple default - no steady states check-in: e12a4db9ff user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:42:37 | Now writes out an array check-in: 9d8008b2ef user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/mtt from [82d947a131] to [dc29d634d7].
︙ | ︙ | |||
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.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 | > > > | 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.167 1998/07/24 17:10:34 peterg ## *** empty log message *** ## ## 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 |
︙ | ︙ | |||
1313 1314 1315 1316 1317 1318 1319 | #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; \ | | | | | | 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 | #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 |
︙ | ︙ | |||
1343 1344 1345 1346 1347 1348 1349 | 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) | > > > > > > > | | | | | | | | | | | | | > | | | | | | | 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 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 | 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) $1_input.txt: $1_struc.txt struc2input_txt2txt $1 #SUMMARY state numerical state declaration -- default (txt) $1_state.txt: $1_struc.txt struc2state_txt2txt $1 #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 txt2m $1 state #SUMMARY state state declaration (c) #$1_state.c: $1_state.txt $1_sympar.txt # txt2c $1 state #SUMMARY input numerical input declaration (c) ifeq ($switches,0) $1_input.c: $1_input.txt $1_sympar.c input_txt2c $1 endif |
︙ | ︙ | |||
1575 1576 1577 1578 1579 1580 1581 | matlab_tidy $1_ode.m; \ matlab_tidy $1_odea.m; \ matlab_tidy $1_odeo.m $1_odea.m: $1_ode.m touch $1_odea.m $1_odeo.m: $1_ode.m touch $1_odeo.m | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 | matlab_tidy $1_ode.m; \ matlab_tidy $1_odea.m; \ matlab_tidy $1_odeo.m $1_odea.m: $1_ode.m touch $1_odea.m $1_odeo.m: $1_ode.m touch $1_odeo.m #$1_ode.c: $1_def.r $1_ode.r $1_sympar.r $1_sympar.c # ode_r2c $1 $1_ode.tex: $1_ode.r $1_sympar.r $1_simp.r ode_r2tex $1; latex_tidy $1_ode.tex $1_ode2odes.m : $1_def.r make_ode2odes $1 #Conversion of m to p to c #SUMMARY ode ordinary differential equations (c) #SUMMARY ode ordinary differential equations (p) #SUMMARY state state declaration (c) #SUMMARY state state declaration (p) $1_simpar.p : $1_def.r $1_simpar.m mtt_m2p $1_simpar.m $1_numpar.p : $1_def.r $1_numpar.m mtt_m2p $1_numpar.m $1_state.p : $1_def.r $1_state.m mtt_m2p $1_state.m $1_input.p : $1_def.r $1_input.m mtt_m2p $1_input.m $1_ode.p : $1_def.r $1_ode.m mtt_m2p $1_ode.m $1_odeo.p : $1_def.r $1_odeo.m mtt_m2p $1_odeo.m $1_ode2odes.p : $1_def.r $1_simpar.p $1_numpar.p $1_state.p $1_input.p \ $1_ode.p $1_odeo.p $1_ode2odes.m mtt_write.p mtt_m2p $1_ode2odes.m $1_ode2odes.c: $1_ode2odes.p p2c $1_$2.p #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) #SUMMARY obs observer equations for CGPC (ps) #Observer functions for GPC |
︙ | ︙ | |||
1810 1811 1812 1813 1814 1815 1816 | ifeq ($computation,octave) $1_odes.m: $1_ode.m $1_numpar.m $1_def.m $1_input.m $1_state.m $1_simpar.m $1_smx.m time ode2odes_m $1 endif ifeq ($computation,c) | | < < | | 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 | ifeq ($computation,octave) $1_odes.m: $1_ode.m $1_numpar.m $1_def.m $1_input.m $1_state.m $1_simpar.m $1_smx.m time ode2odes_m $1 endif ifeq ($computation,c) $1_odes.m: $1_ode2odes.c echo Creating $1_odes.m echo Creating $1_odeso.m echo 'Compiling ...' $CC $1_ode2odes.c -lm echo 'Running ...'; time ./a.out; echo 'Done.' $1_sms.m: $1_sms.c $1_sm.c $1_numpar.c $1_simpar.h\ $1_sympar.c $1_sympar.h\ $1_numpar.c $1_input.c dsvdcmp.c echo Creating $1_sms.m |
︙ | ︙ | |||
2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 | RCS: echo Creating RCS mkdir RCS $1_$2.vc: RCS echo Version control on $1_$2.$VCext ci -I $1_$2.$VCext </dev/tty ; co -l $1_$2.$VCext # Copy c utilities dsvdcmp.c: dpythag.c nrutil.c nrutil.h echo Copying dsvdcmp.c; cp $MTTPATH/trans/c/dsvdcmp.c . dpythag.c: echo Copying dpythag.c; cp $MTTPATH/trans/c/dpythag.c . nrutil.c: echo Copying nrutil.c; cp $MTTPATH/trans/c/nrutil.c . | > > > > | 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 | RCS: echo Creating RCS mkdir RCS $1_$2.vc: RCS echo Version control on $1_$2.$VCext ci -I $1_$2.$VCext </dev/tty ; co -l $1_$2.$VCext # Copy Pascal utilities mtt_write.p: echo Copying mtt_write.p; cp $MTTPATH/trans/p/mtt_write.p . # Copy c utilities dsvdcmp.c: dpythag.c nrutil.c nrutil.h echo Copying dsvdcmp.c; cp $MTTPATH/trans/c/dsvdcmp.c . dpythag.c: echo Copying dpythag.c; cp $MTTPATH/trans/c/dpythag.c . nrutil.c: echo Copying nrutil.c; cp $MTTPATH/trans/c/nrutil.c . |
︙ | ︙ |