Differences From Artifact [4b36af9cb9]:

To Artifact [793816fd35]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15



16
17
18
19
20
21
22
#!/bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: def2write.r
# Generates r code to write matrices
# Copyright (C) 2000 by Peter J. Gawthrop

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



## Revision 1.11.2.2  2002/06/05 17:57:47  geraint
## Main part of optimisation routine moved to separate file.
##
## Revision 1.11.2.1  2002/06/05 11:14:51  geraint
## ae.r now generated using def2write_r like cse?.r
## fix_c.r called at ese2rdae stage so that pow gets fixed in ae.r.
##

|













>
>
>







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
#!/bin/sh
set -x
     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: def2write.r
# Generates r code to write matrices
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.11.2.3  2002/06/05 18:23:38  geraint
## Cosmetic change.
##
## Revision 1.11.2.2  2002/06/05 17:57:47  geraint
## Main part of optimisation routine moved to separate file.
##
## Revision 1.11.2.1  2002/06/05 11:14:51  geraint
## ae.r now generated using def2write_r like cse?.r
## fix_c.r called at ese2rdae stage so that pow gets fixed in ae.r.
##
166
167
168
169
170
171
172

173
174
175

176
177
178


179
180
181
182
183
184
185
186
{
    sys="$1"
    lhs="$2"

    lhs=`echo $lhs | sed 's/MTTEdX/MTTdX/'`
    
    dae="${sys}_dae.r"


    exp=`grep -i -e "^$lhs" $dae`
    rhs=`echo $exp | sed 's/.*:=\ \(.*\)/\1/'`

    rhs=`echo $rhs | sed 's/[;$]*$//'`

    if [ ! -z "${rhs}" ]; then


	mtt_optimise.sh "$lhs" "$rhs" | mtt_fix_integers
    fi

    return
}


# Remove log files







>

|
|
>
|


>
>
|







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
{
    sys="$1"
    lhs="$2"

    lhs=`echo $lhs | sed 's/MTTEdX/MTTdX/'`
    
    dae="${sys}_dae.r"
    tmp=mtt_optimise.tmp

    rhs=`eval "grep -i -e \"^$lhs\"" $dae`
    rhs=`eval echo "\"$rhs"\" | gawk -v FS=":=" '{ print $2 }'`
    rhs=`eval echo "\"$rhs"\" | eval "sed 's/\([.]*\)[;$]*$/\1/'"`
    rhs=`eval echo "\"$rhs"\" | eval "sed 's/\ //g'"`

    if [ ! -z "${rhs}" ]; then
	eval echo \"$lhs\" \"$rhs\" > $tmp
	eval mtt_optimise.sh $tmp
	cat $tmp #| mtt_fix_integers
    fi

    return
}


# Remove log files

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