Differences From Artifact [a948ce0b4f]:

To Artifact [c3b72d1751]:


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.176  1998/07/27 20:25:15  peterg
## Sorted out new mtt_r2m
##
## Revision 1.175  1998/07/27 18:49:09  peterg
## Fixed the frequency stuff
##
## Revision 1.174  1998/07/27 07:10:10  peterg







>
>
>







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.177  1998/07/30 17:32:44  peterg
## VERSION 3.0
##
## Revision 1.176  1998/07/27 20:25:15  peterg
## Sorted out new mtt_r2m
##
## Revision 1.175  1998/07/27 18:49:09  peterg
## Fixed the frequency stuff
##
## Revision 1.174  1998/07/27 07:10:10  peterg
650
651
652
653
654
655
656



657
658
659
660
661
662
663
		print='-p';;
	-c )
                mtt_switches="$mtt_switches $1";
		computation=c ;;
	-o )
                mtt_switches="$mtt_switches $1";
		dae_is_ode=1 ;;



	-d )
		directory=$2; cd $directory; shift ;;
	-S )
		directory=$2;  shift;;
	-D )
                mtt_switches="$mtt_switches $1";
		debug=debug ;;







>
>
>







653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
		print='-p';;
	-c )
                mtt_switches="$mtt_switches $1";
		computation=c ;;
	-o )
                mtt_switches="$mtt_switches $1";
		dae_is_ode=1 ;;
	-ss )
                mtt_switches="$mtt_switches $1";
		steadystate_computation=yes ;;
	-d )
		directory=$2; cd $directory; shift ;;
	-S )
		directory=$2;  shift;;
	-D )
                mtt_switches="$mtt_switches $1";
		debug=debug ;;
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
		REPTYPE='data' ;;
	nifr)
		REPTYPE='data' ;;
	*)
		REPTYPE='tex' ;;
esac

# Save up the argument list in a file; but only if argument has changed
ARGS=$4; _ARGS=-$4; __ARGS=`echo $_ARGS | tr ',' '-'`

#DIFF doesn't like empty files - so put a blank if empty
if [ -z "$ARGS" ]; then
  ARGS=' ';
  _ARGS='';
fi

cat > $1_args.new <<EOF
$ARGS
EOF

DIFF=`diff -bq $1_args.m $1_args.new 2>/dev/null`

if [ -n "$DIFF" ]; then
  mv $1_args.new $1_args.m
fi

# Tidy mode - operate in the directory MTT-work
if [ "$tidy" = "tidy" ]; then
   mkdir -p MTT_work
   cp -u -p  Makefile *.* .* MTT_work 2>/dev/null
   cd MTT_work
   







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
		REPTYPE='data' ;;
	nifr)
		REPTYPE='data' ;;
	*)
		REPTYPE='tex' ;;
esac

## # Save up the argument list in a file; but only if argument has changed
## ARGS=$4; _ARGS=-$4; __ARGS=`echo $_ARGS | tr ',' '-'`
## 
## #DIFF doesn't like empty files - so put a blank if empty
## if [ -z "$ARGS" ]; then
##   ARGS=' ';
##   _ARGS='';
## fi
## 
## cat > $1_args.new <<EOF
## $ARGS
## EOF
## 
## DIFF=`diff -bq $1_args.m $1_args.new 2>/dev/null`
## 
## if [ -n "$DIFF" ]; then
##   mv $1_args.new $1_args.m
## fi

# Tidy mode - operate in the directory MTT-work
if [ "$tidy" = "tidy" ]; then
   mkdir -p MTT_work
   cp -u -p  Makefile *.* .* MTT_work 2>/dev/null
   cd MTT_work
   
1387
1388
1389
1390
1391
1392
1393











1394
1395
1396
1397
1398
1399
1400
1401


1402
1403
1404
1405
1406
1407
1408
	numpar_txt2m $1

#SUMMARY numpar	numerical parameter declaration (c) 
$1_numpar.c:  $1_numpar.txt $1_sympar.c
	txt2c $1 numpar

#SUMMARY input	numerical input declaration  -- default (txt)











$1_input.txt: 
	mtt -q $1 struc txt
	struc2input_txt2txt $1

#SUMMARY state	numerical state declaration  -- default (txt)
$1_state.txt: 
	mtt -q $1 struc txt
	struc2state_txt2txt $1



#ifeq ($switches,0)
#$1_input.txt: 
#	mtt $mtt_switches $1 struc txt; 
#	mtt $mtt_switches $1 ss r; 
#	struc2input_txt2txt $1
#endif







>
>
>
>
>
>
>
>
>
>
>



<
<



>
>







1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413


1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
	numpar_txt2m $1

#SUMMARY numpar	numerical parameter declaration (c) 
$1_numpar.c:  $1_numpar.txt $1_sympar.c
	txt2c $1 numpar

#SUMMARY input	numerical input declaration  -- default (txt)
#SUMMARY state	numerical state declaration  -- default (txt)
ifeq ($steadystate_computation,yes)
$1_input.txt:
	mtt -q $1 ss r
	mtt -q $1 struc txt
	struc2input_txt2txt -ss $1
$1_state.txt:
	mtt -q $1 ss r
	mtt -q $1 struc txt
	struc2state_txt2txt -ss $1
else
$1_input.txt: 
	mtt -q $1 struc txt
	struc2input_txt2txt $1


$1_state.txt: 
	mtt -q $1 struc txt
	struc2state_txt2txt $1
endif


#ifeq ($switches,0)
#$1_input.txt: 
#	mtt $mtt_switches $1 struc txt; 
#	mtt $mtt_switches $1 ss r; 
#	struc2input_txt2txt $1
#endif
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
	sm_r2tex $1; latex_tidy $1_sm.tex

#SUMMARY smx	state matrices with variable state x (r)
#SUMMARY smx	state matrices with variable state x (m)
$1_smx.r: $1_def.r $1_def.m $1_ode.r 
		ode2smx_lang $1 r; tidy $1_smx.r
$1_smx.m: $1_def.r $1_def.m $1_ode.r 
		ode2smx_lang $1 m; matlab_tidy $1_smx.m

#SUMMARY smc	controller form state matrices etc. - siso only (r)
#SUMMARY smc	controller form state matrices etc. - siso only (tex)
#SUMMARY smc	controller form state matrices etc. - siso only (m)
#SUMMARY smc	controller form state matrices etc. - siso only (view)
#SUMMARY smc	controller form state matrices etc. - siso only (ps)
#Linearised system: controller form state matrices etc.







|







1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
	sm_r2tex $1; latex_tidy $1_sm.tex

#SUMMARY smx	state matrices with variable state x (r)
#SUMMARY smx	state matrices with variable state x (m)
$1_smx.r: $1_def.r $1_def.m $1_ode.r 
		ode2smx_lang $1 r; tidy $1_smx.r
$1_smx.m: $1_def.r $1_def.m $1_ode.r 
		ode2smx_lang $1 m;

#SUMMARY smc	controller form state matrices etc. - siso only (r)
#SUMMARY smc	controller form state matrices etc. - siso only (tex)
#SUMMARY smc	controller form state matrices etc. - siso only (m)
#SUMMARY smc	controller form state matrices etc. - siso only (view)
#SUMMARY smc	controller form state matrices etc. - siso only (ps)
#Linearised system: controller form state matrices etc.

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