Overview
Comment:Fixed cc and c problems to do with pow(x,y) and integers
mtt/lib/reduce/fix_c.r is included in rdae2dae and cse2smx_lang for
-c, -cc and -oct options
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 47742bde53a9d7f85371c9630b07864555d316f6589967cb926ed73d2541c2f5
User & Date: gawthrop@users.sourceforge.net on 2001-04-11 09:44:26
Other Links: branch diff | manifest | tags
Context
2001-04-11
15:34:56
Fixed bug to do with multiple outputs check-in: a230d6637d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:44:26
Fixed cc and c problems to do with pow(x,y) and integers
mtt/lib/reduce/fix_c.r is included in rdae2dae and cse2smx_lang for
-c, -cc and -oct options
check-in: 47742bde53 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
07:52:45
Temporary fix to avoid incorrect _input.cc with stdin check-in: 51ac8a149a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [995a31ae51] to [d5403023fe].

12
13
14
15
16
17
18




19
20
21
22
23
24
25
# Copyright (C) 2001 by Peter J. Gawthrop

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




## Revision 1.303  2001/04/10 12:54:50  gawthrop
## Minor fixes for sensitivity versions
##
## Revision 1.302  2001/04/06 05:24:30  geraint
## -stdin for .cc reps.
##
## Revision 1.301  2001/04/05 03:46:12  geraint







>
>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.304  2001/04/11 07:35:22  gawthrop
## Now uses system_cr.h in place of system.h in .c rep -
##   compatible with older code
##
## Revision 1.303  2001/04/10 12:54:50  gawthrop
## Minor fixes for sensitivity versions
##
## Revision 1.302  2001/04/06 05:24:30  geraint
## -stdin for .cc reps.
##
## Revision 1.301  2001/04/05 03:46:12  geraint
1097
1098
1099
1100
1101
1102
1103

1104
1105
1106
1107

1108
1109
1110
1111
1112
1113
1114
                mtt_switches="$mtt_switches $1";
		reset=reset;;  

	-p )
                mtt_switches="$mtt_switches $1";
		print='-p';;
	-c )

                mtt_switches="$mtt_switches $1";
                matrix_smxa="-matrix";
		computation=c ;;
	-cc )

                mtt_switches="$mtt_switches $1";
                matrix_smxa="-matrix";
		computation=cc ;;
	-o )
                mtt_switches="$mtt_switches $1";
		dae_is_ode=1 ;;
	-nocr )







>




>







1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
                mtt_switches="$mtt_switches $1";
		reset=reset;;  

	-p )
                mtt_switches="$mtt_switches $1";
		print='-p';;
	-c )
                fixcc='-fixcc'
                mtt_switches="$mtt_switches $1";
                matrix_smxa="-matrix";
		computation=c ;;
	-cc )
                fixcc='-fixcc'
                mtt_switches="$mtt_switches $1";
                matrix_smxa="-matrix";
		computation=cc ;;
	-o )
                mtt_switches="$mtt_switches $1";
		dae_is_ode=1 ;;
	-nocr )
1180
1181
1182
1183
1184
1185
1186

1187
1188
1189
1190
1191
1192
1193
                mtt_switches="$mtt_switches $1";
                stdin=stdin;;
	-sub )  mtt_switches="$mtt_switches $1 $2";
                sub='-sub'; 
                subsystem="_"$2;
                shift;;
	-oct )

                mtt_switches="$mtt_switches $1";
                using_oct=yes;
                m=oct
                ;;
	-opt )  mtt_switches="$mtt_switches $1";
                optimise='-optimise';;
	-partition ) mtt_switches="$mtt_switches $1";







>







1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
                mtt_switches="$mtt_switches $1";
                stdin=stdin;;
	-sub )  mtt_switches="$mtt_switches $1 $2";
                sub='-sub'; 
                subsystem="_"$2;
                shift;;
	-oct )
                fixcc='-fixcc'
                mtt_switches="$mtt_switches $1";
                using_oct=yes;
                m=oct
                ;;
	-opt )  mtt_switches="$mtt_switches $1";
                optimise='-optimise';;
	-partition ) mtt_switches="$mtt_switches $1";
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
.PRECIOUS: mtt_%.o
mtt_%.o: mtt_%.cc
	echo Compiling mtt_\$*.cc
	${MTT_CXX} ${MTT_CXXFLAGS} ${MTT_CXXINCS} -c $< -DSTANDALONE $define_octave_dev

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

ifeq ("$sensitivity","sensitivity")
ifeq ("$level","0")
$1_abg.fig: $sys_abg.fig
	abg2sensitivity_fig $sys_s
else # Either find the sensitivity model or fetch the model and create sensitivity model
$1_abg.fig:







|







1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
.PRECIOUS: mtt_%.o
mtt_%.o: mtt_%.cc
	echo Compiling mtt_\$*.cc
	${MTT_CXX} ${MTT_CXXFLAGS} ${MTT_CXXINCS} -c $< -DSTANDALONE $define_octave_dev

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

ifeq ("$sensitivity","sensitivity")
ifeq ("$level","0")
$1_abg.fig: $sys_abg.fig
	abg2sensitivity_fig $sys_s
else # Either find the sensitivity model or fetch the model and create sensitivity model
$1_abg.fig:
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
	echo Doing subsystems
	mtt_make_subsystems  ${sys} dae r
endif
ifeq ($rdae_is_dae,1)
	echo Copying $1_rdae.r to $1_dae.r
	cp $1_rdae.r  $1_dae.r
else
	rdae2dae_r ${Subsystem}; tidy ${Subsystem}_dae.r
