Overview
Comment:Added the update function for numpar only
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 4950f8ffd3f5001a0435437e97a54d071544525a81b6337c8b4b3edbf287cfc3
User & Date: gawthrop@users.sourceforge.net on 2000-10-12 15:11:54
Other Links: branch diff | manifest | tags
Context
2000-10-12
17:57:34
Fixed header typos check-in: 53272e14e0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:11:54
Added the update function for numpar only check-in: 4950f8ffd3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:11:30
Added the update switch check-in: 57f41d684e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [6ad3293cd2] to [0040f711d1].

11
12
13
14
15
16
17



18
19
20
21
22
23
24
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$



## Revision 1.272  2000/10/06 16:20:00  peterg
## added ode_write rule
##
## Revision 1.271  2000/10/03 12:14:25  peterg
## Version 4.8
##
## Revision 1.270  2000/10/03 12:13:51  peterg







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.273  2000/10/10 21:00:27  peterg
## More changes for new code gneration
##
## Revision 1.272  2000/10/06 16:20:00  peterg
## added ode_write rule
##
## Revision 1.271  2000/10/03 12:14:25  peterg
## Version 4.8
##
## Revision 1.270  2000/10/03 12:13:51  peterg
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
    echo '       mtt warranty'
    echo '       mtt clean           -- cleans up intermediate files'
    echo '       mtt rclean          -- recursively cleans up intermediate files'
    echo '       mtt Clean           -- cleans up all generated files'
    echo '       mtt <system_name> clean'
    echo '       mtt copy <system_name> <path_name>'
    echo '       mtt rename <old_name> <new_name>'
    echo '       mtt <system_name> <representation> vc'
    echo '       mtt <system_name> <representation> <language>'
    echo '       mtt <system_name> <representation> <language> <parameters>'
    echo 'Options: -q  quiet mode -- suppress MTT banner'
    echo '         -A  solve algebraic equations symbolically'
    echo '         -D  debug -- leave log files etc'
    echo '         -I  prints more information'
    echo '         -abg start at abg.m representation'







|







1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
    echo '       mtt warranty'
    echo '       mtt clean           -- cleans up intermediate files'
    echo '       mtt rclean          -- recursively cleans up intermediate files'
    echo '       mtt Clean           -- cleans up all generated files'
    echo '       mtt <system_name> clean'
    echo '       mtt copy <system_name> <path_name>'
    echo '       mtt rename <old_name> <new_name>'
    echo '       mtt <system_name> <representation> vc' 
    echo '       mtt <system_name> <representation> <language>'
    echo '       mtt <system_name> <representation> <language> <parameters>'
    echo 'Options: -q  quiet mode -- suppress MTT banner'
    echo '         -A  solve algebraic equations symbolically'
    echo '         -D  debug -- leave log files etc'
    echo '         -I  prints more information'
    echo '         -abg start at abg.m representation'
1423
1424
1425
1426
1427
1428
1429



1430
1431
1432
1433
1434
1435
1436


# Version control
VC=''

if [ "$3" = "vc" ]; then
  tidy=untidy;



  case $2 in
	abg )
		VC='ok'
		VCext='fig' ;;
	lbl )
		VC='ok'
		VCext='txt' ;;







>
>
>







1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442


# Version control
VC=''

if [ "$3" = "vc" ]; then
  tidy=untidy;
  if [ -n "$4" ]; then
  log_message=-m$4  
  fi
  case $2 in
	abg )
		VC='ok'
		VCext='fig' ;;
	lbl )
		VC='ok'
		VCext='txt' ;;
1926
1927
1928
1929
1930
1931
1932

1933
1934

1935
1936
1937
1938
1939
1940
1941
1942
1943

#SUMMARY simpar	simulation information (m)
$1_simpar.m: $1_simpar.txt
	mtt_txt2m $1 simpar


#SUMMARY numpar	numerical parameter declaration -- default (txt) 

$1_numpar.txt:
	mtt $mtt_switches -q -u $1 sympar txt; 

	sympar2numpar_txt2txt $1

#SUMMARY numpar	numerical parameter declaration (m) 
$1_numpar.m:  $1_numpar.txt $1_sympars.txt
	mtt_txt2m $1 numpar

#SUMMARY numpar	numerical parameter declaration (c) 
#SUMMARY numpar	numerical parameter declaration (view) 
$1_numpar.c:  $1_numpar.txt $1_sympar.c







>
|
|
>
|
|







1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951

#SUMMARY simpar	simulation information (m)
$1_simpar.m: $1_simpar.txt
	mtt_txt2m $1 simpar


