Overview
Comment:Now write default states (using _struc file).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: cde2507a4aabe23fb3a0384456279c781232bf8251b0088935299ef9fee120d8
User & Date: gawthrop@users.sourceforge.net on 1997-05-15 08:30:14
Other Links: branch diff | manifest | tags
Context
1997-05-15
08:33:07
Declare state array (x). check-in: e031e694ec user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:30:14
Now write default states (using _struc file). check-in: cde2507a4a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
07:21:44
Put back "tolower" check-in: eddc74515a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/sympar2numpar_txt2txt from [35017b2056] to [fa6475c884].

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
# Copyright (c) P.J.Gawthrop 1996

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



# Revision 1.3  1997/05/15  07:13:31  peterg
# Removed "tolower" function.
#
# Revision 1.2  1997/05/01  08:19:04  peterg
# # is now used as the comment symbol
#
# Revision 1.1  1997/05/01  07:35:48  peterg
# Initial revision
#
###############################################################


# Inform user
echo Creating $1_numpar.txt

#Create the numpar file complete with headers.
echo "# Numerical parameter file ($1_numpar.txt)" > $1_numpar.txt
echo "# Generated by MTT at `date`" >> $1_numpar.txt
cat $MTTPATH/trans/rcs_header.txt  >> $1_numpar.txt

#Write out the variables in c format.

awk '{i++; print tolower($1) " = \t1.0; \# Default value"}' $1_sympar.txt \
>> $1_numpar.txt




















>
>
>




















|
>



>
>
>
>
>
>
>
>




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
46
47
48
49
50
51
52
53
54
55
56
# Copyright (c) P.J.Gawthrop 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.4  1997/05/15  07:19:19  peterg
# Put back "tolower"
#
# Revision 1.3  1997/05/15  07:13:31  peterg
# Removed "tolower" function.
#
# Revision 1.2  1997/05/01  08:19:04  peterg
# # is now used as the comment symbol
#
# Revision 1.1  1997/05/01  07:35:48  peterg
# Initial revision
#
###############################################################


# Inform user
echo Creating $1_numpar.txt

#Create the numpar file complete with headers.
echo "# Numerical parameter file ($1_numpar.txt)" > $1_numpar.txt
echo "# Generated by MTT at `date`" >> $1_numpar.txt
cat $MTTPATH/trans/rcs_header.txt  >> $1_numpar.txt

#Write out the variables 
echo "# Parameters" >> $1_numpar.txt
awk '{i++; print tolower($1) " = \t1.0; \# Default value"}' $1_sympar.txt \
>> $1_numpar.txt

#Write out the initial states
echo "# Initial states" >> $1_numpar.txt
awk '{
  if ($1=="state") 
    print "x[" $2 "] = \t0.0; \# Initial state for " $4 " (" $3 ")"
}' \
 $1_struc.txt >> $1_numpar.txt






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