endif

$1_dae.m: $1_def.r $1_dae.r  $1_sympars.txt
	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







|







2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
	echo Doing subsystems
	mtt_make_subsystems  ${sys} dae r
endif
ifeq ($rdae_is_dae,1)
	echo Copying $1_rdae.r to $1_dae.r
	cp $1_rdae.r  $1_dae.r
else
	rdae2dae_r ${fixcc} ${Subsystem}; tidy ${Subsystem}_dae.r
endif

$1_dae.m: $1_def.r $1_dae.r  $1_sympars.txt
	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
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
#SUMMARY smx	state matrices with variable state x (m)
#SUMMARY smxx	Sparse computation of Ax (m)
#SUMMARY smxtx	Sparse computation of ATx (m)
$1_smx.r: $1_def.r $1_def.m $1_ode.r $1_subs.r
		ode2smx_lang $1 r; tidy $1_smx.r

$1_smx.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r
		cse2smx_lang $optimise -parameters $1 smx m

$1_smxa.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r
		cse2smx_lang $optimise -parameters $matrix_smxa $1 smxa m

$1_smxax.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r
		cse2smx_lang $optimise -parameters $1 smxax 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.







|


|


|







2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
#SUMMARY smx	state matrices with variable state x (m)
#SUMMARY smxx	Sparse computation of Ax (m)
#SUMMARY smxtx	Sparse computation of ATx (m)
$1_smx.r: $1_def.r $1_def.m $1_ode.r $1_subs.r
		ode2smx_lang $1 r; tidy $1_smx.r

$1_smx.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r
		cse2smx_lang $fixcc $optimise -parameters $1 smx m

$1_smxa.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r
		cse2smx_lang $fixcc $optimise -parameters $matrix_smxa $1 smxa m

$1_smxax.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r
		cse2smx_lang $fixcc $optimise -parameters $1 smxax 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.

Modified mttroot/mtt/bin/trans/cse2smx_lang from [cb9652010b] to [01dd94a076].

25
26
27
28
29
30
31




32
33
34
35
36
37
38
    -matrix)
	matrix='yes';
	;;
    -optimise)
	optimise='LOAD SCOPE; ON GENTRANOPT;';
        iname='INAME mtt_o;';
	;;




    *)
	echo $1 is an unknown option
        exit;;
  esac
  shift
done








>
>
>
>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    -matrix)
	matrix='yes';
	;;
    -optimise)
	optimise='LOAD SCOPE; ON GENTRANOPT;';
        iname='INAME mtt_o;';
	;;
    -fixcc )
        include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'`
        blurb2='fixing c and cc code';
		;;
    *)
	echo $1 is an unknown option
        exit;;
  esac
  shift
done

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99



100
101
102
103
104
105
106


# Inform user
if [ -n "$optimise" ]; then
    blurbopt=' using code optimisation'
fi

echo Creating $1_$rep.$lang $blurb $blurbopt
#echo Creating $1_smxx.$lang
#echo Creating $1_smxtx.$lang

# Remove the old log file
rm -f cse2smx_r.log
rm -f $1_smx.$lang
rm -f $1_smxx.$lang
rm -f $1_smxtx.$lang
rm -f $1_$rep.body

# Use reduce to accomplish the transformation
$SYMBOLIC << EOF  >cse2smx_lang.log

lang := $lang;




in "$1_subs.r";
in "$1_def.r";
in "$1_cse.r";
in "$1_cr.r";

clear mttx; % Dont need this now - use mkid instead







|














>
>
>







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113


# Inform user
if [ -n "$optimise" ]; then
    blurbopt=' using code optimisation'
fi

echo Creating $1_$rep.$lang $blurb $blurbopt $blurb2
#echo Creating $1_smxx.$lang
#echo Creating $1_smxtx.$lang

# Remove the old log file
rm -f cse2smx_r.log
rm -f $1_smx.$lang
rm -f $1_smxx.$lang
rm -f $1_smxtx.$lang
rm -f $1_$rep.body

# Use reduce to accomplish the transformation
$SYMBOLIC << EOF  >cse2smx_lang.log

lang := $lang;

%% Fixes for c and cc (if needed)
$include;

in "$1_subs.r";
in "$1_def.r";
in "$1_cse.r";
in "$1_cr.r";

clear mttx; % Dont need this now - use mkid instead

Modified mttroot/mtt/bin/trans/def2write_r from [1f67ee80a1] to [7008801453].

9
10
11
12
13
14
15



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.5  2000/11/09 10:12:24  peterg
## Removed debugging line
##
## Revision 1.4  2000/10/14 16:19:54  peterg
## Just optimize one line at a time ...
##
## Revision 1.3  2000/10/11 09:07:17  peterg
## Added csex rep (cse without E)
##
## Revision 1.2  2000/10/10 21:02:17  peterg
## Added cse reps
##
## Revision 1.1  2000/10/10 09:07:32  peterg
## Initial revision
##
###############################################################


sys=$1 # System name
rep=$2 # System representation

# Inform User
echo Creating $1_$2_write.r








>
>
>
















<







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35
36
37
38
39
40
41
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.6  2000/11/29 20:48:53  peterg
## Zapped unnecessary Npar creation
##
## Revision 1.5  2000/11/09 10:12:24  peterg
## Removed debugging line
##
## Revision 1.4  2000/10/14 16:19:54  peterg
## Just optimize one line at a time ...
##
## Revision 1.3  2000/10/11 09:07:17  peterg
## Added csex rep (cse without E)
##
## Revision 1.2  2000/10/10 21:02:17  peterg
## Added cse reps
##
## Revision 1.1  2000/10/10 09:07:32  peterg
## Initial revision
##
###############################################################


