Overview
Comment:Started incorporating Geraints CC/oct conversions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: c2ec1e207e1d5326650e19c4396fb45cdbb7fa79d1b5581e5abce74f04e47477
User & Date: gawthrop@users.sourceforge.net on 2000-11-08 09:51:52
Other Links: branch diff | manifest | tags
Context
2000-11-08
11:20:49
removed the empty matrix stuff check-in: 660ba70e02 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:51:52
Started incorporating Geraints CC/oct conversions check-in: c2ec1e207e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2000-11-07
19:18:26
Added declaration as third arg check-in: ce0109f467 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [42bdb0ab7d] to [31e14f0322].

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.277  2000/10/17 09:54:07  peterg
## logic rep sorted out
##
## Revision 1.276  2000/10/15 09:30:31  peterg
## *** empty log message ***
##
## Revision 1.275  2000/10/12 18:38:47  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.278  2000/11/07 16:39:21  peterg
## *** empty log message ***
##
## Revision 1.277  2000/10/17 09:54:07  peterg
## logic rep sorted out
##
## Revision 1.276  2000/10/15 09:30:31  peterg
## *** empty log message ***
##
## Revision 1.275  2000/10/12 18:38:47  peterg
1568
1569
1570
1571
1572
1573
1574







1575
1576
1577
1578
1579
1580
1581

   if [ -f ".octaverc" ]; then
     touch .octaverc
   else
     echo Copying .octaverc 
     cp $MTT_LIB/octave/.octaverc .
   fi








   if [ -z "$directory" ]; then
     Directory=''
   else
     Directory=$directory/MTT_work
   fi








>
>
>
>
>
>
>







1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591

   if [ -f ".octaverc" ]; then
     touch .octaverc
   else
     echo Copying .octaverc 
     cp $MTT_LIB/octave/.octaverc .
   fi

   if [ -f "useful-functions.hh" ]; then
     touch useful-functions.hh
   else
     echo Copying useful-functions.hh
     cp $MTT_CC/include/useful-functions.hh .
   fi

   if [ -z "$directory" ]; then
     Directory=''
   else
     Directory=$directory/MTT_work
   fi

1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710


1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
$MAKE -S $verbose  -f  -  $target << EOF

# Cancel implicit rules I don't want
%.dvi: %.tex

# MTT implicit rules
## .oct files
%.oct:  %.cc
	echo Creating $1_$2.oct; mkoctfile  $< 

## .cc files
%.cc:  %.p
	mtt_p2cc  $< 



#Suffix rules
## .m files
##.SUFFIXES : .r .m
##.r.m:   $1_$2.r $1.def $1.sympar
	mtt_r2m  $1 $2 


# Generates code to write reduce code
$1_ode_write.r: $1_def.m
	def2write_r  $1 $2

ifeq ("$sensitivity","sensitivity")







|



|
|
>
>





|







1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
$MAKE -S $verbose  -f  -  $target << EOF

# Cancel implicit rules I don't want
%.dvi: %.tex

# MTT implicit rules
## .oct files
%.oct:  %.cc $1_def.h $1_sympar.h
	echo Creating $1_$2.oct; mkoctfile  $< 

## .cc files
#%.cc:  %.p
#	mtt_p2cc  $< 
%.cc:  %.m
	mtt_m2cc.sh  $1 $2 cat 

#Suffix rules
## .m files
##.SUFFIXES : .r .m
##.r.m:   $1_$2.r $1.def $1.sympar
##	mtt_r2m  $1 $2 


# Generates code to write reduce code
$1_ode_write.r: $1_def.m
	def2write_r  $1 $2

ifeq ("$sensitivity","sensitivity")
1849
1850
1851
1852
1853
1854
1855


1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
# ## 	echo 'END;' >> $1_sympar.r

#SUMMARY sympar	symbolic parameters (r)
$1_sympar.r: $1_sympar.txt
	sympar_txt2r $1
$1_sympar.m: $1_sympar.txt
	sympar_txt2m $1



#SUMMARY sympar	symbolic parameters (c)
# txt to c sympar conversion
$1_sympar.c: $1_sympar.txt
	sympar_txt2c $1

#SUMMARY sympar	symbolic parameters (tex)
# txt to tex (LaTeX) sympar conversion
$1_sympar.tex: $1_sympar.txt
	sympar_txt2tex $1



#SUMMARY logic	Dynamic switch logic (tex)
#SUMMARY logic	Dynamic switch logic (view)
$1_logic.tex: $1_logic.txt
	txt2tex $1 logic txt









>
>










