Overview
Comment:Added code (mtt_parameters, get args etc) to allow arguments to the
a.out file
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: f09bc192e440f4b50354772a295af67ae2a4c65e208f2484e63b80988ff098c5
User & Date: gawthrop@users.sourceforge.net on 1999-08-29 06:54:42
Other Links: branch diff | manifest | tags
Context
1999-08-29
06:55:26
Removed [MTTu] = zero_input($Nu); # Zero the input
to avoide the p2c bug ????
check-in: 4e5bc0ae1e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
06:54:42
Added code (mtt_parameters, get args etc) to allow arguments to the
a.out file
check-in: f09bc192e4 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
06:46:05
Initial revision check-in: d8c0229f7f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_m2p from [cc22e8d923] to [cfe5b5c50a].

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.30  1999/04/20 06:16:46  peterg
## Removed calls to _switch.m
##
## Revision 1.29  1999/04/02 06:27:55  peterg
## Modified for new implicit method with swoitches
##
## Revision 1.28  1999/02/17 02:59:54  peterg







>
>
>
>







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.31  1999/08/02 13:40:03  peterg
## Added zero-state and zero_input to include list
## Removed zero_matrix
##
## Revision 1.30  1999/04/20 06:16:46  peterg
## Removed calls to _switch.m
##
## Revision 1.29  1999/04/02 06:27:55  peterg
## Modified for new implicit method with swoitches
##
## Revision 1.28  1999/02/17 02:59:54  peterg
160
161
162
163
164
165
166


167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

187
188


189
190
191
192
193
194
195
	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 "TYPE"
	echo "    StateVector  = ARRAY[1..$Nx] OF REAL;"
	echo "    InputVector  = ARRAY[1..$Nu] OF REAL;"
	echo "    OutputVector = ARRAY[1..$Ny] 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 ""
	echo "VAR"
        echo "    MTTt,mttLAST,mttDT,mttDDT   : REAL;"
        echo "    MTTWMIN,mttWMAX             : REAL;"
	echo "    mttx,mttdx,mttxx,mttAAx     : StateVector;"
	echo "    mttu                        : InputVector;"
	echo "    mtty                        : OutputVector;"
	echo "    mttAA                       : StateMatrix;"
	echo "    MTTi,MTTj,MTTit,MTTjt,MTTiLast,mttSTEPFACTOR,mttWSTEPS,mttSTEPS,mttINPUT : INTEGER;"

	echo "    mttMETHOD : IntegrationMethod;"
	echo "    MTTopen  : StateVector;"


	echo ""
        ;;
    switchopen)
	echo "PROCEDURE $Sys_rep(VAR open : StateVector; mttx : StateVector);"
	echo "VAR"
	echo "    MTTi,MTTj :  INTEGER;"
	;;







>
>



















|
>


>
>







164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
	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 "    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 ""
	echo "VAR"
        echo "    MTTt,mttLAST,mttDT,mttDDT   : REAL;"
        echo "    MTTWMIN,mttWMAX             : REAL;"
	echo "    mttx,mttdx,mttxx,mttAAx     : StateVector;"
	echo "    mttu                        : InputVector;"
	echo "    mtty                        : OutputVector;"
	echo "    mttAA                       : StateMatrix;"
	echo "    MTTi,MTTj,MTTit,MTTjt,MTTiLast: INTEGER;"
	echo "    mttSTEPFACTOR,mttWSTEPS,mttSTEPS,mttINPUT : INTEGER;"
	echo "    mttMETHOD : IntegrationMethod;"
	echo "    MTTopen  : StateVector;"
	echo "    mtt_parameters  : ARRAY[1..MTT_MaxParameters] OF REAL;"
	echo "    mtt_n_parameters  : INTEGER;"
	echo ""
        ;;
    switchopen)
	echo "PROCEDURE $Sys_rep(VAR open : StateVector; mttx : StateVector);"
	echo "VAR"
	echo "    MTTi,MTTj :  INTEGER;"
	;;
278
279
280
281
282
283
284

285
286
287
288
289
290
291
          printf("\n{%s $MTTPATH/trans/p/mtt_write.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/sign.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/mtt_euler.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/mtt_implicit.p}\n",inc)
          # printf("{%s $MTTPATH/trans/p/zero_matrix.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/zero_input.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/zero_state.p}\n",inc)

          printf("{%s %s_simpar.p}\n",inc,Sys) 
          printf("{%s %s_numpar.p}\n",inc,Sys)
          printf("{%s %s_state.p}\n",inc,Sys)
          printf("{%s %s_input.p}\n",inc,Sys)
          printf("{%s %s_ode.p}\n",inc,Sys)
          printf("{%s %s_odeo.p}\n",inc,Sys)
          printf("{%s %s_switchopen.p}\n\n",inc,Sys)







>







287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
          printf("\n{%s $MTTPATH/trans/p/mtt_write.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/sign.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/mtt_euler.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/mtt_implicit.p}\n",inc)
          # printf("{%s $MTTPATH/trans/p/zero_matrix.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/zero_input.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/zero_state.p}\n",inc)
          printf("{%s $MTTPATH/trans/p/mtt_getargs.p}\n",inc)
          printf("{%s %s_simpar.p}\n",inc,Sys) 
          printf("{%s %s_numpar.p}\n",inc,Sys)
          printf("{%s %s_state.p}\n",inc,Sys)
          printf("{%s %s_input.p}\n",inc,Sys)
          printf("{%s %s_ode.p}\n",inc,Sys)
          printf("{%s %s_odeo.p}\n",inc,Sys)
          printf("{%s %s_switchopen.p}\n\n",inc,Sys)


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