sys=$1 # System name
rep=$2 # System representation

# Inform User
echo Creating $1_$2_write.r

90
91
92
93
94
95
96

97
98
99
100
101
102
103
    *)
        echo def2write_r: representation $rep not recognised
        exit
esac

# Write out the code
echo 'off echo$ load scope$'                    >$1_$2_write.r

for matrix in $matrices; do
    n=`first "$ns"`; ns=`rest "$ns"` 
    m=`first "$ms"`; ms=`rest "$ms"`
    is=`n2m 1 $n`; 
    js=`n2m 1 $m`; 
    for i in $is; do
      for j in $js; do







>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
    *)
        echo def2write_r: representation $rep not recognised
        exit
esac

# Write out the code
echo 'off echo$ load scope$'                    >$1_$2_write.r

for matrix in $matrices; do
    n=`first "$ns"`; ns=`rest "$ns"` 
    m=`first "$ms"`; ms=`rest "$ms"`
    is=`n2m 1 $n`; 
    js=`n2m 1 $m`; 
    for i in $is; do
      for j in $js; do

Modified mttroot/mtt/bin/trans/rdae2dae_r from [26191cff7e] to [2d68ae9a32].

10
11
12
13
14
15
16



17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop, 1991, 1994, 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.5  2000/12/28 12:39:02  peterg
## Put under RCS
##
## Revision 1.4  2000/09/04 08:42:53  peterg
## Put in extra echo to space output
##
## Revision 1.3  2000/09/02 15:55:11  peterg







>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (c) P.J.Gawthrop, 1991, 1994, 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.6  2001/02/03 13:40:45  gawthrop
## Added explicit MTTNu
##
## Revision 1.5  2000/12/28 12:39:02  peterg
## Put under RCS
##
## Revision 1.4  2000/09/04 08:42:53  peterg
## Put in extra echo to space output
##
## Revision 1.3  2000/09/02 15:55:11  peterg
84
85
86
87
88
89
90




91
92
93
94
95
96
97
  case $1 in
	-I )
                info=info;;
	-partition )
                partition=yes;
                blurb='with partitioning';
		;;




	*)
		echo "$1 is an invalid argument - ignoring";
                exit ;;
  esac
  shift
done








>
>
>
>







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
  case $1 in
	-I )
                info=info;;
	-partition )
                partition=yes;
                blurb='with partitioning';
		;;
	-fixcc )
                include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'`
                blurb2='fixing c and cc code';
		;;
	*)
		echo "$1 is an invalid argument - ignoring";
                exit ;;
  esac
  shift
done

110
111
112
113
114
115
116
117
118
119
120
121
122
123



124
125
126
127
128
129
130
crname=$topname"_cr.r"
subsname=$topname"_subs.r"
rdaename=$sysname"_rdae.r"
daename=$sysname"_dae.r"
logname="rdae2dae.log"

# Inform user
echo Creating $daename

# Remove the old log file
rm -f $logname

# Use symbolic algebra to accomplish the transformation
$SYMBOLIC >$logname  << EOF




%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

% CRs
in "$crname";








|






>
>
>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
crname=$topname"_cr.r"
subsname=$topname"_subs.r"
rdaename=$sysname"_rdae.r"
daename=$sysname"_dae.r"
logname="rdae2dae.log"

# Inform user
echo Creating $daename $blurb $blurb2

# Remove the old log file
rm -f $logname

# Use symbolic algebra to accomplish the transformation
$SYMBOLIC >$logname  << EOF

% Fix c code if required
$include

%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

% CRs
in "$crname";

Modified mttroot/mtt/cc/include/useful-functions.hh from [3c59bd0844] to [37750f990b].



1
2
3
4
5
6
7


#ifndef HAVE_USEFUL_FUNCTIONS_HH
#define HAVE_USEFUL_FUNCTIONS_HH


#ifdef __CPLUSPLUS
template <class class_t>
#else
>
>







1
2
3
4
5
6
7
8
9
#define pi 3.14159 // Predefine pi

#ifndef HAVE_USEFUL_FUNCTIONS_HH
#define HAVE_USEFUL_FUNCTIONS_HH


#ifdef __CPLUSPLUS
template <class class_t>
#else

Modified mttroot/mtt/lib/comp/compound/Mechanical/Mechanical-2D/gRODa/gRODa_abg.fig from [57eb63138e] to [38a3b778aa].

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
	 10125 9450 990 9450 990 8100 10125 8100 10125 9450
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 3
	 8550 5400 9225 6075 8955 6075
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
	 8685 5265 8415 5535
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 3
	 3375 5175 2025 3825 2250 3825