<
<







1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879


1880
1881
1882
1883
1884
1885
1886
# ## 	echo 'END;' >> $1_sympar.r

#SUMMARY sympar	symbolic parameters (r)
$1_sympar.r: $1_sympar.txt
	sympar_txt2r $1
$1_sympar.m: $1_sympar.txt
	sympar_txt2m $1
$1_sympar.h: $1_sympar.txt
	sympar_txt2h.sh $1

#SUMMARY sympar	symbolic parameters (c)
# txt to c sympar conversion
$1_sympar.c: $1_sympar.txt
	sympar_txt2c $1

#SUMMARY sympar	symbolic parameters (tex)
# txt to tex (LaTeX) sympar conversion
$1_sympar.tex: $1_sympar.txt
	sympar_txt2tex $1



#SUMMARY logic	Dynamic switch logic (tex)
#SUMMARY logic	Dynamic switch logic (view)
$1_logic.tex: $1_logic.txt
	txt2tex $1 logic txt


2163
2164
2165
2166
2167
2168
2169

2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187


2188
2189
2190
2191
2192
2193
2194
#Causal bond graph: mfile to fig conversion
$1_cbg.fig: $1_cbg.m  $1_fig.fig $1_type.sh
	sh $1_type.sh 'echo cbg_m2fig ' ' ' ' ' | sh

#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
$Subsystem_ese.r: $1_cbg.m
	   cbg2ese_m2r $partition $info_switch $Subsystem; #ese_tidy $1
$1_def.r: $1_ese.r
	touch $1_def.r
$1_struc.txt: $1_ese.r
	touch $1_struc.txt
$1_aliased.txt: $1_ese.r
	touch $1_aliased.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 rdae	raw differential-algebraic equations (r)
#SUMMARY dae	differential-algebraic equations (r)
#SUMMARY dae*	differential-algebraic equations (m)
#SUMMARY dae	differential-algebraic equations (tex)
#SUMMARY dae*	differential-algebraic equations (view)
#SUMMARY dae	differential-algebraic equations (ps)







>


















>
>







2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
#Causal bond graph: mfile to fig conversion
$1_cbg.fig: $1_cbg.m  $1_fig.fig $1_type.sh
	sh $1_type.sh 'echo cbg_m2fig ' ' ' ' ' | sh

#SUMMARY ese	elementary system equations (r)
#SUMMARY def	definitions - system orders etc. (r)
#SUMMARY def	definitions - system orders etc. (m)
#SUMMARY def	definitions - system orders etc. (h)
#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
$Subsystem_ese.r: $1_cbg.m
	   cbg2ese_m2r $partition $info_switch $Subsystem; #ese_tidy $1
$1_def.r: $1_ese.r
	touch $1_def.r
$1_struc.txt: $1_ese.r
	touch $1_struc.txt
$1_aliased.txt: $1_ese.r
	touch $1_aliased.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;
$1_def.h: $1_def.m
	def_m2h.sh $1

#SUMMARY rdae	raw differential-algebraic equations (r)
#SUMMARY dae	differential-algebraic equations (r)
#SUMMARY dae*	differential-algebraic equations (m)
#SUMMARY dae	differential-algebraic equations (tex)
#SUMMARY dae*	differential-algebraic equations (view)
#SUMMARY dae	differential-algebraic equations (ps)
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
	touch $1_odeo.r

$1_ode.m: $1_def.r $1_ode.r
	mtt_r2m $optimise -parameters $1 ode m; #  matlab_tidy $1_ode.m
$1_odeo.m: $1_def.r $1_odeo.r
	mtt_r2m $1 odeo m

$1_ode.oct: $1_def.r $1_ode.p $1_sympars.txt
	mtt_p2oct $1 ode

$1_odeo.oct: $1_def.r $1_odeo.p $1_sympars.txt
	mtt_p2oct $1 odeo

$1_odea.m: $1_ode.m
	touch $1_odea.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







|
|

|
|







2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
	touch $1_odeo.r

$1_ode.m: $1_def.r $1_ode.r
	mtt_r2m $optimise -parameters $1 ode m; #  matlab_tidy $1_ode.m
$1_odeo.m: $1_def.r $1_odeo.r
	mtt_r2m $1 odeo m

#$1_ode.oct: $1_def.r $1_ode.p $1_sympars.txt
#	mtt_p2oct $1 ode

#$1_odeo.oct: $1_def.r $1_odeo.p $1_sympars.txt
#	mtt_p2oct $1 odeo

$1_odea.m: $1_ode.m
	touch $1_odea.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


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