Overview
Comment:Cosmetic changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 60b9cd93c1b2de7c5be9a0dcf252d3bc3a3dd6ca0db3b44f6a749823a3d71a12
User & Date: gawthrop@users.sourceforge.net on 1997-03-18 17:56:35
Other Links: branch diff | manifest | tags
Context
1997-03-18
17:58:12
Generates label files containing all variables in fig file.
Generates sympar file for all levels in system.
Generates txt version of sympar file.
check-in: afe4d4652f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
17:56:35
Cosmetic changes. check-in: 60b9cd93c1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
17:28:45
Initial revision check-in: e053323e1e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/sympar_txt2r from [299a1fa6e1] to [2cf0de2167].

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
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












+
+
+
+
+
+
+







-
-
+
+
+

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


-
+


#! /bin/sh

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

# Bourne shell script: sympar_txt2r

# Label file to symbolic parameters conversion
# P.J.Gawthrop August 1996
# Copyright (c) P.J.Gawthrop, 1996.

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


# Inform user
echo "Creating $1_sympar.r"

rm -f mtt_error

#Write some file headers
echo "%% Symbolic parameter file ($1_sympar.r)" > $1_sympar.r
echo "%% Generated by MTT at `date`" >> $1_sympar.r
echo "%% Symbolic parameter file ($1_sympar.r)"  > $1_sympar.r
echo "%% Generated by MTT at `date`"  >> $1_sympar.r
echo  >> $1_sympar.r

#Count the lines in the file
lines=`grep -c  '.' $1_sympar.txt`
echo "MATRIX MTTVAR($lines,1);"   >> $1_sympar.r
echo "MTTNVAR = $lines;"   >> $1_sympar.r
echo   >> $1_sympar.r
# This is the main transformation using gawk
tr ';' ',' <  $1_lbl.txt | \
gawk -f $MTTPATH/trans/awk/sympar.awk | sort >> $1_sympar.r 2>mtt_error.txt

#Write out the variables in reduce format.
awk '{i++; print "MTTVAR(" i ",1) := " $1 ";"}' $1_sympar.txt  >> $1_sympar.r

echo 'END;'  >> $1_sympar.r

# Now invoke the standard error handling.
mtt_error mtt_error.txt
# mtt_error mtt_error.txt



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