4 1 -1 0 0 0 20 0.0000 4 195 150 5628 5268 1\001
4 1 -1 0 0 0 20 0.0000 4 195 315 6933 5268 I:J\001
4 1 -1 0 0 0 20 0.0000 4 195 150 2927 5312 1\001
4 1 -1 0 0 0 20 0.0000 4 195 150 2972 2792 0\001
4 1 -1 0 0 0 20 0.0000 4 195 150 2927 7742 0\001
4 1 -1 0 0 0 20 0.0000 4 195 150 8328 5313 1\001
4 1 -1 0 0 0 20 0.0000 4 195 150 8373 2793 0\001
4 1 -1 0 0 0 20 0.0000 4 195 150 8328 7743 0\001
4 1 -1 0 0 0 20 0.0000 4 270 735 9676 5266 I:m_y\001
4 1 -1 0 0 0 20 0.0000 4 240 735 1531 5221 I:m_x\001
4 1 -1 0 0 0 20 0.0000 4 195 1170 4636 4141 EMTF:c1\001
4 1 -1 0 0 0 20 0.0000 4 195 1170 4681 6391 EMTF:c2\001
4 1 -1 0 0 0 20 0.0000 4 195 1155 7156 4141 EMTF:s1\001
4 1 -1 0 0 0 20 0.0000 4 195 1155 7156 6391 EMTF:s2\001
4 1 5 0 0 0 20 0.0000 4 195 150 3603 5313 0\001
4 1 26 0 0 0 16 0.0000 4 210 330 6751 4456 [in]\001
4 1 26 0 0 0 16 0.0000 4 210 450 6751 3781 [out]\001
4 1 26 0 0 0 16 0.0000 4 210 330 6751 6076 [in]\001
4 1 26 0 0 0 16 0.0000 4 210 450 6751 6706 [out]\001
4 1 26 0 0 0 16 0.0000 4 210 570 6211 6526 [mod]\001
4 1 5 0 0 0 20 0.0000 4 210 990 4681 5266 INTF:th\001
4 1 1 1 0 0 20 0.0000 4 195 210 2925 10035 X\001
4 1 1 1 0 32 20 0.0000 4 150 195 5580 9990 a\001
4 1 1 1 0 0 20 0.0000 4 195 210 8280 9990 Y\001
4 2 26 0 0 0 16 0.0000 4 210 570 3960 4140 [mod]\001
4 2 26 0 0 0 16 0.0000 4 210 570 6345 4095 [mod]\001
4 2 26 0 0 0 16 0.0000 4 210 570 3960 6210 [mod]\001
4 1 26 0 0 0 16 0.0000 4 210 330 4590 4455 [in]\001
4 1 26 0 0 0 16 0.0000 4 210 450 4545 3780 [out]\001
4 1 26 0 0 0 16 0.0000 4 210 450 4590 6660 [out]\001
4 0 26 0 0 0 16 0.0000 4 210 330 4365 6030 [in]\001
4 1 4 0 0 0 20 0.0000 4 270 1485 2971 1216 SS:[xTip_a]\001
4 1 4 0 0 0 20 0.0000 4 270 1500 2971 9361 SS:[xTip_b]\001
4 1 4 0 0 0 20 0.0000 4 285 1485 8372 1217 SS:[yTip_a]\001
4 1 4 0 0 0 20 0.0000 4 285 1500 8417 9362 SS:[yTip_b]\001
4 1 4 0 0 0 20 0.0000 4 270 2250 5671 1216 SS:[angularTip_a]\001
4 1 4 0 0 0 20 0.0000 4 270 2265 5671 9361 SS:[angularTip_b]\001
4 1 1 1 0 0 20 0.0000 4 255 630 1350 2700 Tip a\001
4 1 1 1 0 0 20 0.0000 4 195 1470 1260 6300 Mass centre\001
4 1 1 1 0 0 20 0.0000 4 270 645 1350 9855 Tip b\001
4 1 -1 0 0 0 20 0.0000 4 270 810 9360 6345 SS:mg\001
4 2 4 0 0 0 20 0.0000 4 270 1290 1935 3735 SS:[angle]\001







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

|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
	 10125 9450 990 9450 990 8100 10125 8100 10125 9450
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 3
	 8550 5400 9225 6075 8955 6075
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
	 8685 5265 8415 5535
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 3
	 3375 5175 2025 3825 2250 3825
4 1 -1 0 0 0 20 0.0000 4 195 135 5628 5268 1\001
4 1 -1 0 0 0 20 0.0000 4 195 270 6933 5268 I:J\001
4 1 -1 0 0 0 20 0.0000 4 195 135 2927 5312 1\001
4 1 -1 0 0 0 20 0.0000 4 195 135 2972 2792 0\001
4 1 -1 0 0 0 20 0.0000 4 195 135 2927 7742 0\001
4 1 -1 0 0 0 20 0.0000 4 195 135 8328 5313 1\001
4 1 -1 0 0 0 20 0.0000 4 195 135 8373 2793 0\001
4 1 -1 0 0 0 20 0.0000 4 195 135 8328 7743 0\001
4 1 -1 0 0 0 20 0.0000 4 255 660 9676 5266 I:m_y\001
4 1 -1 0 0 0 20 0.0000 4 255 660 1531 5221 I:m_x\001
4 1 -1 0 0 0 20 0.0000 4 195 1110 4636 4141 EMTF:c1\001
4 1 -1 0 0 0 20 0.0000 4 195 1110 4681 6391 EMTF:c2\001
4 1 -1 0 0 0 20 0.0000 4 195 1095 7156 4141 EMTF:s1\001
4 1 -1 0 0 0 20 0.0000 4 195 1095 7156 6391 EMTF:s2\001
4 1 5 0 0 0 20 0.0000 4 195 135 3603 5313 0\001
4 1 26 0 0 0 16 0.0000 4 210 345 6751 4456 [in]\001
4 1 26 0 0 0 16 0.0000 4 210 465 6751 3781 [out]\001
4 1 26 0 0 0 16 0.0000 4 210 345 6751 6076 [in]\001
4 1 26 0 0 0 16 0.0000 4 210 465 6751 6706 [out]\001
4 1 26 0 0 0 16 0.0000 4 210 585 6211 6526 [mod]\001
4 1 5 0 0 0 20 0.0000 4 195 960 4681 5266 INTF:th\001
4 1 1 1 0 0 20 0.0000 4 195 210 2925 10035 X\001
4 1 1 1 0 32 20 0.0000 4 135 180 5580 9990 a\001
4 1 1 1 0 0 20 0.0000 4 195 210 8280 9990 Y\001
4 2 26 0 0 0 16 0.0000 4 210 585 3960 4140 [mod]\001
4 2 26 0 0 0 16 0.0000 4 210 585 6345 4095 [mod]\001
4 2 26 0 0 0 16 0.0000 4 210 585 3960 6210 [mod]\001
4 1 26 0 0 0 16 0.0000 4 210 345 4590 4455 [in]\001
4 1 26 0 0 0 16 0.0000 4 210 465 4545 3780 [out]\001
4 1 26 0 0 0 16 0.0000 4 210 465 4590 6660 [out]\001
4 0 26 0 0 0 16 0.0000 4 210 345 4365 6030 [in]\001
4 1 4 0 0 0 20 0.0000 4 255 1380 2971 1216 SS:[xTip_a]\001
4 1 4 0 0 0 20 0.0000 4 255 1380 2971 9361 SS:[xTip_b]\001
4 1 4 0 0 0 20 0.0000 4 255 1380 8372 1217 SS:[yTip_a]\001
4 1 4 0 0 0 20 0.0000 4 255 1380 8417 9362 SS:[yTip_b]\001
4 1 4 0 0 0 20 0.0000 4 255 2130 5671 1216 SS:[angularTip_a]\001
4 1 4 0 0 0 20 0.0000 4 255 2130 5671 9361 SS:[angularTip_b]\001
4 1 1 1 0 0 20 0.0000 4 255 600 1350 2700 Tip a\001
4 1 1 1 0 0 20 0.0000 4 195 1380 1260 6300 Mass centre\001
4 1 1 1 0 0 20 0.0000 4 255 600 1350 9855 Tip b\001
4 1 -1 0 0 0 20 0.0000 4 255 720 9360 6345 Se:mg\001
4 2 4 0 0 0 20 0.0000 4 255 1200 1935 3735 SS:[angle]\001

