Differences From Artifact [147895902a]:

To Artifact [b5a60153db]:


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.33  1996/11/01 12:34:45  peterg
## Added browser - mtt_help
##
## Revision 1.32  1996/10/31 20:48:41  peterg
## Revised html generation.
## Stopped deletion of rep.txt file.
##







>
>
>







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.34  1996/11/01 13:34:35  peterg
## -q (quiet) switch added
##
## Revision 1.33  1996/11/01 12:34:45  peterg
## Added browser - mtt_help
##
## Revision 1.32  1996/10/31 20:48:41  peterg
## Revised html generation.
## Stopped deletion of rep.txt file.
##
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
  echo 'This is free software with ABSOLUTELY NO WARRANTY.'
  echo 'Type `mtt warranty'\' 'for details.'
  echo
fi

if [ "$1" = "" ]; then
  echo 'Usage: mtt help'
  echo '       mtt help reps'
  echo '       mtt help comps'
  echo '       mtt info'
  echo '       mtt info topic'
  echo '       mtt manual'
  echo '       mtt warranty'
  echo '       mtt clean'
  echo '       mtt <system_name> clean'
  echo '       mtt <system_name> <representation> vc'







<
<







136
137
138
139
140
141
142


143
144
145
146
147
148
149
  echo 'This is free software with ABSOLUTELY NO WARRANTY.'
  echo 'Type `mtt warranty'\' 'for details.'
  echo
fi

if [ "$1" = "" ]; then
  echo 'Usage: mtt help'


  echo '       mtt info'
  echo '       mtt info topic'
  echo '       mtt manual'
  echo '       mtt warranty'
  echo '       mtt clean'
  echo '       mtt <system_name> clean'
  echo '       mtt <system_name> <representation> vc'
158
159
160
161
162
163
164

165
166

167
168
169
170
171
172
173
174
  exit
fi

if [ "$1" = "help" ]; then
  if [ "$2" = "" ]; then
    echo 'Usage: mtt help reps'
    echo '       mtt help comps'

    echo '       mtt help reps string'
    echo '       mtt help comps string'

    echo '       mtt help <component name>'
  else
    mtt_help $2 $3
  fi
  exit
fi

if [ "$1" = "hinfo" ] && [$2 = ""]; then







>
|
|
>
|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
  exit
fi

if [ "$1" = "help" ]; then
  if [ "$2" = "" ]; then
    echo 'Usage: mtt help reps'
    echo '       mtt help comps'
    echo '       mtt help crs'
    echo '       mtt help reps <string>'
    echo '       mtt help comps <string>'
    echo '       mtt help crs <string>'
    echo '       mtt help <component or cr name>'
  else
    mtt_help $2 $3
  fi
  exit
fi

if [ "$1" = "hinfo" ] && [$2 = ""]; then
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
  exit
fi

# Clean up 
if [ "$1" = "clean" ] && [ "$2" = "" ]; then
  echo 'Removing all generated files for all systems'
  rm -f *.log  mtt_info.txt warning.txt
  rm -f *_abg.m *_args.*
  rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.* *_sub.sh
  rm -f *_dae*.* *_cse.* *_ode*.* *_obs.* *_rfe.* *_ss.*
  rm -f *_dm.* *_csm.* *_sm.* *_tf.* *_sr*.* *_ir*.* *_*fr.*
  rm -f  *_numpar.m
  rm -f mtt_error.txt mtt_info.txt
  exit
fi

# Clean up named system
if [ "$2" = "clean" ] && [ "$3" = "" ]; then
  echo 'Removing all generated files for system ' $1
  rm -f *.log  mtt_info.txt warning.txt
  rm -f $1_abg.m $1_args.* 
  rm -f $1_rbg.* $1_cmp.* $1_fig.fig $1*_*cbg.* $1*_ese.* $1_def.* $1_sub.sh
  rm -f $1_dae*.* $1_cse.* $1_ode*.* $1_obs.* $1_rfe.* $1_ss.*
  rm -f $1_dm.* $1_csm.* $1_sm.* $1_tf.* $1_sr*.* $1_ir*.* $1_*fr.*
  rm -f $1_numpar.m
  rm -f mtt_error.txt mtt_info.txt
  exit
fi







|












|







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
  exit
fi

