Overview
Comment: | Now handles user-defined components |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6902543ae0c7d6b43bc1a6c41379f779 |
User & Date: | gawthrop@users.sourceforge.net on 2001-06-11 15:06:58 |
Other Links: | branch diff | manifest | tags |
Context
2001-06-11
| ||
15:09:18 | Removed spurious parameter check-in: 2499623677 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
15:06:58 | Now handles user-defined components check-in: 6902543ae0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
2001-06-06
| ||
07:54:38 | Further fixes to make nonlinear PPP work ... check-in: 797d7864df user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/abg2lbl_fig2txt from [5d3130fe45] to [9b3dd18d71].
︙ | ︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Acausal bond graph to causal bond graph: mfile format ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.12 2001/05/08 15:18:10 gawthrop ## Added trig and hyperbolic functions to argument exclusion list ## ## Revision 1.11 2000/09/19 11:14:30 peterg ## Now writes the first component type header correctely ## ## Revision 1.10 2000/01/26 10:11:10 peterg | > > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # Acausal bond graph to causal bond graph: mfile format ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.13 2001/06/04 08:13:37 gawthrop ## Various changes to support PPP ## ## Revision 1.12 2001/05/08 15:18:10 gawthrop ## Added trig and hyperbolic functions to argument exclusion list ## ## Revision 1.11 2000/09/19 11:14:30 peterg ## Now writes the first component type header correctely ## ## Revision 1.10 2000/01/26 10:11:10 peterg |
︙ | ︙ | |||
154 155 156 157 158 159 160 161 162 163 164 165 | cr["TF"] = "lin"; arg["TF"] = sprintf("flow,%s%s", $2, s_arg); cr["GY"] = "lin"; arg["GY"] = sprintf("flow,%s%s", $2, s_arg); cr["AE"] = "lin"; arg["AE"] = sprintf("%s%s", $2, s_arg); cr["AF"] = "lin"; arg["AF"] = sprintf("%s%s", $2, s_arg); cr["CDx"] = "lin"; arg["CDx"] = sprintf("%s%s", $2, s_arg); ## Heading if (Component !~ OldComponent) print "\n% Component type", Component ## Component | > > > > > > > > > > > > > > > > | | 157 158 159 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 | cr["TF"] = "lin"; arg["TF"] = sprintf("flow,%s%s", $2, s_arg); cr["GY"] = "lin"; arg["GY"] = sprintf("flow,%s%s", $2, s_arg); cr["AE"] = "lin"; arg["AE"] = sprintf("%s%s", $2, s_arg); cr["AF"] = "lin"; arg["AF"] = sprintf("%s%s", $2, s_arg); cr["CDx"] = "lin"; arg["CDx"] = sprintf("%s%s", $2, s_arg); cr["RS"] = lin; arg["RS"] = sprintf("flow,%s%s", $2, s_arg); ## Heading if (Component !~ OldComponent) print "\n% Component type", Component ## Component printf("\t%s\t", Component); if (Component in cr) printf("%s\t\t", cr[Component]) else printf("none\t\t"); if (Component in arg) printf("%s\t\t\n", arg[Component]) else { print "lbl2args_txt2out", Component | "/bin/sh"; close("/bin/sh") } ##print "\t" $2 "\t" cr[Component] "\t\t" arg[Component]; OldComponent=Component; } END{ print "\n% Port aliases" >> "mtt_junk_alias.txt"; for (k=1;k<=j;k++){ if (port_alias[k] ~ "\\["){ # Only do ports port_name = substr(port_alias[k],2,length(port_alias[k])-2); |
︙ | ︙ |
Added mttroot/mtt/bin/trans/lbl2args_txt2out version [ea489fc016].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | #!/bin/sh # Writes argument list to standard output ready for use in calling lbl file ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ############################################################### # Copyright (C) 2001 by Peter J. Gawthrop if [ -f "$1_lbl.txt" ]; then grep '[#%]ALIAS' $1_lbl.txt |\ awk '{ if (match($2,"\\$")==1){ i = substr($2,2); arg[i] = $3 N++ } } END{ for (j=1;j<=N;j++){ if (length(arg[j])==0) arg[j] = "??"; } for (j=1;j<N;j++){ if (length(arg[j])==0) arg[j] = "??"; printf("%s;", arg[j]); } printf("%s\n",arg[N]); }' fi |