Modified mttroot/mtt/lib/comp/compound/Mechanical/Mechanical-2D/gRODa/gRODa_lbl.txt from [7648c14a12] to [66ade3ce45].

29
30
31
32
33
34
35



36
37
38
39
40
41
42
%% Label file for system gRODa (gRODa_lbl.txt)

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.3  1998/11/30 10:47:53  peterg
% %% Added extra a_a and a_b aliases
% %%
% %% Revision 1.2  1998/11/25 13:55:42  peterg
% %% Added missig attribute field m*g,internal
% %%
% %% Revision 1.1  1998/11/25 10:48:34  peterg







>
>
>







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%% Label file for system gRODa (gRODa_lbl.txt)

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  1999/08/05 08:04:40  peterg
% %% Initial revision
% %%
% %% Revision 1.3  1998/11/30 10:47:53  peterg
% %% Added extra a_a and a_b aliases
% %%
% %% Revision 1.2  1998/11/25 13:55:42  peterg
% %% Added missig attribute field m*g,internal
% %%
% %% Revision 1.1  1998/11/25 10:48:34  peterg
74
75
76
77
78
79
80

81
82


83
84
85
86
87
88
89
90
91
92

%Modulated transformers
s1	lsin	flow,l_a
s2	lsin	flow,l_b
c1	lcos	flow,l_a
c2	lcos	flow,l_b


% Component type SS
	mg			SS		m*g,internal


	[angularTip_a]		SS		external,external
	[angularTip_b]		SS		external,external
	[xTip_a]		SS		external,external
	[xTip_b]		SS		external,external
	[yTip_a]		SS		external,external
	[yTip_b]		SS		external,external
	[angle]			SS		external,external


	







>
|
|
>
>










77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

%Modulated transformers
s1	lsin	flow,l_a
s2	lsin	flow,l_b
c1	lcos	flow,l_a
c2	lcos	flow,l_b


% Component type Se
	mg			SS		m*g


	[angularTip_a]		SS		external,external
	[angularTip_b]		SS		external,external
	[xTip_a]		SS		external,external
	[xTip_b]		SS		external,external
	[yTip_a]		SS		external,external
	[yTip_b]		SS		external,external
	[angle]			SS		external,external


	

Modified mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_subs.r from [2fa7735088] to [254628ce3b].

1
2
3
4
5
6
7
8
9
10



11
12
13
14
15
16
17

18
19
% Default SUBS file
% File idRC_subs.r
% Generated by MTT on Tue Apr  3 09:43:38 BST 2001.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here


FOR ALL x,y LET x^y = pow(x,y);
END;










>
>
>







>
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% Default SUBS file
% File idRC_subs.r
% Generated by MTT on Tue Apr  3 09:43:38 BST 2001.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2001/04/05 12:00:18  gawthrop
% %% Identification example
% %%
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here

%The following is now done automatically
% FOR ALL x,y LET x^y = pow(x,y);
END;

Modified mttroot/mtt/lib/examples/Identification/idRC/sidRC_subs.r from [84a767b42e] to [c8c2752116].

1
2
3
4
5
6
7
8
9
10



11
12
13
14
15
16
17


18
19
20
21
22
% Default SUBS file
% File sidRC_subs.r
% Generated by MTT on Tue Apr  3 09:43:38 BST 2001.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here



FOR ALL x,y LET x^y = pow(x,y); % Use the pow function

ON ROUNDED; % No integer output

END;










>
>
>







>
>
|

|


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Default SUBS file
% File sidRC_subs.r
% Generated by MTT on Tue Apr  3 09:43:38 BST 2001.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2001/04/05 11:57:29  gawthrop
% %% Identification example
% %%
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here


