Overview
Comment:Modified for smxa and smxax
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 0cddda53376115a619d1f69862c7ba5b15b4789252a9f64e42336a4cc35ed22f
User & Date: gawthrop@users.sourceforge.net on 2000-04-07 13:24:41
Other Links: branch diff | manifest | tags
Context
2000-04-07
13:25:27
Initial revision check-in: a64332785f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:24:41
Modified for smxa and smxax check-in: 0cddda5337 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:01:15
Put in proper header etc check-in: e7fdcea11a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_m2p from [6466c7205a] to [a184ac3e90].

11
12
13
14
15
16
17



18
19
20
21
22
23
24
# Copyright (c) P.J.Gawthrop 1998

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



## Revision 1.36  1999/11/29 06:49:26  peterg
## Upped number of mtt_tnn
##
## Revision 1.35  1999/11/15 22:47:17  peterg
## Generates method-specific code for the ode2odeso rep.
##
## Revision 1.34  1999/10/28 05:08:48  peterg







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) P.J.Gawthrop 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.37  2000/04/07 08:17:37  peterg
## Added mttpar to the arg list of cse and cseo
##
## Revision 1.36  1999/11/29 06:49:26  peterg
## Upped number of mtt_tnn
##
## Revision 1.35  1999/11/15 22:47:17  peterg
## Generates method-specific code for the ode2odeso rep.
##
## Revision 1.34  1999/10/28 05:08:48  peterg
156
157
158
159
160
161
162

163
164
165
166
167
168
169
  echo Creating $Filename $MethodBlurb $StdinBlurb 

# Find system constants
Nx=`mtt_getsize $Sys x` # States
Nu=`mtt_getsize $Sys u` # Inputs 
Ny=`mtt_getsize $Sys y` # Inputs 
Npar=`wc -l $Sys\_sympar.txt | awk '{print $1}'`


#if [ "$rep" = "simpar" ]; then
#    mtt -q $Sys smx p
#fi

# Heading
(case $rep in







>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
  echo Creating $Filename $MethodBlurb $StdinBlurb 

# Find system constants
Nx=`mtt_getsize $Sys x` # States
Nu=`mtt_getsize $Sys u` # Inputs 
Ny=`mtt_getsize $Sys y` # Inputs 
Npar=`wc -l $Sys\_sympar.txt | awk '{print $1}'`
Nxx=`echo "$Nx * $Nx" | bc` # Nxx is Nx*Nx

#if [ "$rep" = "simpar" ]; then
#    mtt -q $Sys smx p
#fi

# Heading
(case $rep in
201
202
203
204
205
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
	echo "PROCEDURE $Sys_rep(VAR mtty : OutputVector;"
	echo "                       mttx : StateVector;"
	echo "                       mttu : InputVector;"
	echo "                       mttt : REAL;"
	echo "                       mttpar : ParameterVector);"

	;;
    smx)
	echo "PROCEDURE $Sys_rep(VAR mtta       : StateMatrix;"
	echo "                   VAR mttax,mttx : StateVector;"


	echo "                   VAR mttu       : InputVector;"






	echo "                       mttdt      : REAL);"








	;;
    ode2odes)
	echo "PROGRAM $Sys_rep;"
	echo "CONST"
	echo "    MTT_MaxParameters = 100;"
	echo "TYPE"
	echo "    StateVector  = ARRAY[1..$Nx] OF REAL;"
	echo "    InputVector  = ARRAY[1..$Nu] OF REAL;"
	echo "    OutputVector = ARRAY[1..$Ny] OF REAL;"
	echo "    ParameterVector = ARRAY[1..$Npar] OF REAL;"
	echo "    StateMatrix  = ARRAY[1..$Nx,1..$Nx] OF REAL;"

	echo "    glnparray    = StateVector;"
	echo "    glmparray    = StateVector;"
	echo "    glnarray     = StateVector;"
	echo "    glnpbynp     = StateMatrix;"
	echo "    glmpbynp     = StateMatrix;"
	## echo "    IntegrationMethod = 1..4;"
	echo ""







|

|
>
>
|
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>











>







205
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
	echo "PROCEDURE $Sys_rep(VAR mtty : OutputVector;"
	echo "                       mttx : StateVector;"
	echo "                       mttu : InputVector;"
	echo "                       mttt : REAL;"
	echo "                       mttpar : ParameterVector);"

	;;
    smx )
	echo "PROCEDURE $Sys_rep(VAR mtta       : StateMatrix;"
	echo "                   VAR mttax      : StateVector;"
	echo "                       mttx       : StateVector;"
	echo "                       mttu       : InputVector;"
	echo "                       mttdt      : REAL;"
	echo "                       mttpar     : ParameterVector);"
	;;
    smxa )
	echo "PROCEDURE $Sys_rep(VAR mtta       : StateMatrixVector;"
	echo "                       mttx       : StateVector;"
	echo "                       mttu       : InputVector;"
	echo "                       mttt      : REAL;"
	echo "                       mttpar     : ParameterVector);"
	;;
    smxax )
	echo "PROCEDURE $Sys_rep(VAR mttax      : StateVector;"
	echo "                       mttx       : StateVector;"
	echo "                       mttu       : InputVector;"
	echo "                       mttt      : REAL;"
	echo "                       mttpar     : ParameterVector);"
	;;
    ode2odes)
	echo "PROGRAM $Sys_rep;"
	echo "CONST"
	echo "    MTT_MaxParameters = 100;"
	echo "TYPE"
	echo "    StateVector  = ARRAY[1..$Nx] OF REAL;"
	echo "    InputVector  = ARRAY[1..$Nu] OF REAL;"
	echo "    OutputVector = ARRAY[1..$Ny] OF REAL;"
	echo "    ParameterVector = ARRAY[1..$Npar] OF REAL;"
	echo "    StateMatrix  = ARRAY[1..$Nx,1..$Nx] OF REAL;"
	echo "    StateMatrixVector  = ARRAY[1..$Nxx] OF REAL;"
	echo "    glnparray    = StateVector;"
	echo "    glmparray    = StateVector;"
	echo "    glnarray     = StateVector;"
	echo "    glnpbynp     = StateMatrix;"
	echo "    glmpbynp     = StateMatrix;"
	## echo "    IntegrationMethod = 1..4;"
	echo ""


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