Overview
Comment:Now handles generic transformations using %.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: fdb0d576da88cda0fcb96417c06c799594537ced5270fb2f04b529c74fd31e61
User & Date: gawthrop@users.sourceforge.net on 1996-08-15 07:44:24
Other Links: branch diff | manifest | tags
Context
1996-08-15
08:34:08
Added step gain (u0) and initial condition (x0) check-in: f13510619d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
07:44:24
Now handles generic transformations using %. check-in: fdb0d576da user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1996-08-14
19:20:41
Fixed output naming bug. check-in: 2a444bb6bd user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [5d46fef15d] to [c69077ae79].

15
16
17
18
19
20
21



22
23
24
25
26
27
28
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.

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



## Revision 1.8  1996/08/12 20:19:52  peter
## Arguments now passed via $1_args.m file
##
## Revision 1.7  1996/08/11 19:49:27  peter
## Parameter passing (via $4) added.
##
## Revision 1.6  1996/08/11 10:40:56  peter







>
>
>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.9  1996/08/14 09:16:08  peter
## Step response now goes through  m, dat and gdat conversions
##
## Revision 1.8  1996/08/12 20:19:52  peter
## Arguments now passed via $1_args.m file
##
## Revision 1.7  1996/08/11 19:49:27  peter
## Parameter passing (via $4) added.
##
## Revision 1.6  1996/08/11 10:40:56  peter
96
97
98
99
100
101
102
103




104
105
106
107
108
109
110
111
112
113
114
# Save up the argument list in a file.
cat > macmic_args.m <<EOF
$4
EOF

# This is the main mtt programme
 
make  -s -f -  $1_$2.$3 << EOF





#Create acausal bond graph figure using xfig 
$1_abg.fig:
	$FIG $1_abg.fig &