%The following is now done automatically
%FOR ALL x,y LET x^y = pow(x,y); % Use the pow function

%ON ROUNDED; % No integer output

END;

Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/Cart_abg.fig from [c7e129b96f] to [451fec60c3].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36






37
38
39
40
41
42
43
44
45
46
47
48
49



#FIG 3.2
Portrait
Center
Metric
A4      
100.00
Single
-2
1200 2
6 90 3915 6615 4320
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2475 4050 3825 4050 3600 4275
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 4050 5625 4050 5400 4275
4 1 0 100 0 18 20 0.0000 4 210 165 4050 4140 1\001
4 1 4 100 0 18 20 0.0000 4 285 870 6165 4140 SS:[y]\001
4 2 0 100 0 18 20 0.0000 4 285 2310 2430 4140 Sf:zero_velocity\001
-6
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4050 2925 4050 1575 4275 1800
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 3150 5625 3150 5400 3375
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 4950 5625 4950 5400 5175
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 2475 3825 2475 4275
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2475 3150 3825 3150 3600 3375
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 3825 4950 2475 4950 2700 5175
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 3825 2925 2870 1970 2870 2289
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4288 2957 5243 2002 5243 2320
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6525 3150 7875 3150 7650 3375






4 1 1 101 0 3 20 0.0000 4 270 1290 4140 3600 x-velocity\001
4 1 0 100 0 18 20 0.0000 4 210 165 4050 3240 1\001
4 1 4 100 0 18 20 0.0000 4 285 1425 1710 3240 SS:[drive]\001
4 1 1 101 0 3 20 0.0000 4 270 1275 4185 4500 y-velocity\001
4 1 1 101 0 3 20 0.0000 4 270 2130 4050 5490 angular-velocity\001
4 1 0 100 0 18 20 0.0000 4 210 165 4050 5040 1\001
4 1 4 100 0 18 20 0.0000 4 285 870 6165 5040 SS:[a]\001
4 2 0 100 0 18 20 0.0000 4 300 780 2430 5040 R:r_p\001
4 1 0 100 0 18 20 0.0000 4 285 765 2835 1845 R:r_c\001
4 1 4 100 0 18 20 0.0000 4 285 870 4050 1440 SS:[x]\001
4 1 0 100 0 18 20 0.0000 4 285 795 5355 1845 I:m_c\001
4 1 0 100 0 18 20 0.0000 4 225 660 6075 3240 INTF\001
4 0 0 100 0 18 20 0.0000 4 225 1665 8010 3240 De:Position\001












<
<
<
<
<
<
<
<
<


















>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
1
2
3
4
5
6
7
8
9









10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#FIG 3.2
Portrait
Center
Metric
A4      
100.00
Single
-2
1200 2









2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4050 2925 4050 1575 4275 1800
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 3150 5625 3150 5400 3375
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 4950 5625 4950 5400 5175
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 2475 3825 2475 4275
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2475 3150 3825 3150 3600 3375
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 3825 4950 2475 4950 2700 5175
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 3825 2925 2870 1970 2870 2289
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4288 2957 5243 2002 5243 2320
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6525 3150 7875 3150 7650 3375
2 4 0 2 31 7 101 0 -1 0.000 0 0 7 0 0 5
	 9900 5850 225 5850 225 900 9900 900 9900 5850
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2475 4050 3825 4050 3600 4275
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 4050 5625 4050 5400 4275
4 1 1 101 0 3 20 0.0000 4 270 1155 4140 3600 x-velocity\001
4 1 0 100 0 18 20 0.0000 4 195 150 4050 3240 1\001
4 1 4 100 0 18 20 0.0000 4 270 1320 1710 3240 SS:[drive]\001
4 1 1 101 0 3 20 0.0000 4 270 1125 4185 4500 y-velocity\001
4 1 1 101 0 3 20 0.0000 4 270 1905 4050 5490 angular-velocity\001
4 1 0 100 0 18 20 0.0000 4 195 150 4050 5040 1\001
4 1 4 100 0 18 20 0.0000 4 270 825 6165 5040 SS:[a]\001
4 2 0 100 0 18 20 0.0000 4 270 735 2430 5040 R:r_p\001
4 1 0 100 0 18 20 0.0000 4 270 720 2835 1845 R:r_c\001
4 1 4 100 0 18 20 0.0000 4 270 825 4050 1440 SS:[x]\001
4 1 0 100 0 18 20 0.0000 4 270 735 5355 1845 I:m_c\001
4 1 0 100 0 18 20 0.0000 4 210 630 6075 3240 INTF\001
4 0 0 100 0 18 20 0.0000 4 210 1590 8010 3240 De:Position\001
4 1 0 100 0 18 20 0.0000 4 195 150 4050 4140 1\001
4 1 4 100 0 18 20 0.0000 4 270 825 6165 4140 SS:[y]\001
4 2 0 100 0 18 20 0.0000 4 270 2190 2430 4140 Sf:zero_velocity\001

Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/Cart_lbl.txt from [45427e6965] to [947eebb4f2].

1
2
3
4
5
6
7
8
9



10
11
12
13
14
15
16





17
18
19
20
21
22
23
%% Label file for system Cart (Cart_lbl.txt)
%SUMMARY Cart
%DESCRIPTION <Detailed description here>

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
%ALIAS	
%ALIAS	in	drive
%ALIAS	pendulum|out	x,y,a






% Argument aliases
%ALIAS	$1	m_c

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn


|






>
>
>




<


>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

