Overview
Comment:Added -o switch -- ode and dae are the same
Added switches to default menu
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 645d1d2c5c8d900895cb9e60a8c8a74a4f4e742cabbef0c71580213f8a7edff9
User & Date: gawthrop@users.sourceforge.net on 1997-04-23 07:26:49
Other Links: branch diff | manifest | tags
Context
1997-04-29
09:12:37
Added error message if port label near to >1 bond. check-in: 655583a1e5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1997-04-23
07:26:49
Added -o switch -- ode and dae are the same
Added switches to default menu
check-in: 645d1d2c5c user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1997-04-22
12:50:15
New much simpler version -- does not check for multiple crs -- these
are removed later anyway.
check-in: 3661becaf8 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [ff53c1086c] to [3253a3752e].

10
11
12
13
14
15
16



17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.

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



# Revision 1.65  1997/04/15  15:16:12  peterg
# Added structure (_struc) files.
# Fixed prob with dvi2ps conversion -- removed .doc extension.
#
# Revision 1.64  1997/04/09  09:26:44  peterg
# Added crcopy feature to pull crs from library -- similar to copy
# feature.







>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
# Revision 1.66  1997/04/16  09:46:01  peterg
# More informative copy message
#
# Revision 1.65  1997/04/15  15:16:12  peterg
# Added structure (_struc) files.
# Fixed prob with dvi2ps conversion -- removed .doc extension.
#
# Revision 1.64  1997/04/09  09:26:44  peterg
# Added crcopy feature to pull crs from library -- similar to copy
# feature.
235
236
237
238
239
240
241



242
243
244
245
246
247
248
249


250
251
252
253
254
255
256
###############################################################

# MTT recursion level is zero unless explicitly set
level=0

#Computation mode is octave by default
computation=octave




#Look for a command line argument
while [ -n "`echo $1 | grep '-'`" ]; do
  case $1 in
	-q )
		quiet=quiet ;;
	-c )
		computation=c ;;


	-l )
		level=$2; shift ;;
  esac
  shift
done

#Print header if not in quiet (-q) mode.







>
>
>








>
>







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
###############################################################

# MTT recursion level is zero unless explicitly set
level=0

#Computation mode is octave by default
computation=octave

#By default, the dae and ode representations are different
dae_is_ode=0

#Look for a command line argument
while [ -n "`echo $1 | grep '-'`" ]; do
  case $1 in
	-q )
		quiet=quiet ;;
	-c )
		computation=c ;;
	-o )
		dae_is_ode=1 ;;
	-l )
		level=$2; shift ;;
  esac
  shift
done

#Print header if not in quiet (-q) mode.
270
271
272
273
274
275
276



277
278
279
280
281
282
283
  echo '       mtt warranty'
  echo '       mtt clean'
  echo '       mtt <system_name> clean'
  echo '       mtt copy <system_name> <path_name>'
  echo '       mtt <system_name> <representation> vc'
  echo '       mtt <system_name> <representation> <language>'
  echo '       mtt <system_name> <representation> <language> <parameters>'



 exit
fi


if [ "$1" = "info" ]  && [ "$3" = "" ]; then
  echo Invoking info
  info -f $MTTPATH/doc/mtt.info $2







>
>
>







278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
  echo '       mtt warranty'
  echo '       mtt clean'
  echo '       mtt <system_name> clean'
  echo '       mtt copy <system_name> <path_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'
  echo '         -c  c-code generation'
  echo '         -o  ode and dae are the same'
 exit
fi


if [ "$1" = "info" ]  && [ "$3" = "" ]; then
  echo Invoking info
  info -f $MTTPATH/doc/mtt.info $2
588
589
590
591
592
593
594

595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
#SUMMARY numpar	numerical parameter declaration (m) 
$1_numpar.m: $1_sympar.r $1_params.m
	sympar2numpar_r2m $1

#SUMMARY numpar	numerical parameter declaration (c) 
$1_numpar.c: $1_sympar.r
	sympar2numpar_r2c $1