# Clean up 
if [ "$1" = "clean" ] && [ "$2" = "" ]; then
  echo 'Removing all generated files for all systems'
  rm -f *.log  mtt_info.txt warning.txt
  rm -f *_abg.m *_args.* *_cr.r
  rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.* *_sub.sh
  rm -f *_dae*.* *_cse.* *_ode*.* *_obs.* *_rfe.* *_ss.*
  rm -f *_dm.* *_csm.* *_sm.* *_tf.* *_sr*.* *_ir*.* *_*fr.*
  rm -f  *_numpar.m
  rm -f mtt_error.txt mtt_info.txt
  exit
fi

# Clean up named system
if [ "$2" = "clean" ] && [ "$3" = "" ]; then
  echo 'Removing all generated files for system ' $1
  rm -f *.log  mtt_info.txt warning.txt
  rm -f $1_abg.m $1_args.* $1_cr.r
  rm -f $1_rbg.* $1_cmp.* $1_fig.fig $1*_*cbg.* $1*_ese.* $1_def.* $1_sub.sh
  rm -f $1_dae*.* $1_cse.* $1_ode*.* $1_obs.* $1_rfe.* $1_ss.*
  rm -f $1_dm.* $1_csm.* $1_sm.* $1_tf.* $1_sr*.* $1_ir*.* $1_*fr.*
  rm -f $1_numpar.m
  rm -f mtt_error.txt mtt_info.txt
  exit
fi
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
  case $2 in
	abg )
		VC='ok'
		VCext='fig' ;;
	lbl )
		VC='ok'
		VCext='txt' ;;
	 cr)
		VC='ok'
		VCext='r' ;;
	simp )
		VC='ok'
		VCext='r' ;;
	params )
		VC='ok'
		VCext='m' ;;
	input )







<
<
<







301
302
303
304
305
306
307



308
309
310
311
312
313
314
  case $2 in
	abg )
		VC='ok'
		VCext='fig' ;;
	lbl )
		VC='ok'
		VCext='txt' ;;



	simp )
		VC='ok'
		VCext='r' ;;
	params )
		VC='ok'
		VCext='m' ;;
	input )
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
	echo "%	a comment (ie starting with %)"; \
	echo "%	Component-name	CR_name	arg1,arg2,..argn"; \
	echo "%	blank"; \
        )> $1_lbl.txt

#REPRESENTATION cr	constitutive relationship description (r)
$1_cr.r:
	makecr $1

#REPRESENTATION simp	simplification information (r)
$1_simp.r:
	echo Creating $1_simp.r
	( \
	echo "%% Reduce comands to simplify output for system $1 ($1_simp.r)"; \
	cat $MTTPATH/trans/m/rcs_header.txt; \







|







348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
	echo "%	a comment (ie starting with %)"; \
	echo "%	Component-name	CR_name	arg1,arg2,..argn"; \
	echo "%	blank"; \
        )> $1_lbl.txt

#REPRESENTATION cr	constitutive relationship description (r)
$1_cr.r:
	lbl2cr_txt2r $1

#REPRESENTATION simp	simplification information (r)
$1_simp.r:
	echo Creating $1_simp.r
	( \
	echo "%% Reduce comands to simplify output for system $1 ($1_simp.r)"; \
	cat $MTTPATH/trans/m/rcs_header.txt; \
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
#REPRESENTATION abg	acausal bond graph (m)
#Raw bond graph to acausal bond graph: mfile
$1_abg.m: $1_rbg.m $1_sub.sh

	echo Creating subsystem abg files for system $1 ...
	sh < $1_sub.sh
	echo Finished creating subsystem abg files for system $1
	echo
	rbg2abg_m $1


#REPRESENTATION cbg	causal bond graph (m)
#Acausal bond graph to causal bond graph: mfile
$1_cbg.m: $1_abg.m
	abg2cbg_m $1







<







435
436
437
438
439
440
441

442
443
444
445
446
447
448
#REPRESENTATION abg	acausal bond graph (m)
#Raw bond graph to acausal bond graph: mfile
$1_abg.m: $1_rbg.m $1_sub.sh

	echo Creating subsystem abg files for system $1 ...
	sh < $1_sub.sh
	echo Finished creating subsystem abg files for system $1

	rbg2abg_m $1


#REPRESENTATION cbg	causal bond graph (m)
#Acausal bond graph to causal bond graph: mfile
$1_cbg.m: $1_abg.m
	abg2cbg_m $1

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