#SUMMARY numpar	numerical parameter declaration -- default (txt) 
ifeq ($target,$1_numpar.txt)
$1_numpar.txt: $1_sympar.txt
	mtt_update $1 numpar update
else
	mtt_update $1 numpar
endif
#SUMMARY numpar	numerical parameter declaration (m) 
$1_numpar.m:  $1_numpar.txt $1_sympars.txt
	mtt_txt2m $1 numpar

#SUMMARY numpar	numerical parameter declaration (c) 
#SUMMARY numpar	numerical parameter declaration (view) 
$1_numpar.c:  $1_numpar.txt $1_sympar.c
2151
2152
2153
2154
2155
2156
2157
2158

2159
2160
2161
2162
2163
2164
2165


2166
2167
2168
2169
2170
2171
2172
#SUMMARY cse*	constrained-state equations (oct)
#SUMMARY cse	constrained-state equations (tex)
#SUMMARY cse*	constrained-state equations (view)
#SUMMARY cse	constrained-state equations (ps)
#Constrained-state equations
$1_cse.r: $1_dae.r $1_def.r $1_sympar.r $1_subs.r 
	dae2cse_r $Solve $1; tidy $1_cse.r $1_subs.r


$1_cseo.r: $1_cse.r
	touch $1_cseo.r

#$1_cse.m: $1_def.r $1_cse.r $1_sympar.r  $1_subs.r 
#	cse_r2m $1; matlab_tidy $1_cse.m
$1_cse.m: $1_def.r $1_cse.r $1_sympars.txt
	mtt_r2m $optimise -parameters  $1 cse;#  matlab_tidy $1_cse.m; matlab_tidy $1_cseo.m; 


$1_cseo.m: $1_def.r $1_cseo.r $1_sympars.txt
	mtt_r2m $optimise -parameters  $1 cseo;#  matlab_tidy $1_cse.m; matlab_tidy $1_cseo.m; 
$1_cse.tex: $1_cse.r  $1_sympar.r $1_simp.r
	cse_r2tex $1 $2; latex_tidy $1_cse.tex


#SUMMARY scse	sensitivity constrained-state equations (r)







|
>







>
>







2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
#SUMMARY cse*	constrained-state equations (oct)
#SUMMARY cse	constrained-state equations (tex)
#SUMMARY cse*	constrained-state equations (view)
#SUMMARY cse	constrained-state equations (ps)
#Constrained-state equations
$1_cse.r: $1_dae.r $1_def.r $1_sympar.r $1_subs.r 
	dae2cse_r $Solve $1; tidy $1_cse.r $1_subs.r
$1_csex.r: $1_cse.r
	touch $1_csex.r
$1_cseo.r: $1_cse.r
	touch $1_cseo.r

#$1_cse.m: $1_def.r $1_cse.r $1_sympar.r  $1_subs.r 
#	cse_r2m $1; matlab_tidy $1_cse.m
$1_cse.m: $1_def.r $1_cse.r $1_sympars.txt
	mtt_r2m $optimise -parameters  $1 cse;#  matlab_tidy $1_cse.m; matlab_tidy $1_cseo.m; 
$1_csex.m: $1_def.r $1_csex.r $1_sympars.txt
	mtt_r2m $1 csex
$1_cseo.m: $1_def.r $1_cseo.r $1_sympars.txt
	mtt_r2m $optimise -parameters  $1 cseo;#  matlab_tidy $1_cse.m; matlab_tidy $1_cseo.m; 
$1_cse.tex: $1_cse.r  $1_sympar.r $1_simp.r
	cse_r2tex $1 $2; latex_tidy $1_cse.tex


#SUMMARY scse	sensitivity constrained-state equations (r)
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
$1_ode.tex: $1_ode.r  $1_sympar.r $1_simp.r
	ode_r2tex $1; latex_tidy $1_ode.tex

# The main simulation programme
ifeq ($integration_method,implicit)
$1_ode2odes.m : $1_def.r $1_sympars.txt $1_smxa.$m $1_smxax.$m\
		$1_simpar.m $1_numpar.m $1_state.m $1_input.m \
		$1_cse.$m $1_cseo.$m  $1_switchopen.m
	make_ode2odes $1 $integration_method
endif
ifeq ($integration_method,euler)
$1_ode2odes.m : $1_def.r $1_sympars.txt\
		$1_simpar.m $1_numpar.m $1_state.m $1_input.m \
		$1_ode.$m $1_odeo.$m  $1_switchopen.m
	make_ode2odes $1 $integration_method







|







2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
$1_ode.tex: $1_ode.r  $1_sympar.r $1_simp.r
	ode_r2tex $1; latex_tidy $1_ode.tex

