Overview
Comment:Simplified output format
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: ceb43f71c95077c4cd5bf6fa241fe3e136d3d886a4c031a2843b6a046da99b7f
User & Date: gawthrop@users.sourceforge.net on 1998-02-04 12:26:47
Other Links: branch diff | manifest | tags
Context
1998-02-04
16:50:50
Introduced the tidy (-t and -T) options check-in: 8ecfc83c2e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:26:47
Simplified output format check-in: ceb43f71c9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:45:05
Less verbose comments. check-in: ac243cb4d3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/struc2input_txt2txt from [1f4944e546] to [0ed000bbe1].

10
11
12
13
14
15
16



17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop 1997

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



## Revision 1.3  1998/01/29 17:06:21  peterg
## Better annotation of each input
##
## Revision 1.2  1997/05/15 09:44:12  peterg
## Put switches into the input file.
##
# Revision 1.1  1997/05/03  14:55:17  peterg







>
>
>







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.4  1998/02/04 11:45:05  peterg
## Less verbose comments.
##
## Revision 1.3  1998/01/29 17:06:21  peterg
## Better annotation of each input
##
## Revision 1.2  1997/05/15 09:44:12  peterg
## Put switches into the input file.
##
# Revision 1.1  1997/05/03  14:55:17  peterg
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
echo "# Generated by MTT at `date`" >> $1_input.txt
cat $MTTPATH/trans/rcs_header.txt  >> $1_input.txt

#Write out the defaults -- inputs
  echo "# Set the inputs"  >> $1_input.txt
awk '{
  i++; 
  if($1=="input") print  "u(" i ") =\t1.0; \# System " $4 ", Component " $3 
}' $1_struc.txt >> $1_input.txt


#Set some switches
if [ "$switches" = "yes" ]; then
  echo  >> $1_input.txt
  echo "# Set the switches"  >> $1_input.txt
  awk '{print  tolower($1) "= (t>=0);"}'< $1_switch.txt   >> $1_input.txt
fi










|












50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
echo "# Generated by MTT at `date`" >> $1_input.txt
cat $MTTPATH/trans/rcs_header.txt  >> $1_input.txt

#Write out the defaults -- inputs
  echo "# Set the inputs"  >> $1_input.txt
awk '{
  i++; 
  if($1=="input") print  "u(" i ") =\t1.0; \# " $4 " (" $3 ")"
}' $1_struc.txt >> $1_input.txt


#Set some switches
if [ "$switches" = "yes" ]; then
  echo  >> $1_input.txt
  echo "# Set the switches"  >> $1_input.txt
  awk '{print  tolower($1) "= (t>=0);"}'< $1_switch.txt   >> $1_input.txt
fi



Modified mttroot/mtt/bin/trans/sympar2numpar_txt2txt from [378e637777] to [ab451d3396].

10
11
12
13
14
15
16



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

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



## Revision 1.7  1997/09/18 17:10:18  peterg
## Changed comments pertaining to the parameters to use the new column 2
## of the sympar file (the system type).
## Added blank line to separate parmeters from states.
## (Done in the Chester Court Hotel).
##
## Revision 1.6  1997/06/13 09:34:39  peterg







>
>
>







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.8  1998/01/29 17:06:36  peterg
## Better annotation
##
## Revision 1.7  1997/09/18 17:10:18  peterg
## Changed comments pertaining to the parameters to use the new column 2
## of the sympar file (the system type).
## Added blank line to separate parmeters from states.
## (Done in the Chester Court Hotel).
##
## Revision 1.6  1997/06/13 09:34:39  peterg
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#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; \# Parameter " $1 " for " $2}' $1_sympar.txt \
>> $1_numpar.txt

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












|







|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#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; \# " $2}' $1_sympar.txt \
>> $1_numpar.txt

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






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