#SUMMARY params	numerical parameter setting (m)
 $1_params.m: 
	echo Creating $1_params.m
	( \
	echo "%% Parameter file for system $1 ($1_params.m)"; \
	echo "%% This file provides the system params for simulation:";\
	cat $MTTPATH/trans/m/rcs_header.txt; \
	echo; \
        )> $1_params.m

#SUMMARY params	numerical parameter setting (c)
 $1_params.c: 
	sympar2params_txt2c $1

#SUMMARY odes ODE simulation header file (h)
 $1_odes.h: 
	echo Creating $1_odes.h
	( \
	echo '/*'; \







>



<
<
<
<
<
<
|


|







599
600
601
602
603
604
605
606
607
608
609






610
611
612
613
614
615
616
617
618
619
620
#SUMMARY numpar	numerical parameter declaration (m) 
$1_numpar.m: $1_sympar.r $1_params.m
	sympar2numpar_r2m $1

#SUMMARY numpar	numerical parameter declaration (c) 
$1_numpar.c: $1_sympar.r
	sympar2numpar_r2c $1


#SUMMARY params	numerical parameter setting (m)
 $1_params.m: 






	sympar2params_txt2m $1

#SUMMARY params	numerical parameter setting (c)
 $1_params.c:
	sympar2params_txt2c $1

#SUMMARY odes ODE simulation header file (h)
 $1_odes.h: 
	echo Creating $1_odes.h
	( \
	echo '/*'; \
721
722
723
724
725
726
727

728
729
730
731
732
733
734
735
736
737
738
739


740
741
742
743
744
745
746
#SUMMARY cbg	causal bond graph (fig)
#Causal bond graph: mfile to fig conversion
$1_cbg.fig: $1_cbg.m $1_rbg.m $1_fig.fig $1_type.sh
	cbg_m2fig $1

#SUMMARY ese	elementary system equations (r)
#SUMMARY def	definitions - system orders etc. (r)

#SUMMARY struc	structure - list of inputs, outputs and states (txt)
#SUMMARY struc	structure - list of inputs, outputs and states (tex)
#SUMMARY struc	structure - list of inputs, outputs and states (view)
#Elementary system equations + definitions
$1_ese.r: $1_cbg.m
	   cbg2ese_m2r $1
$1_def.r: $1_ese.r
	touch $1_def.r
$1_struc.txt: $1_ese.r
	touch $1_struc.txt
$1_struc.tex: $1_struc.txt
	struc_txt2tex $1


$1_def.m: $1_def.r
	def_r2m $1; matlab_tidy $1_def.m;

#SUMMARY dae	differential-algebraic equations (r)
#SUMMARY dae	differential-algebraic equations (m)
#SUMMARY dae	differential-algebraic equations (tex)
#SUMMARY dae	differential-algebraic equations (view)







>












>
>







727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
#SUMMARY cbg	causal bond graph (fig)
#Causal bond graph: mfile to fig conversion
$1_cbg.fig: $1_cbg.m $1_rbg.m $1_fig.fig $1_type.sh
	cbg_m2fig $1

#SUMMARY ese	elementary system equations (r)
#SUMMARY def	definitions - system orders etc. (r)
#SUMMARY def	definitions - system orders etc. (m)
#SUMMARY struc	structure - list of inputs, outputs and states (txt)
#SUMMARY struc	structure - list of inputs, outputs and states (tex)
#SUMMARY struc	structure - list of inputs, outputs and states (view)
#Elementary system equations + definitions
$1_ese.r: $1_cbg.m
	   cbg2ese_m2r $1
$1_def.r: $1_ese.r
	touch $1_def.r
$1_struc.txt: $1_ese.r
	touch $1_struc.txt
$1_struc.tex: $1_struc.txt
	struc_txt2tex $1
$1_struc.m: $1_struc.txt 
	struc_txt2m $1
$1_def.m: $1_def.r
	def_r2m $1; matlab_tidy $1_def.m;

#SUMMARY dae	differential-algebraic equations (r)
#SUMMARY dae	differential-algebraic equations (m)
#SUMMARY dae	differential-algebraic equations (tex)
#SUMMARY dae	differential-algebraic equations (view)
771
772
773
774
775
776
777

778
779






780
781
782
783
784
785
786
#SUMMARY ode	ordinary differential equations (r)
#SUMMARY ode	ordinary differential equations (m)
#SUMMARY ode	ordinary differential equations (c)
#SUMMARY ode	ordinary differential equations (tex)
#SUMMARY ode	ordinary differential equations (view)
#SUMMARY ode	ordinary differential equations (ps)
#Ordinary differential equations

$1_ode.r: $1_cse.r $1_def.r $1_sympar.r
	cse2ode_r $1; tidy $1_ode.r






$1_ode.m: $1_def.r $1_ode.r $1_sympar.r 
	ode_r2m $1; matlab_tidy $1_ode.m; matlab_tidy $1_odeo.m
$1_ode.c: $1_def.r $1_ode.r $1_sympar.r $1_sympar.c
	ode_r2c $1
$1_ode.tex: $1_ode.r  $1_sympar.r $1_simp.r
	ode_r2tex $1; latex_tidy $1_ode.tex








>


>
>
>
>
>
>







780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
#SUMMARY ode	ordinary differential equations (r)
#SUMMARY ode	ordinary differential equations (m)
#SUMMARY ode	ordinary differential equations (c)
#SUMMARY ode	ordinary differential equations (tex)
#SUMMARY ode	ordinary differential equations (view)
#SUMMARY ode	ordinary differential equations (ps)
#Ordinary differential equations
ifeq ($dae_is_ode,0)
$1_ode.r: $1_cse.r $1_def.r $1_sympar.r
	cse2ode_r $1; tidy $1_ode.r
endif
ifeq ($dae_is_ode,1)
$1_ode.r: $1_dae.r
	echo Copying $1_dae.r to $1_ode.r
	cp $1_dae.r  $1_ode.r
endif
$1_ode.m: $1_def.r $1_ode.r $1_sympar.r 
	ode_r2m $1; matlab_tidy $1_ode.m; matlab_tidy $1_odeo.m
$1_ode.c: $1_def.r $1_ode.r $1_sympar.r $1_sympar.c
	ode_r2c $1
$1_ode.tex: $1_ode.r  $1_sympar.r $1_simp.r
	ode_r2tex $1; latex_tidy $1_ode.tex

826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
#SUMMARY dm	descriptor matrices (m)
#SUMMARY dm	descriptor matrices (tex)
#SUMMARY dm	descriptor matrices (view)
#SUMMARY dm	descriptor matrices (ps)
#Linearised system: descriptor matrices
$1_dm.r: $1_dae.r $1_def.r $1_cr.r  $1_ss.r $1_sympar.r
	dae2dm_r $1; tidy $1_dm.r
$1_dm.m: $1_def.r $1_dm.r $1_sympar.r $1_numpar.m
		dm_r2m $1; matlab_tidy $1_dm.m
$1_dm.tex: $1_dm.r $1_sympar.r $1_simp.r 
	dm_r2tex $1; latex_tidy $1_dm.tex



#SUMMARY csm	constrained-state matrices (r)







|







842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
#SUMMARY dm	descriptor matrices (m)
#SUMMARY dm	descriptor matrices (tex)
#SUMMARY dm	descriptor matrices (view)
#SUMMARY dm	descriptor matrices (ps)
#Linearised system: descriptor matrices
$1_dm.r: $1_dae.r $1_def.r $1_cr.r  $1_ss.r $1_sympar.r
	dae2dm_r $1; tidy $1_dm.r
$1_dm.m: $1_def.m $1_dm.r $1_sympar.r $1_numpar.m
		dm_r2m $1; matlab_tidy $1_dm.m
$1_dm.tex: $1_dm.r $1_sympar.r $1_simp.r 
	dm_r2tex $1; latex_tidy $1_dm.tex



#SUMMARY csm	constrained-state matrices (r)


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