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: |
3e57693b0c6c5bdd90edd3b609ef8308 |
User & Date: | gawthrop@users.sourceforge.net on 1998-01-12 09:34:25 |
Other Links: | branch diff | manifest | tags |
Context
1998-01-12
| ||
09:59:33 | Initial revision check-in: 1d09ecef86 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:34:25 | Initial revision check-in: 3e57693b0c user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
1998-01-06
| ||
17:37:55 | Initial revision check-in: a8a28863ea user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/sm2can_r version [1123315a04].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: csm2sm_r # Constrained-state equation to linear constrained-state matrices conversion # P.J.Gawthrop 6th September 1991, May 1994 # Copyright (c) P.J.Gawthrop, 1991, 1994, 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## 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 ## ############################################################### # Inform user echo Creating $1_sm.r # Remove the old log file rm -f csm2sm_r.log # Use reduce to accomplish the transformation reduce >csm2sm_r.log << EOF in "$1_def.r"; in "$1_csm.r"; in "$1_cr.r"; in "$1_sympar.r"; OFF Echo; OFF Nat; % Find MTTA and MTTB : the A and B matrices MTTinvE := MTTE^(-1); MTTA := MTTinvE*MTTA; MTTB := MTTinvE*MTTB; %Create the output file OUT "$1_sm.r"; %Write out the matrices. IF MTTNx>0 THEN BEGIN write "matrix MTTA(", MTTNx, ",", MTTNx, ");"; FOR i := 1:MTTNx DO FOR j := 1:MTTNx DO IF MTTA(i,j) NEQ 0 THEN write "MTTA(", i, ",", j, ") := ", MTTA(i,j); END; IF MTTNx>0 THEN IF MTTNu>0 THEN BEGIN write "matrix MTTB(", MTTNx, ",", MTTNu, ");"; FOR i := 1:MTTNx DO FOR j := 1:MTTNu DO IF MTTB(i,j) NEQ 0 THEN write "MTTB(", i, ",", j, ") := ", MTTB(i,j); END; %Write it out IF MTTNy>0 THEN IF MTTNx>0 THEN BEGIN write "matrix MTTC(", MTTNy, ",", MTTNx, ");"; FOR i := 1:MTTNy DO FOR j := 1:MTTNx DO IF MTTC(i,j) NEQ 0 THEN write "MTTC(", i, ",", j, ") := ", MTTC(i,j); END; IF MTTNy>0 THEN IF MTTNu>0 THEN BEGIN write "matrix MTTD(", MTTNy, ",", MTTNu, ");"; FOR i := 1:MTTNy DO FOR j := 1:MTTNu DO IF MTTD(i,j) NEQ 0 THEN write "MTTD(", i, ",", j, ") := ", MTTD(i,j); END; write "END;"; SHUT "$1_sm.r"; quit; EOF # Now invoke the standard error handling. mtt_error_r csm2sm_r.log |