Overview
Comment:Added -cr option to load CRs first - avoids alg. loops with R
implementation of mutiports.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: ffc651557131f727c55f180badb9602ab291a6130f9bd78f6c7e2129cac41024
User & Date: gawthrop@users.sourceforge.net on 2001-07-23 23:31:17
Other Links: branch diff | manifest | tags
Context
2001-07-23
23:43:15
header only version does not need to compute sizes from _def.r check-in: bf477db669 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
23:31:17
Added -cr option to load CRs first - avoids alg. loops with R
implementation of mutiports.
check-in: ffc6515571 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
23:29:20
Don't read "params.r" check-in: 10ea327389 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/ese2rdae_r from [d1a65686e6] to [713fa3d927].

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.10  2000/11/30 15:23:16  peterg
## Taken out all subsystem stuff - now done in mtt using
## mtt_make_subsystems
##
## Revision 1.9  2000/09/07 12:18:31  peterg
## Prettified layout of this file
##







>
>
>
>
>







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.11  2001/07/06 00:46:50  gawthrop
## Added -cr option -- forces cr to be loaded before the ese.r file
## This avoids causality problems when using multi-port Rs to represent
## arbitary equations
##
## Revision 1.10  2000/11/30 15:23:16  peterg
## Taken out all subsystem stuff - now done in mtt using
## mtt_make_subsystems
##
## Revision 1.9  2000/09/07 12:18:31  peterg
## Prettified layout of this file
##
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

while [ -n "`echo $1 | grep '^-'`" ]; do
  case $1 in
	-I )
                info=info;;
	-cr )
                load_cr=yes;
                blurb2=' using cr first';
                ;;
	-partition )
                partition=yes;
                blurb='with partitioning';
		;;
	*)
		echo "$1 is an invalid argument - ignoring";







|







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

while [ -n "`echo $1 | grep '^-'`" ]; do
  case $1 in
	-I )
                info=info;;
	-cr )
                load_cr=yes;
                blurb2=' using cr and subs first';
                ;;
	-partition )
                partition=yes;
                blurb='with partitioning';
		;;
	*)
		echo "$1 is an invalid argument - ignoring";
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
	sysname=$topname;
    else
	sysname=$1_$2;
fi

defname=$topname"_def.r"
crname=$topname"_cr.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}\";"

fi

# Inform user
echo Creating $daename $blurb $blurb2

# Remove the old log file
rm -f $logname

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

%Read in the the cr is -cr set
$load_cr_comm


%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

% Definitions
in "$defname";








>







>











|

>







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
	sysname=$topname;
    else
	sysname=$1_$2;
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

# Remove the old log file
rm -f $logname

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

%Read in the cr and sub when  -cr is set
$load_cr_comm
$load_subs_comm

%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

% Definitions
in "$defname";


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