Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ab280b5f88f5a5f882822db52b5b8ac6 |
User & Date: | gawthrop@users.sourceforge.net on 2000-12-27 16:26:38 |
Other Links: | branch diff | manifest | tags |
Context
2000-12-27
| ||
16:36:48 | Initial revision check-in: 1a1a97352d user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
16:26:38 | Initial revision check-in: ab280b5f88 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
16:06:17 | *** empty log message *** check-in: 406757eed0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/dae_r2tex version [ed25283fdf].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 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 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 141 142 143 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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: dae_r2tex # Reduce differential-algebraic to LaTex differential-algebraic equations. # P.J.Gawthrop 10th May 1991, April 1994 # Copyright (c) P.J.Gawthrop, 1991, 1994. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.4 1998/01/23 16:08:09 peterg ## changed eqnarray to equation + aligned ## ## Revision 1.3 1997/06/13 13:30:43 peterg ## Removed eqn labels. ## # Revision 1.2 1996/12/19 10:25:15 peterg # Now writes out mtti instead of mtt_{i} -- lets latex_tidy do the # conversion. # # Revision 1.1 1996/10/21 08:50:15 peterg # Initial revision # ############################################################### while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in -I ) info=info;; -partition ) partition=yes; blurb='with partitioning'; ;; *) echo "$1 is an invalid argument - ignoring"; exit ;; esac shift done # Inform user echo Creating $1_dae.tex $blurb logname=dae_r2tex.log # Remove the old log file rm -f dae_r2tex.log # Use reduce to accomplish the transformation $SYMBOLIC >$logname << EOF %Read the definitions file in "$1_def.r"; %Read the differential-algebraic equations file in "$1_dae.r"; %Read the symbolic parameter file %%in "$1_sympar.r"; OFF Echo; OFF Nat; %Read the substitution file in "$1_subs.r"; %Read the simplifying expressions file IN "$1_simp.r"; % Read the formating function in "$MTTPATH/trans/latex_equations.r"; OUT "$1_dae.tex"; %Write out the differential-algebraic equations. write "%File: $1_dae.tex"; write "%differential-algebraic equations"; %ON Rounded; %Precision 5; latex_equations(); SHUT "$1_dae.tex"; quit; EOF if [ -n "$partition" ]; then rm -f mtt_junk # Now for the subsystems # Find subsystems subsystems=`mtt_get_subsystems $1` for subsystem in $subsystems; do echo Doing $subsystem ucname="MTT_"$subsystem"_uc" subsystem_dae=$subsystem"_dae" #subname=`echo $subsystem | mtt_remove_underscore` Nu=`mtt_getsize -internal $subsystem"_1" u` echo Nu $Nu # Use symbolic algebra to accomplish the transformation $SYMBOLIC >$logname << EOF %Read the definitions file in "$1_def.r"; %Read the symbolic parameter file %%in "$1_sympar.r"; % Read the formating function in "$MTTPATH/trans/latex_equations.r"; OFF Echo; OFF Nat; %Read the substitution file in "$1_subs.r"; %Read the simplifying expressions file IN "$1_simp.r"; %Read the differential-algebraic equations file in "$1_dae.r"; %Create the output file OUT "mtt_junk_1"; % Connecting inputs IF $Nu>0 THEN BEGIN write "\section{Subsystem $subsystem}"; write "\subsection{Connections}"; write"\begin{itemize}"; FOR Row := 1:$Nu DO BEGIN write "\item Input ", Row, " is connected to "; write $ucname(Row,1); END; write"\end{itemize}"; END; SHUT "mtt_junk_1"; %Read the differential-algebraic equations file in "$subsystem_dae.r"; %Create the output file OUT "mtt_junk_2"; write "\subsection{Dynamics}"; latex_equations(); SHUT "mtt_junk_2"; EOF echo >> $1_dae.tex echo %Connections for subsystem $subsystem >> $1_dae.tex # Sort out underscores and remove mtt to avoide post processor cat mtt_junk_1 | mtt_remove_underscore | sed 's/mtt//g'>> $1_dae.tex cat mtt_junk_2 >> $1_dae.tex rm -rf mtt_junk_? done fi # Now invoke the standard error handling. mtt_error_r dae_r2tex.log |