Overview
Comment:Refined test to reduce shell loop overhead for unnecessary E matrix.
Removed unnecessary attempt to optimise cse.
Fixes sm representation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 05800709f5671264fa4730aee99e2105a7542fd74951b770681d0cc7e279f3fe
User & Date: geraint@users.sourceforge.net on 2002-09-18 19:46:49
Other Links: branch diff | manifest | tags
Context
2002-09-19
08:10:47
Updated documentation documentation check-in: 3411e048f5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2002-09-18
19:46:49
Refined test to reduce shell loop overhead for unnecessary E matrix.
Removed unnecessary attempt to optimise cse.
Fixes sm representation.
check-in: 05800709f5 user: geraint@users.sourceforge.net tags: origin/master, trunk
2002-09-16
08:08:01
Merged changes from global-optimisation branch. check-in: 5a72ea3777 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/dae2cse_r from [56853751aa] to [557bc43b9c].

11
12
13
14
15
16
17



18
19
20
21
22
23
24
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27







+
+
+







# Copyright (c) P.J.Gawthrop 1991, 1992, 1994.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.24  2002/09/16 08:08:00  geraint
## Merged changes from global-optimisation branch.
##
## Revision 1.23.2.3  2002/09/12 18:50:50  geraint
## Uncommented cse optimisations - they seem to work ok.
##
## Revision 1.23.2.2  2002/09/10 23:24:19  geraint
## Rationalised local and global optimisations.
## Fixes presentation of locally optimised code (ode view).
## Much more elegant :-)
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
491
492
493
494
495
496
497

498
499
500
501

502
503
504
505
506
507
508







-




-







cat $1_ae.r1 $1_ae.r2 > $1_ae.r
cat $1_cse.r1 $1_cse.r2  > $1_cse.r
cat $1_csex.r1 $1_csex.r2  > $1_csex.r
cat $1_cseo.r1 $1_cseo.r2  > $1_cseo.r

if [ ${optimise:-""} = "-optimise_global" ]; then
    mtt_optimise global $1 ae
    mtt_optimise global $1 cse
    mtt_optimise global $1 cseo
    mtt_optimise global $1 csex
elif [ ${optimise:-""} = "-optimise_local" ]; then
    mtt_optimise local $1 ae
    mtt_optimise local $1 cse
    mtt_optimise local $1 cseo
    mtt_optimise local $1 csex
fi

if [ "$solve" = "1" ]; then
    echo "Setting MTTNyz=0 in $1_def.r and updating other $1_def files"
    gawk '{

Modified mttroot/mtt/bin/trans/def2write_r from [3fcc66207b] to [58e178bc16].

9
10
11
12
13
14
15



16
17
18
19
20
21
22
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25







+
+
+







# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.17  2002/09/16 08:08:00  geraint
## Merged changes from global-optimisation branch.
##
## Revision 1.16.2.3  2002/09/10 23:24:19  geraint
## Rationalised local and global optimisations.
## Fixes presentation of locally optimised code (ode view).
## Much more elegant :-)
##
## Revision 1.16.2.2  2002/09/10 22:09:14  geraint
## Fixed presentation of globally optimised equations (ode view).
170
171
172
173
174
175
176


177
178
















179
180
181
182
183
184
185
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







+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







# Write out the code
echo "" > $1_$2_write.r

echo 'off echo$' >> $1_$2_write.r
echo 'load gentran$' >> $1_$2_write.r

for matrix in $matrices; do
    ignore_matrix="no"
    if [ "$matrix" = "E" ]; then
    matrix_exists=`grep -i MTT${matrix} ${sys}_dae.r | wc -l | gawk '{print $1}'`
    if [ "$matrix" = "EdX" -o $matrix_exists -gt 0 ]; then
	matrix_exists=`grep -i MTTE ${sys}_dae.r | wc -l | gawk '{print $1}'`
	if [ ! $matrix_exists -gt 0 ]; then
	    ignore_matrix="yes"
	    n=`first "$ns"`; ns=`rest "$ns"` 
	    m=`first "$ms"`; ms=`rest "$ms"`
 	    is=`n2m 1 $n`;
	    echo "write \"% Begin Matrix MTTE\"$" >> $1_$2_write.r
	    for i in $is; do
		echo 'write'
		name=`echo MTTE'('$i','$i')'`
		echo '  '$comma$name ':=' $name '$'
	    done >> $1_$2_write.r
	    echo "write \"% End Matrix MTTE\"$" >> $1_$2_write.r
	fi
    fi
    if [ ! "$ignore_matrix" = "yes" ]; then
	n=`first "$ns"`; ns=`rest "$ns"` 
	m=`first "$ms"`; ms=`rest "$ms"`
	is=`n2m 1 $n`; 
	js=`n2m 1 $m`; 
	echo "write \"% Begin Matrix MTT${matrix}\"$" >> $1_$2_write.r
	if [ $n -ge 1 ]; then
	    for i in $is; do

Modified mttroot/mtt/bin/trans/mtt_optimise from [543d412814] to [ed8d518642].

11
12
13
14
15
16
17
18

19
20
21
22
23
24
25
11
12
13
14
15
16
17

18
19
20
21
22
23
24
25







-
+







E_REP_NOT_SUPPORTED=-19
E_FILE_NOT_EXIST=-20

case $representation in
    ae)
	matrix=yz ;
	nmatrix=`mtt_getsize $system yz` ;;
    cse | csex)
    csex)
	matrix=edx ;
	nmatrix=`mtt_getsize $system x` ;;
    ode)
	matrix=dx ;
	nmatrix=`mtt_getsize $system x` ;;
    cseo | odeo)
	matrix=y ;


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]