# The main simulation programme
ifeq ($integration_method,implicit)
$1_ode2odes.m : $1_def.r $1_sympars.txt $1_smxa.$m $1_smxax.$m\
		$1_simpar.m $1_numpar.m $1_state.m $1_input.m \
		$1_csex.$m $1_cseo.$m  $1_switchopen.m
	make_ode2odes $1 $integration_method
endif
ifeq ($integration_method,euler)
$1_ode2odes.m : $1_def.r $1_sympars.txt\
		$1_simpar.m $1_numpar.m $1_state.m $1_input.m \
		$1_ode.$m $1_odeo.$m  $1_switchopen.m
	make_ode2odes $1 $integration_method
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
	mtt_m2p $1_input.m
endif

$1_ode.p : $1_def.r $1_ode.m
	mtt_m2p $1_ode.m
$1_odeo.p : $1_def.r $1_odeo.m
	mtt_m2p $1_odeo.m
$1_cse.p : $1_def.r $1_cse.m
	mtt_m2p $1_cse.m
$1_cseo.p : $1_def.r $1_cseo.m
	mtt_m2p $1_cseo.m
$1_smx.p : $1_def.r $1_smx.m
	mtt_m2p $1_smx.m
$1_smxa.p : $1_def.r $1_smxa.m
	mtt_m2p $1_smxa.m
$1_smxax.p : $1_def.r $1_smxax.m
	mtt_m2p $1_smxax.m
$1_switchopen.p : $1_def.r $1_switchopen.m
	mtt_m2p $1_switchopen.m

ifeq ($integration_method,implicit)
$1_ode2odes.p : $1_ode2odes.m $1_def.r $1_smxa.p $1_smxax.p\
		$1_simpar.p $1_numpar.p $1_state.p $1_input.p \
		$1_cse.p $1_cseo.p  $1_switchopen.p
	mtt_m2p $1_ode2odes.m $integration_method $stdin
endif
ifeq ($integration_method,euler)
$1_ode2odes.p : $1_ode2odes.m $1_def.r\
		$1_simpar.p $1_numpar.p $1_state.p $1_input.p \
		$1_ode.p $1_odeo.p  $1_switchopen.p
	mtt_m2p $1_ode2odes.m $integration_method $stdin







|
|














|







2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
	mtt_m2p $1_input.m
endif

$1_ode.p : $1_def.r $1_ode.m
	mtt_m2p $1_ode.m
$1_odeo.p : $1_def.r $1_odeo.m
	mtt_m2p $1_odeo.m
$1_csex.p : $1_def.r $1_cse.m
	mtt_m2p $1_csex.m
$1_cseo.p : $1_def.r $1_cseo.m
	mtt_m2p $1_cseo.m
$1_smx.p : $1_def.r $1_smx.m
	mtt_m2p $1_smx.m
$1_smxa.p : $1_def.r $1_smxa.m
	mtt_m2p $1_smxa.m
$1_smxax.p : $1_def.r $1_smxax.m
	mtt_m2p $1_smxax.m
$1_switchopen.p : $1_def.r $1_switchopen.m
	mtt_m2p $1_switchopen.m

ifeq ($integration_method,implicit)
$1_ode2odes.p : $1_ode2odes.m $1_def.r $1_smxa.p $1_smxax.p\
		$1_simpar.p $1_numpar.p $1_state.p $1_input.p \
		$1_csex.p $1_cseo.p  $1_switchopen.p
	mtt_m2p $1_ode2odes.m $integration_method $stdin
endif
ifeq ($integration_method,euler)
$1_ode2odes.p : $1_ode2odes.m $1_def.r\
		$1_simpar.p $1_numpar.p $1_state.p $1_input.p \
		$1_ode.p $1_odeo.p  $1_switchopen.p
	mtt_m2p $1_ode2odes.m $integration_method $stdin
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835

# Version control system - uses RCS
RCS:
	echo Creating RCS
	mkdir RCS
$1_$2.vc: RCS 
	echo Version control on $1_$2.$VCext
	ci -I $1_$2.$VCext </dev/tty  ; co -l $1_$2.$VCext 

EOF
# Remember the exit status of make
make_status=$?

# Tidy up.
# echo Removing log files and other garbage







|







2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846

# Version control system - uses RCS
RCS:
	echo Creating RCS
	mkdir RCS
$1_$2.vc: RCS 
	echo Version control on $1_$2.$VCext
	ci $log_message -I $1_$2.$VCext </dev/tty  ; co -l $1_$2.$VCext 

EOF
# Remember the exit status of make
make_status=$?

# Tidy up.
# echo Removing log files and other garbage


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