Differences From Artifact [0987d9a6d1]:

To Artifact [fd9c2c8fdf]:


11
12
13
14
15
16
17



18
19
20
21
22
23
24


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



# %% Revision 1.8  1998/08/10 13:57:33  peterg
# %% Removed debugging lines
# %%
# %% Revision 1.7  1998/08/10 13:55:11  peterg
# %% Added option of computing from ss values
# %%
# %% Revision 1.6  1998/07/27 20:32:11  peterg







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27


# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %% Version control history
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %% $Id$
# %% $Log$
# %% Revision 1.9  2000/10/10 21:03:06  peterg
# %% *** empty log message ***
# %%
# %% Revision 1.8  1998/08/10 13:57:33  peterg
# %% Removed debugging lines
# %%
# %% Revision 1.7  1998/08/10 13:55:11  peterg
# %% Added option of computing from ss values
# %%
# %% Revision 1.6  1998/07/27 20:32:11  peterg
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
		steadystate_computation=yes ;;
	*)
		echo "$1 is an invalid argument - ignoring" ;;
  esac
  shift
done




#Create the state file complete with headers.
echo '# -*-octave-*- Put Emacs into octave-mode' > $1_state.txt
echo "# Initial state  file ($1_state.txt)" >> $1_state.txt
echo "# Generated by MTT at `date`" >> $1_state.txt
cat $MTTPATH/trans/rcs_header.sh  >> $1_state.txt








|
>







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
		steadystate_computation=yes ;;
	*)
		echo "$1 is an invalid argument - ignoring" ;;
  esac
  shift
done

# Default state
default='0.0'

#Create the state file complete with headers.
echo '# -*-octave-*- Put Emacs into octave-mode' > $1_state.txt
echo "# Initial state  file ($1_state.txt)" >> $1_state.txt
echo "# Generated by MTT at `date`" >> $1_state.txt
cat $MTTPATH/trans/rcs_header.sh  >> $1_state.txt

74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
89
90
91
92
93
94
95
    j++
    split($0,a,"=");
    x[j]=a[2];
  }
    
  if($1=="state") {
    i++; 
    print  "x(" i ") =\t", x[i], " \# " $4 " (" $3 ")"

  }
}'  >> $1_state.txt
else
# Set states to zero
# Inform user
echo Creating $1_state.txt - default states to zero

awk '{
  if ($1=="state") printf("mttx(%s) \t= 0.0; \t\# %s (%s)\n", $2,$3,$4)
}' <$1_struc.txt >> $1_state.txt
    
fi









|
>





|


|
|




78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
    j++
    split($0,a,"=");
    x[j]=a[2];
  }
    
  if($1=="state") {
    i++; 
    # print  "x(" i ") =\t", x[i], " \# " $4 " (" $3 ")"
    printf("%s =\t%s; # MTT initial value\n", $4, x[i]);
  }
}'  >> $1_state.txt
else
# Set states to zero
# Inform user
echo Creating $1_state.txt - default states to $default

awk '{
  if ($1=="state") printf("%s \t= %s; # MTT initial value\n", $4, default)
}' default=$default <$1_struc.txt >> $1_state.txt
    
fi



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