17
18
19
20
21
22
23
24
25
26
27
28
29
30
%% Label file for system Cart (Cart_lbl.txt)
%SUMMARY Cart
%DESCRIPTION Simple cart model

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 18:00:45  peterg
% %% To RCS
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases

%ALIAS	in	drive
%ALIAS	pendulum|out	x,y,a
%UNITS  drive     translational N m/s
b%UNITS  x         translational N m/s
%UNITS  y         translational N m/s
%UNITS  a         rotational N*m radian/s


% Argument aliases
%ALIAS	$1	m_c

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

% Component type SS
	[a]	SS		external,external
	[drive]	SS		external,external
	[x]	SS		external,external
	[y]	SS		external,external

% Component type Df
	v_c			SS	external

% Component type Sf
	zero_velocity		SS	0










|
|






41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

% Component type SS
	[a]	SS		external,external
	[drive]	SS		external,external
	[x]	SS		external,external
	[y]	SS		external,external

% Component type De
	Position			SS	external

% Component type Sf
	zero_velocity		SS	0



Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulumOnCart_abg.fig from [4f8b99a8bb] to [95293b57ef].

1
2
3
4
5
6
7
8
9
10
11
12
13


14
15
16
17
18
19
20
21


22
23
24
#FIG 3.2
Portrait
Center
Metric
A4      
100.00
Single
-2
1200 2
6 3780 4005 3870 4545
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 3825 4050 3825 4500
-6


2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2475 4275 3825 4275 3600 4500
2 4 0 2 1 7 101 0 -1 0.000 0 0 7 0 0 5
	 5175 4725 3375 4725 3375 3825 5175 3825 5175 4725
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 4050 5230 3095 5230 3414
2 1 0 2 1 7 101 0 -1 0.000 0 0 -1 0 0 5
	 4477 3712 5872 2317 6052 2497 4702 3847 4522 3667


4 1 0 100 0 18 20 0.0000 4 225 600 4275 4365 Cart\001
4 1 0 100 0 18 20 0.0000 4 225 645 2070 4365 Se:F\001
4 1 0 100 0 18 20 0.0000 4 225 1440 5355 3060 InvertedPendulum\001













>
>








>
>
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#FIG 3.2
Portrait
Center
Metric
A4      
100.00
Single
-2
1200 2
6 3780 4005 3870 4545
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 3825 4050 3825 4500
-6
1 4 0 2 1 7 51 0 -1 0.000 1 0.0000 3700 4909 203 203 3497 4909 3903 4909
1 4 0 2 1 7 51 0 -1 0.000 1 0.0000 4817 4902 203 203 4614 4902 5020 4902
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2475 4275 3825 4275 3600 4500
2 4 0 2 1 7 101 0 -1 0.000 0 0 7 0 0 5
	 5175 4725 3375 4725 3375 3825 5175 3825 5175 4725
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 4050 5230 3095 5230 3414
2 1 0 2 1 7 101 0 -1 0.000 0 0 -1 0 0 5
	 4477 3712 5872 2317 6052 2497 4702 3847 4522 3667
2 4 0 2 31 7 101 0 -1 0.000 0 0 7 0 0 5
	 6750 5400 1125 5400 1125 2025 6750 2025 6750 5400
4 1 0 100 0 18 20 0.0000 4 210 570 4275 4365 Cart\001
4 1 0 100 0 18 20 0.0000 4 270 840 2070 4365 SS:[F]\001
4 1 0 100 0 18 20 0.0000 4 210 2445 5355 3060 InvertedPendulum\001

Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulumOnCart_input.txt from [5ab6c2c810] to [eed0316c02].

1



2
3
4
5
6
7
8
9
10
11
12
13
14
# -*-octave-*- Put Emacs into octave-mode



# Input specification (InvertedPendulumOnCart_input.txt)
# Generated by MTT at Thu Aug  5 09:17:30 BST 1999
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
###############################################################

# Set the inputs
## Removed by MTT on Fri Nov 10 14:31:10 GMT 2000: mttu(1) = 1.0*t<1 -1.0*((t>=1)&&(t<2)); 	# u (InvertedPendulumOnCart_F)

invertedpendulumoncart_f_1_u	= 1.0*t<1 -1.0*((t>=1)&&(t<2));
|
>
>
>
|
|
|
<
<
<
<
<

<
<

|
1
2
3
4
5
6
7





8


9
10
## -*-octave-*- Put Emacs into octave-mode ##
 
## 
## System InvertedPendulumOnCart, representation input, language txt; 
## File idInvertedPendulumOnCart_input.txt; 
## Generated by MTT on Thu Apr  5 15:27:30 BST 2001; 










InvertedPendulumOnCart_f	= 1.0*(t<1); # Force for 1 sec

Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulumOnCart_lbl.txt from [cc84de002b] to [f7c8e12ace].

1
2
3
4
5
6
7
8
9



10
11
12
13


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%% Label file for system InvertedPendulumOnCart (InvertedPendulumOnCart_lbl.txt)
%SUMMARY InvertedPendulumOnCart
%DESCRIPTION <Detailed description here>

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases



% Argument aliases

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn
%	     blank

% ---- Component labels ----

% Component type Se
	F   SS	 external






|






>
>
>




>
>










|
|




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%% Label file for system InvertedPendulumOnCart (InvertedPendulumOnCart_lbl.txt)
%SUMMARY InvertedPendulumOnCart
%DESCRIPTION An Inverted Pendulum on a Cart

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 18:00:45  peterg
% %% To RCS
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
%ALIAS in   F
%UNITS F    translational  N m/s

