Comment: | Fixed cc and c problems to do with pow(x,y) and integers mtt/lib/reduce/fix_c.r is included in rdae2dae and cse2smx_lang for -c, -cc and -oct options |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
47742bde53a9d7f85371c9630b078645 |
User & Date: | gawthrop@users.sourceforge.net on 2001-04-11 09:44:26 |
Other Links: | branch diff | manifest | tags |
2001-04-11
| ||
15:34:56 | Fixed bug to do with multiple outputs check-in: a230d6637d user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:44:26 |
Fixed cc and c problems to do with pow(x,y) and integers mtt/lib/reduce/fix_c.r is included in rdae2dae and cse2smx_lang for -c, -cc and -oct options check-in: 47742bde53 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
07:52:45 | Temporary fix to avoid incorrect _input.cc with stdin check-in: 51ac8a149a user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Modified mttroot/mtt/bin/mtt from [995a31ae51] to [d5403023fe].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + + + + | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.304 2001/04/11 07:35:22 gawthrop ## Now uses system_cr.h in place of system.h in .c rep - ## compatible with older code ## ## Revision 1.303 2001/04/10 12:54:50 gawthrop ## Minor fixes for sensitivity versions ## ## Revision 1.302 2001/04/06 05:24:30 geraint ## -stdin for .cc reps. ## ## Revision 1.301 2001/04/05 03:46:12 geraint |
︙ | |||
1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 | 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 | + + | mtt_switches="$mtt_switches $1"; reset=reset;; -p ) mtt_switches="$mtt_switches $1"; print='-p';; -c ) fixcc='-fixcc' mtt_switches="$mtt_switches $1"; matrix_smxa="-matrix"; computation=c ;; -cc ) fixcc='-fixcc' mtt_switches="$mtt_switches $1"; matrix_smxa="-matrix"; computation=cc ;; -o ) mtt_switches="$mtt_switches $1"; dae_is_ode=1 ;; -nocr ) |
︙ | |||
1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 | 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 | + | mtt_switches="$mtt_switches $1"; stdin=stdin;; -sub ) mtt_switches="$mtt_switches $1 $2"; sub='-sub'; subsystem="_"$2; shift;; -oct ) fixcc='-fixcc' mtt_switches="$mtt_switches $1"; using_oct=yes; m=oct ;; -opt ) mtt_switches="$mtt_switches $1"; optimise='-optimise';; -partition ) mtt_switches="$mtt_switches $1"; |
︙ | |||
1911 1912 1913 1914 1915 1916 1917 | 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 | - + | .PRECIOUS: mtt_%.o mtt_%.o: mtt_%.cc echo Compiling mtt_\$*.cc ${MTT_CXX} ${MTT_CXXFLAGS} ${MTT_CXXINCS} -c $< -DSTANDALONE $define_octave_dev # Generates code to write reduce code $1_ode_write.r: $1_def.m |
︙ | |||
2341 2342 2343 2344 2345 2346 2347 | 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 | - + | echo Doing subsystems mtt_make_subsystems ${sys} dae r endif ifeq ($rdae_is_dae,1) echo Copying $1_rdae.r to $1_dae.r cp $1_rdae.r $1_dae.r else |
︙ | |||
2702 2703 2704 2705 2706 2707 2708 | 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 | - + - + - + | #SUMMARY smx state matrices with variable state x (m) #SUMMARY smxx Sparse computation of Ax (m) #SUMMARY smxtx Sparse computation of ATx (m) $1_smx.r: $1_def.r $1_def.m $1_ode.r $1_subs.r ode2smx_lang $1 r; tidy $1_smx.r $1_smx.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r |
︙ |
Modified mttroot/mtt/bin/trans/cse2smx_lang from [cb9652010b] to [01dd94a076].
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + + + + | -matrix) matrix='yes'; ;; -optimise) optimise='LOAD SCOPE; ON GENTRANOPT;'; iname='INAME mtt_o;'; ;; -fixcc ) include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'` blurb2='fixing c and cc code'; ;; *) echo $1 is an unknown option exit;; esac shift done |
︙ | |||
78 79 80 81 82 83 84 | 82 83 84 85 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 113 | - + + + + | # Inform user if [ -n "$optimise" ]; then blurbopt=' using code optimisation' fi |
︙ |
Modified mttroot/mtt/bin/trans/def2write_r from [1f67ee80a1] to [7008801453].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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 | + + + - | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.6 2000/11/29 20:48:53 peterg ## Zapped unnecessary Npar creation ## ## Revision 1.5 2000/11/09 10:12:24 peterg ## Removed debugging line ## ## Revision 1.4 2000/10/14 16:19:54 peterg ## Just optimize one line at a time ... ## ## Revision 1.3 2000/10/11 09:07:17 peterg ## Added csex rep (cse without E) ## ## Revision 1.2 2000/10/10 21:02:17 peterg ## Added cse reps ## ## Revision 1.1 2000/10/10 09:07:32 peterg ## Initial revision ## ############################################################### |
︙ | |||
90 91 92 93 94 95 96 97 98 99 100 101 102 103 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | + | *) echo def2write_r: representation $rep not recognised exit esac # Write out the code echo 'off echo$ load scope$' >$1_$2_write.r for matrix in $matrices; do n=`first "$ns"`; ns=`rest "$ns"` m=`first "$ms"`; ms=`rest "$ms"` is=`n2m 1 $n`; js=`n2m 1 $m`; for i in $is; do for j in $js; do |
︙ |
Modified mttroot/mtt/bin/trans/rdae2dae_r from [26191cff7e] to [2d68ae9a32].
︙ | |||
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 | + + + | # Copyright (c) P.J.Gawthrop, 1991, 1994, 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.6 2001/02/03 13:40:45 gawthrop ## Added explicit MTTNu ## ## Revision 1.5 2000/12/28 12:39:02 peterg ## Put under RCS ## ## Revision 1.4 2000/09/04 08:42:53 peterg ## Put in extra echo to space output ## ## Revision 1.3 2000/09/02 15:55:11 peterg |
︙ | |||
84 85 86 87 88 89 90 91 92 93 94 95 96 97 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | + + + + | case $1 in -I ) info=info;; -partition ) partition=yes; blurb='with partitioning'; ;; -fixcc ) include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'` blurb2='fixing c and cc code'; ;; *) echo "$1 is an invalid argument - ignoring"; exit ;; esac shift done |
︙ | |||
110 111 112 113 114 115 116 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + + + + | crname=$topname"_cr.r" subsname=$topname"_subs.r" rdaename=$sysname"_rdae.r" daename=$sysname"_dae.r" logname="rdae2dae.log" # Inform user |
︙ |
Modified mttroot/mtt/cc/include/useful-functions.hh from [3c59bd0844] to [37750f990b].
|
Modified mttroot/mtt/lib/comp/compound/Mechanical/Mechanical-2D/gRODa/gRODa_abg.fig from [57eb63138e] to [38a3b778aa].
︙ | |||
85 86 87 88 89 90 91 | 85 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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + | 10125 9450 990 9450 990 8100 10125 8100 10125 9450 2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 3 8550 5400 9225 6075 8955 6075 2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2 8685 5265 8415 5535 2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 3 3375 5175 2025 3825 2250 3825 |
Modified mttroot/mtt/lib/comp/compound/Mechanical/Mechanical-2D/gRODa/gRODa_lbl.txt from [7648c14a12] to [66ade3ce45].
︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | + + + | %% Label file for system gRODa (gRODa_lbl.txt) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.1 1999/08/05 08:04:40 peterg % %% Initial revision % %% % %% Revision 1.3 1998/11/30 10:47:53 peterg % %% Added extra a_a and a_b aliases % %% % %% Revision 1.2 1998/11/25 13:55:42 peterg % %% Added missig attribute field m*g,internal % %% % %% Revision 1.1 1998/11/25 10:48:34 peterg |
︙ | |||
74 75 76 77 78 79 80 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + - - + + + + | %Modulated transformers s1 lsin flow,l_a s2 lsin flow,l_b c1 lcos flow,l_a c2 lcos flow,l_b |
Modified mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_subs.r from [2fa7735088] to [254628ce3b].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + + + + - + | % Default SUBS file % File idRC_subs.r % Generated by MTT on Tue Apr 3 09:43:38 BST 2001. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.1 2001/04/05 12:00:18 gawthrop % %% Identification example % %% % %% Revision 1.1 2000/12/28 09:13:38 peterg % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Put algebraic substitution commands here %The following is now done automatically |
Modified mttroot/mtt/lib/examples/Identification/idRC/sidRC_subs.r from [84a767b42e] to [c8c2752116].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + + + - + - + | % Default SUBS file % File sidRC_subs.r % Generated by MTT on Tue Apr 3 09:43:38 BST 2001. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.1 2001/04/05 11:57:29 gawthrop % %% Identification example % %% % %% Revision 1.1 2000/12/28 09:13:38 peterg % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Put algebraic substitution commands here %The following is now done automatically |
Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/Cart_abg.fig from [c7e129b96f] to [451fec60c3].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 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 | - - - - - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + | #FIG 3.2 Portrait Center Metric A4 100.00 Single -2 1200 2 |
Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/Cart_lbl.txt from [45427e6965] to [947eebb4f2].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + + + + - + + + + + | %% Label file for system Cart (Cart_lbl.txt) %SUMMARY Cart |
︙ | |||
34 35 36 37 38 39 40 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - - + + | % Component type SS [a] SS external,external [drive] SS external,external [x] SS external,external [y] SS external,external |
Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulumOnCart_abg.fig from [4f8b99a8bb] to [95293b57ef].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + + + + - - - + + + | #FIG 3.2 Portrait Center Metric A4 100.00 Single -2 1200 2 6 3780 4005 3870 4545 2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2 3825 4050 3825 4500 -6 1 4 0 2 1 7 51 0 -1 0.000 1 0.0000 3700 4909 203 203 3497 4909 3903 4909 1 4 0 2 1 7 51 0 -1 0.000 1 0.0000 4817 4902 203 203 4614 4902 5020 4902 2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3 2475 4275 3825 4275 3600 4500 2 4 0 2 1 7 101 0 -1 0.000 0 0 7 0 0 5 5175 4725 3375 4725 3375 3825 5175 3825 5175 4725 2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3 4275 4050 5230 3095 5230 3414 2 1 0 2 1 7 101 0 -1 0.000 0 0 -1 0 0 5 4477 3712 5872 2317 6052 2497 4702 3847 4522 3667 2 4 0 2 31 7 101 0 -1 0.000 0 0 7 0 0 5 6750 5400 1125 5400 1125 2025 6750 2025 6750 5400 |
Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulumOnCart_input.txt from [5ab6c2c810] to [eed0316c02].
| 1 2 3 4 5 6 7 8 9 10 | - - - - + + + + + + + - - - - - - - - + |
|
Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulumOnCart_lbl.txt from [cc84de002b] to [f7c8e12ace].
1 2 | 1 2 3 4 5 6 7 8 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 | - + + + + + + - - + + | %% Label file for system InvertedPendulumOnCart (InvertedPendulumOnCart_lbl.txt) %SUMMARY InvertedPendulumOnCart |
Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulumOnCart_subs.r from [95d5640b1d] to [752962d684].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + + + + + | % Default SUBS file % File InvertedPendulumOnCart_subs.r % Generated by MTT on Thu Nov 9 18:55:44 GMT 2000. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.2 2001/04/02 10:57:57 gawthrop % %% Added missing ; % %% % %% Revision 1.1 2000/12/28 18:00:45 peterg % %% To RCS % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Put algebraic substitution commands here for all x let cos(x)^2+sin(x)^2 = 1; FOR ALL x,y LET x^y = pow(x,y); % Use the pow function ON ROUNDED; % No integer output END; |
Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulum_abg.fig from [574af9822e] to [fd34fadce3].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | + + - - - - - - - + + + + + + + - + | 6 3555 4545 6345 4770 4 1 4 100 0 18 14 0.0000 4 210 495 3825 4725 [x_a]\001 4 1 4 100 0 18 14 0.0000 4 210 510 4950 4725 [y_a]\001 4 1 4 100 0 18 14 0.0000 4 210 510 6075 4725 [a_a]\001 -6 2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3 6840 4950 8190 4950 7965 5175 2 4 0 2 31 7 101 0 -1 0.000 0 0 7 0 0 5 9675 7425 3150 7425 3150 2475 9675 2475 9675 7425 |
Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulum_lbl.txt from [ecf421bd70] to [4d5db894bb].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + + + + + + + + - + | %% Label file for system InvertedPendulum (InvertedPendulum_lbl.txt) %SUMMARY InvertedPendulum %DESCRIPTION <Detailed description here> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.1 2000/12/28 18:00:45 peterg % %% To RCS % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Port aliases %UNITS x translational N m/s %UNITS y translational N m/s %UNITS a rotational N*m radian/s |
︙ |
Added mttroot/mtt/lib/reduce/fix_c.r version [ce0b4c95c5].
|