Comment: | Numerical solution of algebraic equations implemented for S-function target.
Equation solving requires the Matlab Optimization Toolbox to be installed. Code has been changed from C++ to C to allow mex files to be built with LCC, Parameters are now obtained from numpar.c instead of a dialogue box. `mtt <sys> sfun zip` creates all necessary files for building the model mex files. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
062029b187822b39851e505d09f272f9 |
User & Date: | geraint@users.sourceforge.net on 2002-05-19 13:01:22 |
Other Links: | branch diff | manifest | tags |
2002-05-20
| ||
07:12:05 | Trying to get oct files generated with -oct check-in: 039197b659 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
2002-05-19
| ||
13:01:22 |
Numerical solution of algebraic equations implemented for S-function target.
Equation solving requires the Matlab Optimization Toolbox to be installed. Code has been changed from C++ to C to allow mex files to be built with LCC, Parameters are now obtained from numpar.c instead of a dialogue box. `mtt <sys> sfun zip` creates all necessary files for building the model mex files. check-in: 062029b187 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2002-05-17
| ||
11:17:35 | No longer uses df() if corresponding sensitivity parameter is 0. check-in: a29cbd4fd9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Modified mttroot/mtt/bin/trans/mtt_header from [c5cc8a3a52] to [60dbd07829].
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + + + + + + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.50 2002/05/15 14:22:25 geraint ## Code for Simulink S-function target written direct to sfun.cc instead of ## calling .mexglx files. This eliminates the sfun dependency on Octave ## ColumnVectors. sys_sfun.cc should build directly on a MS Windows machine ## (can't test this yet). ## ## added sfun.zip target to create source code to export. ## ## Revision 1.49 2002/05/11 01:14:17 geraint ## Fix for [ 553218 ] simpar.oct and simpar.m different. ## Translation added between ColumnVector in base .cc and Octave_map in .oct. ## ## Revision 1.48 2002/05/08 14:51:03 geraint ## Moved matlab/octave data type conversion functions to a separate file. ## |
︙ | |||
206 207 208 209 210 211 212 213 214 215 216 217 218 219 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | + + + | # Arguments system=$1 rep=$2 language=$3 fun_name=${1}_${2} other=$4 # Anything else eg stdin insertor=\<\< # help emacs sh-mode out with C++ lines if [ -z "$system" ]; then echo 'Usage: mtt_header sys rep lang [stdin]' exit fi |
︙ | |||
465 466 467 468 469 470 471 | 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | - - - - + + + + - - | oct_header=yes; constant_declaration="const double " var_declaration="double " minusone="-1" map="_map" declaredummies=yes ;; |
︙ | |||
849 850 851 852 853 854 855 | 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | - + - + - + | ColumnVector | Matrix | *) printf " ${arg_type}\t${w}\t= args(${j}).%s ();\n" ${vector_value} ;; esac done } |
︙ | |||
904 905 906 907 908 909 910 | 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | - + - + | return retval; } #endif // (CODEGENTARGET == OCTAVEDLD) EOF } |
︙ | |||
951 952 953 954 955 956 957 | 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 | - + + + + + + + | if [ ${language} = "oct" ];then # standalone write_cc_header array2constant write_cc_footer # oct and mex code write_oct ${system}_${rep} ${args} |
︙ |
Modified mttroot/mtt/cc/mtt_m2cc.sh from [7e5ae6afba] to [71ee6a40d1].
︙ | |||
96 97 98 99 100 101 102 103 104 | 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 | + + + + + + - - + + + | cat ;; esac }; fix_comment_delimiter () { language=${1:-cc} case $language in # it would be preferable if we didn't use '%' as a delimiter # (a % b) gives the remainder of ((int)a / (int)b) in C/C++ c) sed 's/[%#]\(.*\)/\/* \1 *\//' ;; cc | *) |
︙ | |||
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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - - + + - - + - + | sed 's/\([0-9]*\)\(\.\)\{0,1\}\([0-9]*\)\^\([0-9]*\)\(\.\)\{0,1\}\([0-9]*\)/pow \(\1\2\3,\4\5\6\)/g' }; echo Creating ${OUT} case ${TARGET} in |
Modified mttroot/mtt/cc/sympar_txt2h.sh from [f951f86658] to [9a054e0600].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + + + + | #! /bin/sh # $Id$ # $Log$ # Revision 1.5 2002/04/28 18:58:06 geraint # Fixed [ 549658 ] awk should be gawk. # Replaced calls to awk with call to gawk. # # Revision 1.4 2001/08/24 21:41:04 geraint # Fixed problem with declaration when there are no numerical parameters. # # Revision 1.3 2001/03/19 02:28:53 geraint # Branch merge: merging-ode2odes-exe back to MAIN. # # Revision 1.2.2.1 2001/03/16 03:56:54 geraint |
︙ | |||
52 53 54 55 56 57 58 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + | TMP_VAR_NAMES="mtt_tmp mtt_o $*" IN=${SYS}_sympar.txt OUT=${SYS}_sympar.h declare_sys_param () { |
︙ |
Modified mttroot/mtt/lib/rep/sfun_rep/Makefile from [f2177a72f4] to [506c1123b2].
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - + + + - + + - - + + + + + + + - + + - + + + + + + - - + + + + + + + - - + + + - - + + + - - + + + | #! /usr/bin/make -f |
Added mttroot/mtt/lib/rep/sfun_rep/README.tmpl version [7562840818].
|
Added mttroot/mtt/lib/rep/sfun_rep/ae.c.tmpl version [61cef996f8].