% Argument aliases

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn
%	     blank

% ---- Component labels ----

% Component type SS
	[F]   SS	 external,internal




Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulumOnCart_subs.r from [95d5640b1d] to [752962d684].

1
2
3
4
5
6
7
8
9
10



11
12
13
14
15
16
17
18
19




20
% Default SUBS file
% File InvertedPendulumOnCart_subs.r
% Generated by MTT on Thu Nov  9 18:55:44 GMT 2000.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.1  2000/12/28 18:00:45  peterg
% %% To RCS
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here

for all x let cos(x)^2+sin(x)^2 = 1;





END;










>
>
>









>
>
>
>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Default SUBS file
% File InvertedPendulumOnCart_subs.r
% Generated by MTT on Thu Nov  9 18:55:44 GMT 2000.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.2  2001/04/02 10:57:57  gawthrop
% %% Added missing ;
% %%
% %% Revision 1.1  2000/12/28 18:00:45  peterg
% %% To RCS
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here

for all x let cos(x)^2+sin(x)^2 = 1;

FOR ALL x,y LET x^y = pow(x,y); % Use the pow function

ON ROUNDED; % No integer output

END;

Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulum_abg.fig from [574af9822e] to [fd34fadce3].

31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46
6 3555 4545 6345 4770
4 1 4 100 0 18 14 0.0000 4 210 495 3825 4725 [x_a]\001
4 1 4 100 0 18 14 0.0000 4 210 510 4950 4725 [y_a]\001
4 1 4 100 0 18 14 0.0000 4 210 510 6075 4725 [a_a]\001
-6
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6840 4950 8190 4950 7965 5175


4 1 4 100 0 18 20 0.0000 4 285 870 3825 7065 SS:[x]\001
4 1 4 100 0 18 20 0.0000 4 285 870 4950 7065 SS:[y]\001
4 1 4 100 0 18 20 0.0000 4 285 870 6075 7065 SS:[a]\001
4 1 0 100 0 18 20 0.0000 4 285 1590 4964 5040 gRODa:rod\001
4 1 0 100 0 18 20 0.0000 4 285 960 3825 3015 Se:x_0\001
4 1 0 100 0 18 20 0.0000 4 285 960 4950 3015 Se:y_0\001
4 1 0 100 0 18 20 0.0000 4 285 960 6030 3015 Se:a_0\001
4 1 4 100 0 18 14 0.0000 4 210 270 6660 4995 [a]\001
4 1 0 100 0 18 20 0.0000 4 225 1200 8865 5040 De:theta\001







>
>
|
|
|
|
|
|
|

|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
6 3555 4545 6345 4770
4 1 4 100 0 18 14 0.0000 4 210 495 3825 4725 [x_a]\001
4 1 4 100 0 18 14 0.0000 4 210 510 4950 4725 [y_a]\001
4 1 4 100 0 18 14 0.0000 4 210 510 6075 4725 [a_a]\001
-6
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6840 4950 8190 4950 7965 5175
2 4 0 2 31 7 101 0 -1 0.000 0 0 7 0 0 5
	 9675 7425 3150 7425 3150 2475 9675 2475 9675 7425
4 1 4 100 0 18 20 0.0000 4 270 825 3825 7065 SS:[x]\001
4 1 4 100 0 18 20 0.0000 4 270 825 4950 7065 SS:[y]\001
4 1 4 100 0 18 20 0.0000 4 270 825 6075 7065 SS:[a]\001
4 1 0 100 0 18 20 0.0000 4 270 1545 4964 5040 gRODa:rod\001
4 1 0 100 0 18 20 0.0000 4 270 915 3825 3015 Se:x_0\001
4 1 0 100 0 18 20 0.0000 4 270 915 4950 3015 Se:y_0\001
4 1 0 100 0 18 20 0.0000 4 270 915 6030 3015 Se:a_0\001
4 1 4 100 0 18 14 0.0000 4 210 270 6660 4995 [a]\001
4 1 0 100 0 18 20 0.0000 4 210 1140 8865 5040 De:theta\001

Modified mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/InvertedPendulumOnCart/InvertedPendulum_lbl.txt from [ecf421bd70] to [4d5db894bb].

1
2
3
4
5
6
7
8
9



10
11
12
13





14
15
16
17
18
19
20
21
%% Label file for system InvertedPendulum (InvertedPendulum_lbl.txt)
%SUMMARY InvertedPendulum
%DESCRIPTION <Detailed description here>

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases





%ALIAS	in	x,y,a


% Argument aliases

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn









>
>
>




>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%% Label file for system InvertedPendulum (InvertedPendulum_lbl.txt)
%SUMMARY InvertedPendulum
%DESCRIPTION <Detailed description here>

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 18:00:45  peterg
% %% To RCS
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
%UNITS  x         translational N m/s
%UNITS  y         translational N m/s
%UNITS  a         rotational N*m radian/s


%ALIAS	in|cart	x,y,a


% Argument aliases

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn

Added mttroot/mtt/lib/reduce/fix_c.r version [ce0b4c95c5].





































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
%% Fixes for c-code generation

ON ROUNDED$ % No integer output

%% Changes x^y to pow(x,y)
 OPERATOR pow$
 FOR ALL x,y LET x^y = pow(x,y)$ % Use the pow function
 
 %% Derivatives
 FOR ALL f,g,x LET df(pow(f,g),x)=
 	   pow(f,g-1) * (df(f,x)*g + df(g,x)*f*log(f))$

 %% Special cases
 FOR ALL x LET pow(x,0) = 1$
 FOR ALL x LET pow(x,1) = x$


END$


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