#Create empty files (with titles) if not already there
$1_lbl.txt:
	echo Creating $1_lbl.txt
	( \
	echo "%% Label file ($1_lbl.txt)"; \
	echo "%% Each line should be of one of the following forms:"; \







|
>
>
>
>



|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Save up the argument list in a file.
cat > macmic_args.m <<EOF
$4
EOF

# This is the main mtt programme
 
make -s  -f -  $1_$2.$3 << EOF

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

#Create acausal bond graph figure using xfig 
$1_abg.fig:
	$FIG $1_abg.fig 

#Create empty files (with titles) if not already there
$1_lbl.txt:
	echo Creating $1_lbl.txt
	( \
	echo "%% Label file ($1_lbl.txt)"; \
	echo "%% Each line should be of one of the following forms:"; \
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
$1_cse.tex: $1_cse.r  $1_sympar.r
	cse_r2tex $1; latex_tidy $1_cse.tex

#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
$1_ode.tex: $1_ode.r  $1_sympar.r $1_simp.r
	ode_r2tex $1; latex_tidy $1_ode.tex

#Observer functions for GPC
$1_obs.r: $1_ode.r $1_def.r $1_sympar.r
	ode2obs_r $1; tidy $1_obs.r
$1_obs.m: $1_def.r $1_obs.r $1_sympar.r







|







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
$1_cse.tex: $1_cse.r  $1_sympar.r
	cse_r2tex $1; latex_tidy $1_cse.tex

#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.tex: $1_ode.r  $1_sympar.r $1_simp.r
	ode_r2tex $1; latex_tidy $1_ode.tex

#Observer functions for GPC
$1_obs.r: $1_ode.r $1_def.r $1_sympar.r
	ode2obs_r $1; tidy $1_obs.r
$1_obs.m: $1_def.r $1_obs.r $1_sympar.r
253
254
255
256
257
258
259


260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342


#Time responses
$1_ir.dat: $1_dm.m $1_numpar.m $1_args.m
	dm2ir_m2dat $1 '$4'
$1_sr.m: $1_dm.m $1_numpar.m $1_args.m
	dm2sr_m $1 '$4'



#Frequency responses
$1_fr.dat: $1_dm.m $1_numpar.m $1_args.m
	dm2fr_m2dat $1 '$4'

#Partially-known system indentification structure matrices
$1_pkim.r: $1_tf.r $1_sympar.r 
	tf2pkim_r $1; tidy $1_pki.r
$1_pkim.tex: $1_def.r $1_pkim.r $1_sympar.r
	pkim_r2tex $1; latex_tidy $1_pkim.tex

#Generic conversion of data files from m to dat format
$1_$2.dat: $1_$2.m
	m2dat $1_$2

#Generic conversion of data files from dat to (gplot) gdat format
$1_$2.gdat: $1_$2.dat
	dat2gdat $1_$2

#Generic conversion of Latex to latex document
$1_$2.doc: $1_$2.tex
	showtex $1 $2

#Generic conversion of LaTeX doc to dvi
$1_$2.dvi: $1_$2.doc
	echo Creating $1_$2.dvi
	latex $1_$2.doc > /dev/null


#Create PostScript version of abg fig file
ifeq ('$2','abg')
$1_abg.ps: $1_abg.fig
	echo Creating $1_abg.ps
	fig2dev -Lps $1_abg.fig >$1_abg.ps
endif

#Create PostScript version of cbg fig file
ifeq ('$2','cbg')
$1_cbg.ps: $1_cbg.fig
	echo Creating $1_cbg.ps
	fig2dev -Lps $1_cbg.fig >$1_cbg.ps
endif

#Create PostScript version of dat file
ifeq ('$2','ir')
$1_$2.ps: $1_$2.gdat
	gdat2ps $1_$2
endif

ifeq ('$2','sr')
$1_$2.ps: $1_$2.gdat
	gdat2ps $1_$2
endif

ifeq ('$2','fr')
$1_$2.ps: $1_$2.gdat
	gdat2ps $1_$2
endif

#Generic conversion of dvi to ps
ifneq ('$2','abg')
ifneq ('$2','cbg')
ifneq ('$2','ir')
ifneq ('$2','sr')
ifneq ('$2','fr')
$1_$2.ps: $1_$2.dvi
	echo Creating $1_$2.ps
	dvips -o $1_$2.ps $1_$2.dvi 2> /dev/null
endif
endif
endif
endif
endif

#View a ps file
$1_$2.view: $1_$2.ps
	echo Creating view of $1_$2
	ghostview $1_$2.ps&

#Report generation
$1_rep.tex: $1_sum.tex $1_dae.tex $1_lbl.txt $1_sympar.r $1_cr.r \
            $1_abg.ps
	echo Creating $1_rep.tex 







>
>












|



|



|



|



<
|
<
|
|
|
<

|
<
|
|
|
<


<
<
|
<
<
<
<

<

<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|







260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296

297

298
299
300

301
302

303
304
305

306
307


308




309

310




311















312
313
314
315
316
317
318
319
320


#Time responses
$1_ir.dat: $1_dm.m $1_numpar.m $1_args.m
	dm2ir_m2dat $1 '$4'
$1_sr.m: $1_dm.m $1_numpar.m $1_args.m
	dm2sr_m $1 '$4'
$1_odesol.m: $1_ode.m $1_numpar.m $1_args.m
	ode2odesol_m $1 '$4'

#Frequency responses
$1_fr.dat: $1_dm.m $1_numpar.m $1_args.m
	dm2fr_m2dat $1 '$4'

#Partially-known system indentification structure matrices
$1_pkim.r: $1_tf.r $1_sympar.r 
	tf2pkim_r $1; tidy $1_pki.r
$1_pkim.tex: $1_def.r $1_pkim.r $1_sympar.r
	pkim_r2tex $1; latex_tidy $1_pkim.tex

#Generic conversion of data files from m to dat format
%.dat: %.m
	m2dat $1_$2

#Generic conversion of data files from dat to (gplot) gdat format
%.gdat: %.dat
	dat2gdat $1_$2

#Generic conversion of Latex to latex document
%.doc: %.tex
	showtex $1 $2

#Generic conversion of LaTeX doc to dvi
%.dvi: %.doc
	echo Creating $1_$2.dvi
	latex $1_$2.doc > /dev/null


#Create PostScript version of fig files

%.ps : %.fig
	echo Creating $1_$2.ps
	fig2dev -Lps $1_$2.fig >$1_$2.ps


#Create PostScript version of dvi file

%.ps: %.dvi
	echo Creating $1_$2.ps
	dvips -o $1_$2.ps $1_$2


#Create PostScript version of dat file


%.ps: %.gdat




	gdat2ps $1_$2






















#View a ps file
%.view: %.ps
	echo Creating view of $1_$2
	ghostview $1_$2.ps&

#Report generation
$1_rep.tex: $1_sum.tex $1_dae.tex $1_lbl.txt $1_sympar.r $1_cr.r \
            $1_abg.ps
	echo Creating $1_rep.tex 
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
	echo Creating $1_rep.ps 
	dvips -o $1_rep.ps $1_rep

$1_rep.html: $1_rep.dvi
	echo Creating $1_rep.html 
	latex2html $1_rep.tex

# Clean up all intermediate files
$1_clean.: 
	echo Cleaning up system $1
	rm -f  *.log *.old *.met *.dvi *.aux *.f2bd
	rm -f  $1_abg.pl $1_cbg.pl  $1_ese.r $1_def.r \
	$1_tf.r  \
	$1_dae.r \
	$1_cse.r $1_dm.r $1_csm.r \
	$1_*_rep.tex \
        $1_rbg.m $1_abg.m $1_cbg.m $1_cbg.fig $1_cbg?.fig

EOF







<
<
<
<
<
<
<
<
<
<
<

329
330
331
332
333
334
335











336
	echo Creating $1_rep.ps 
	dvips -o $1_rep.ps $1_rep

$1_rep.html: $1_rep.dvi
	echo Creating $1_rep.html 
	latex2html $1_rep.tex












EOF


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