Overview
Comment:Added -sort option to use sorted equation (sese.r) instead of ese.r
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: c3f62ae937572f266a06b961189fb2ba66f9900269d0992d80559d90123db263
User & Date: geraint@users.sourceforge.net on 2004-08-29 14:38:21
Other Links: branch diff | manifest | tags
Context
2004-08-29
14:39:23
Added rule to create dae from sorted equations (sese) if sorting is requested. check-in: f98d517043 user: geraint@users.sourceforge.net tags: origin/master, trunk
14:38:21
Added -sort option to use sorted equation (sese.r) instead of ese.r check-in: c3f62ae937 user: geraint@users.sourceforge.net tags: origin/master, trunk
13:17:30
Added rules to use sae (sorted algebraic equations) instead
of ae if sorted equations are being used.

Converted temporary variable names to lowercase in sorted
sympar.h to match code output from mtt_r2m. check-in: 390cf34719 user: geraint@users.sourceforge.net tags: origin/master, trunk

Changes

Modified mttroot/mtt/bin/trans/ese2rdae_r from [863b78c116] to [c877f50297].

10
11
12
13
14
15
16




17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop, 1991, 1994, 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$




## Revision 1.13  2002/06/28 10:13:40  geraint
## Includes fix_c.r in ese2rdae and def2write_r to eliminate occurrances of x**y.
##
## Revision 1.12.2.2  2002/06/05 17:28:00  geraint
## Cosmetic change.
##
## Revision 1.12.2.1  2002/06/05 11:14:51  geraint







>
>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) P.J.Gawthrop, 1991, 1994, 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.14  2002/08/30 15:39:04  geraint
## Read fix_c.r before ese.r and explicitly overload ** operator with pow().
## These changes are required for the Codemist version of Reduce.
##
## Revision 1.13  2002/06/28 10:13:40  geraint
## Includes fix_c.r in ese2rdae and def2write_r to eliminate occurrances of x**y.
##
## Revision 1.12.2.2  2002/06/05 17:28:00  geraint
## Cosmetic change.
##
## Revision 1.12.2.1  2002/06/05 11:14:51  geraint
123
124
125
126
127
128
129




130
131
132
133
134
135
136
		include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'`
		blurb3='fixing c and cc code';
		;;
	-partition )
                partition=yes;
                blurb='with partitioning';
		;;




	*)
		echo "$1 is an invalid argument - ignoring";
                exit ;;
  esac
  shift
done








>
>
>
>







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
		include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'`
		blurb3='fixing c and cc code';
		;;
	-partition )
                partition=yes;
                blurb='with partitioning';
		;;
      -sort )
	  	sort=sort;
		blurb1='using sorted equations';
		;;
	*)
		echo "$1 is an invalid argument - ignoring";
                exit ;;
  esac
  shift
done

146
147
148
149
150
151
152




153


154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
fi

defname=$topname"_def.r"
crname=$topname"_cr.r"
subsname=$topname"_subs.r"
paramname=$topname"_params.r"
daename=$sysname"_rdae.r"




esename=$sysname"_ese.r"


logname=ese2rdae.log

if [ -n "${load_cr}" ]; then
    load_cr_comm="in \"${crname}\";"
    load_subs_comm="in \"${subsname}\";"
fi

# Inform user
echo Creating $daename $blurb $blurb2 $blurb3

# Remove the old log file
rm -f $logname

# Use symbolic algebra to accomplish the transformation
$SYMBOLIC >$logname  << EOF








>
>
>
>
|
>
>








|







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
fi

defname=$topname"_def.r"
crname=$topname"_cr.r"
subsname=$topname"_subs.r"
paramname=$topname"_params.r"
daename=$sysname"_rdae.r"

if [ -n "$sort" ]; then
    esename=$sysname"_sese.r"
else
    esename=$sysname"_ese.r"
fi

logname=ese2rdae.log

if [ -n "${load_cr}" ]; then
    load_cr_comm="in \"${crname}\";"
    load_subs_comm="in \"${subsname}\";"
fi

# Inform user
echo Creating $daename $blurb $blurb1 $blurb2 $blurb3

# Remove the old log file
rm -f $logname

# Use symbolic algebra to accomplish the transformation
$SYMBOLIC >$logname  << EOF


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