Differences From Artifact [e1c65d4523]:

To Artifact [f02fdd77b7]:


10
11
12
13
14
15
16



17
18
19
20
21
22
23
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.62  1997/03/20  17:48:50  peterg
# Better _input.c file default.
#
# Revision 1.61  1997/03/20  16:53:01  peterg
# Generates c files using include statements.
#
# Revision 1.60  1997/03/20  10:25:41  peterg
# Generates a compehensive default params file.
#
# Revision 1.59  1997/03/19  10:14:04  peterg
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
343
344
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
343
344
345
346
347
348
349
350
351







+
-
+





+
-
+








+
-
+





+







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 *_abg.ps *_args.* *_cr.r *_cr.txt
  rm -f *_sabg.fig *_sabg.ps
  rm -f *_sympar.r *_sympar.c *_sympar.txt
  rm -f *_sympar.r *_sympar.c *_sympar.h *_sympar.txt
  rm -f *_rbg.* *_cmp.* *_fig.fig *_*cbg.* *_ese.* *_def.* 
  rm -f *_sub.sh *_type.sh
  rm -f *_dae*.* *_cse.* *_ode*.c *_ode*.m *_obs.* *_rfe.* *_ss.*
  rm -f *_dm.* *_csm.* *_sm.* *_tf.* *_sr*.* *_ir*.* *_*fr.*
  rm -f  *_numpar.m *_numpar.c
  rm -f  *_unique_raw_list *_raw_list
  rm -f mtt_error.txt mtt_info.txt a.out
  rm -f mtt_error.txt mtt_info.txt a.out 
  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_abg.ps $1_args.* $1_cr.r $1_cr.txt
  rm -f $1_sabg.fig $1_sabg.ps
  rm -f $1_sympar.r $1_sympar.c $1_sympar.txt
  rm -f $1_sympar.r $1_sympar.c $1_sympar.h $1_sympar.txt
  rm -f $1_rbg.* $1_cmp.* $1_fig.fig $1*_*cbg.* $1*_ese.* $1_def.* 
  rm -f $1_sub.sh $1_type.sh
  rm -f $1_dae*.* $1_cse.* $1_ode*.c $1_ode*.m $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 $1_numpar.c
  rm -f $1_unique_raw_list $1_raw_list
  rm -f mtt_error.txt mtt_info.txt a.out 
  exit
fi

#SUMMARY abg	acausal bond graph (fig)
#SUMMARY abg	acausal bond graph (ps)
#SUMMARY abg	acausal bond graph (view)
483
484
485
486
487
488
489
490
491



492
493
494
495
496
497
498
490
491
492
493
494
495
496


497
498
499
500
501
502
503
504
505
506







-
-
+
+
+







	lbl2cr_txt2txt $1
 
	if [ "$level" = "0" ]; then \
	  mv $1_cr.txt MTT_cr.txt; \
	else \
	  cat $1_cr.txt >> MTT_cr.txt; \
	fi
 
	sh $1_sub.sh "mtt -q -l $level+1 " ' cr txt'

	sh $1_sub.sh "rm -f " '_cr.txt' # Remove the txt.cr files
	sh $1_sub.sh "mtt -q -l $level+1 " ' cr txt' #Create new ones
 
 
	if [ "$level" = "0" ]; then \
	  sort -u MTT_cr.txt> $1_cr.txt; \
	fi

#SUMMARY cr	constitutive relationship for each subsystem (r)
506
507
508
509
510
511
512

513

514
515
516
517
518
519
520
521
514
515
516
517
518
519
520
521

522

523
524
525
526
527
528
529







+
-
+
-







 
	if [ "$level" = "0" ]; then \
	  mv $1_sympar.txt MTT_sympar.txt; \
	else \
	  cat $1_sympar.txt >> MTT_sympar.txt; \
	fi
 
	sh $1_sub.sh "rm -f " '_sympar.txt' # Delete sympar files
	sh $1_sub.sh "mtt -q -l $level+1 " ' sympar txt'
	sh $1_sub.sh "mtt -q -l $level+1 " ' sympar txt' # and recreate them
 
 
	if [ "$level" = "0" ]; then \
	  sort -u MTT_sympar.txt> $1_sympar.txt; \
	fi

# ## Old version -- just looks on top level
# ## $1_sympar.r: $1_lbl.txt $1_params.r
696
697
698
699
700
701
702
703

704
705
706
707
708
709
710
704
705
706
707
708
709
710

711
712
713
714
715
716
717
718







-
+








#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)
#Differential-algebraic equations
$1_dae.r: $1_ese.r $1_cr.r $1_sympar.r
$1_dae.r: $1_ese.r $1_cr.r $1_sympar.r $1_params.r
	ese2dae_r $1; tidy $1_dae.r
$1_dae.m: $1_def.r $1_dae.r  $1_sympar.r 
	dae_r2m $1; matlab_tidy $1_dae.m; matlab_tidy $1_daeo.m
$1_dae.c: $1_def.r $1_dae.r  $1_sympar.r
	dae_r2c $1; c_tidy $1_dae.c
$1_dae.tex:	$1_dae.r $1_simp.r
	dae_r2tex $1; latex_tidy $1_dae.tex

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