Comment: | Merged changes from global-optimisation branch. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
5a72ea3777f875670e828118d5940b57 |
User & Date: | geraint@users.sourceforge.net on 2002-09-16 08:08:01 |
Other Links: | branch diff | manifest | tags |
2002-09-18
| ||
19:46:49 |
Refined test to reduce shell loop overhead for unnecessary E matrix. Removed unnecessary attempt to optimise cse. Fixes sm representation. check-in: 05800709f5 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2002-09-16
| ||
08:08:01 | Merged changes from global-optimisation branch. check-in: 5a72ea3777 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2002-09-12
| ||
10:08:33 | Reverted to total time being the end of the horizon check-in: 7a4cf7cd91 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Modified mttroot/mtt/bin/mtt from [51a5ec4d55] to [16f6d6a3c8].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + + + + + + + + + + + | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.360.2.3 2002/09/16 07:59:26 geraint ## Changed default optimisation to global. ## ## Revision 1.360.2.2 2002/09/04 10:44:59 geraint ## Added option to specify number of tmp variables declared (-ntmpvar <N>). ## ## Revision 1.360.2.1 2002/09/03 23:44:43 geraint ## adding global optimisation (-optg). ## ## Revision 1.360 2002/08/20 15:51:16 gawthrop ## Update to work with ident DIY rep ## ## Revision 1.359 2002/08/07 14:27:14 geraint ## Changes to make "-i dassl" work again. ## ## Revision 1.358 2002/08/07 11:04:40 geraint ## Now updates timestamp on lbl.txt after processing in make. This eliminates the delay where MTT spends a long period of time uselessly recursing through the model on subsequent passes if the label file is older than the bondgraph. ## ## Revision 1.357 2002/06/28 10:13:40 geraint |
︙ | |||
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 | 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | + + + | # Default use m, not oct files m='m'; # Default use ps files ps=ps eps=eps psview=$PSVIEW # Default declare 500 temporary variables num_tmp_var=500 #Initialise list of switches mtt_switches=''; #Initialise read dirs read_dirs='' |
︙ | |||
1457 1458 1459 1460 1461 1462 1463 | 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 | + - - + + + + + + + + + | subsystem="_"$2; shift;; -oct ) fixcc='-fixcc' mtt_switches="$mtt_switches $1"; using_oct=yes; ;; -optl ) |
︙ | |||
1551 1552 1553 1554 1555 1556 1557 | 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 | - + + + + | echo ' -d <dir> use directory <dir>' echo ' -dr <dir> use files contained in <dir>' echo ' -dc Maximise derivative (not integral) causality' echo ' -i <implicit|euler|rk4|dassl> Use implicit, euler, rk4 or dassl integration' echo ' -ae <reduce|hybrd|dassl|hooke> Solve algebraic equations with specified solver' echo ' -o ode is same as dae' echo ' -oct use oct files in place of m files where appropriate' |
︙ | |||
2401 2402 2403 2404 2405 2406 2407 | 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 | - + | #SUMMARY sympar symbolic parameters (r) $1_sympar.r: $1_sympar.txt sympar_txt2r $1 $1_sympar.m: $1_sympar.txt sympar_txt2m $1 $1_sympar.h: $1_sympar.txt |
︙ |
Modified mttroot/mtt/bin/trans/cse2ode_r from [945a7d1a16] to [280cac859b].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + + + + + + + + + + + | # Copyright (c) P.J.Gawthrop, 1991, 1994. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.3.4.2 2002/09/10 23:24:19 geraint ## Rationalised local and global optimisations. ## Fixes presentation of locally optimised code (ode view). ## Much more elegant :-) ## ## Revision 1.3.4.1 2002/09/03 23:44:43 geraint ## adding global optimisation (-optg). ## ## Revision 1.3 2001/07/27 23:29:10 geraint ## Optimises only when requested (-opt). ## ## Revision 1.2 2001/07/13 04:54:04 geraint ## Branch merge: numerical-algebraic-solution back to main. ## ## Revision 1.1.4.1 2001/05/04 04:07:24 geraint ## Numerical solution of algebraic equations. ## sys_ae.cc written for unsolved inputs. ## Solution of equations using hybrd from MINPACK (as used by Octave fsolve). |
︙ | |||
32 33 34 35 36 37 38 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - - - + + + + + + - - + + | ## Initial revision ## ############################################################### optimise=''; optimise_msg='' while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in |
︙ | |||
124 125 126 127 128 129 130 131 132 133 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | + + + + + + + + - - - - - - - - | OUT "$1_odeo.r"; write "%File: $1_odeo.r"; in ("$1_odeo_write.r"); write "END;"; SHUT "$1_odeo.r"; quit; EOF if [ ${optimise:-""} = "-optimise_global" ]; then mtt_optimise global $1 ode mtt_optimise global $1 odeo elif [ ${optimise:-""} = "-optimise_local" ]; then mtt_optimise local $1 ode mtt_optimise local $1 odeo fi # Now invoke the standard error handling. mtt_error_r cse2ode_r.log |
Modified mttroot/mtt/bin/trans/cse2smx_lang from [6253408dee] to [a64f19c513].
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + | ;; -parameters) parameters='-parameters'; ;; -matrix) matrix='yes'; ;; |
︙ |
Modified mttroot/mtt/bin/trans/csm2sm_r from [d62d77923d] to [f4ea164861].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + + + + + + + + + + + - - - - + + + + + + + - + | # Copyright (c) P.J.Gawthrop, 1991, 1994, 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2.4.2 2002/09/10 23:24:19 geraint ## Rationalised local and global optimisations. ## Fixes presentation of locally optimised code (ode view). ## Much more elegant :-) ## ## Revision 1.2.4.1 2002/09/03 23:44:43 geraint ## adding global optimisation (-optg). ## ## Revision 1.2 2001/07/27 23:29:10 geraint ## Optimises only when requested (-opt). ## ## Revision 1.1 2000/12/28 12:24:03 peterg ## Put under RCS ## ## Revision 1.2 1996/08/25 10:11:32 peter ## Added END in output file. ## Error handling. ## ## Revision 1.1 1996/08/19 15:06:16 peter ## Initial revision ## ############################################################### optimise=''; optimise_msg='' while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in |
︙ | |||
133 134 135 136 137 138 139 140 141 142 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | + + + + + + | SHUT "$1_$2.r2"; quit; EOF cat $1_$2.r1 $1_$2.r2 > $1_$2.r if [ ${optimise:-""} = "-optimise_global" ]; then mtt_optimise global $1 $2 elif [ ${optimise:-""} = "-optimise_local" ]; then mtt_optimise local $1 $2 fi # Now invoke the standard error handling. mtt_error_r csm2sm_r.log |
Modified mttroot/mtt/bin/trans/dae2cse_r from [1e44bd3303] to [56853751aa].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + + + + + + + + + + + + + | # Copyright (c) P.J.Gawthrop 1991, 1992, 1994. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.23.2.3 2002/09/12 18:50:50 geraint ## Uncommented cse optimisations - they seem to work ok. ## ## Revision 1.23.2.2 2002/09/10 23:24:19 geraint ## Rationalised local and global optimisations. ## Fixes presentation of locally optimised code (ode view). ## Much more elegant :-) ## ## Revision 1.23.2.1 2002/09/03 23:44:43 geraint ## adding global optimisation (-optg). ## ## Revision 1.23 2002/07/10 17:43:05 geraint ## Added feature [ 562453 ] Optimisation of algebraic equations. ## ## Revision 1.22 2002/06/28 15:35:47 geraint ## Commented out aej.r generation (not used yet). ## ## Revision 1.21 2002/06/28 10:13:40 geraint ## Includes fix_c.r in ese2rdae and def2write_r to eliminate occurrances of x**y. ## ## Revision 1.20.2.1 2002/06/05 11:14:50 geraint |
︙ | |||
130 131 132 133 134 135 136 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - - - + + + + + + - - - - + + + + | solve=1 solve_msg=' with explicit solution of algebraic equations' ;; -fixcc ) fixcc='-fixcc' include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'` fix_msg='fixing c and cc code'; ;; |
︙ | |||
468 469 470 471 472 473 474 475 476 477 478 479 480 481 | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | + + + + + + + + + + + + | touch $1_ae.r1 $1_ae.r2 touch $1_cseo.r1 touch $1_cseo.r2 cat $1_ae.r1 $1_ae.r2 > $1_ae.r cat $1_cse.r1 $1_cse.r2 > $1_cse.r cat $1_csex.r1 $1_csex.r2 > $1_csex.r cat $1_cseo.r1 $1_cseo.r2 > $1_cseo.r if [ ${optimise:-""} = "-optimise_global" ]; then mtt_optimise global $1 ae mtt_optimise global $1 cse mtt_optimise global $1 cseo mtt_optimise global $1 csex elif [ ${optimise:-""} = "-optimise_local" ]; then mtt_optimise local $1 ae mtt_optimise local $1 cse mtt_optimise local $1 cseo mtt_optimise local $1 csex fi if [ "$solve" = "1" ]; then echo "Setting MTTNyz=0 in $1_def.r and updating other $1_def files" gawk '{ if ($1=="MTTNyz") print "MTTNyz := 0;" else print $0 |
︙ |
Modified mttroot/mtt/bin/trans/dae2lde_r from [ec8a1424aa] to [b551dcb121].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + + + + + + + + + + + + + + - - - + + + + + + + + + + - - + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2.4.3 2002/09/13 10:10:42 geraint ## Commented out optimisation. ## ## Revision 1.2.4.2 2002/09/10 23:24:19 geraint ## Rationalised local and global optimisations. ## Fixes presentation of locally optimised code (ode view). ## Much more elegant :-) ## ## Revision 1.2.4.1 2002/09/03 23:44:43 geraint ## adding global optimisation (-optg). ## ## Revision 1.2 2001/07/27 23:29:10 geraint ## Optimises only when requested (-opt). ## ## Revision 1.1 2000/12/28 12:25:13 peterg ## Initial revision ## ############################################################### optimise=''; optimise_msg='' while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in |
︙ | |||
114 115 116 117 118 119 120 121 122 123 | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | + + + + + + + + + - - - - - - - - | OUT "$1_ldeo.r"; write "%File: $1_ldeo.r"; in ("$1_ldeo_write.r"); write "END;"; SHUT "$1_ldeo.r"; quit; EOF # TODO: edit mtt_optimise to accept lde and ldeo # if [ ${optimise:-""} = "-optimise_global" ]; then # mtt_optimise global $1 lde # mtt_optimise global $1 ldeo # elif [ ${optimise:-""} = "-optimise_local" ]; then # mtt_optimise local $1 lde # mtt_optimise local $1 ldeo # fi # Now invoke the standard error handling. mtt_error_r cse2lde_r.log |
Modified mttroot/mtt/bin/trans/def2write_r from [bdaa78ff6b] to [3fcc66207b].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + + + + + + + + + + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.16.2.3 2002/09/10 23:24:19 geraint ## Rationalised local and global optimisations. ## Fixes presentation of locally optimised code (ode view). ## Much more elegant :-) ## ## Revision 1.16.2.2 2002/09/10 22:09:14 geraint ## Fixed presentation of globally optimised equations (ode view). ## ## Revision 1.16.2.1 2002/09/03 23:44:43 geraint ## adding global optimisation (-optg). ## ## Revision 1.16 2002/09/03 19:34:15 geraint ## Write EdX regardless - csex is needed to create ode when not optimised. ## ## Revision 1.15 2002/08/29 15:45:20 geraint ## Tests for existence of matrix before entering shell loop. ## Tests for existence of expression before attempting to write or optimise. ## ## Revision 1.14 2002/08/09 14:34:45 geraint ## Fix to prevent numbers being formed with a decimal point in the exponent, Reduce cannot handle these. ## |
︙ | |||
72 73 74 75 76 77 78 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - - - - + | ## Initial revision ## ############################################################### optimise='' while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in |
︙ | |||
149 150 151 152 153 154 155 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - - - - - + + + - - + + | ms="$Nx $Nu $Nx $Nu" ;; *) echo def2write_r: representation $rep not recognised exit esac |
Added mttroot/mtt/bin/trans/mtt_fix_integers version [511eb60f9c].
|
Added mttroot/mtt/bin/trans/mtt_join_lines version [95d87c9e44].
|
Added mttroot/mtt/bin/trans/mtt_optimise version [543d412814].