Overview
Comment:New csex rep (uses scope optimisation)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: a95f9980a74bb56494eb936bd9c557aae622f74c28c358d7a0a63f6146ce6351
User & Date: gawthrop@users.sourceforge.net on 2000-10-11 09:06:17
Other Links: branch diff | manifest | tags
Context
2000-10-11
09:06:52
Removed _ check-in: 5835bbe3cb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:06:17
New csex rep (uses scope optimisation) check-in: a95f9980a7 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:59:15
Added csex rep check-in: 94b92b40c3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_m2p from [105f017dde] to [5ab23f4ca4].

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.53  2000/08/24 17:10:59  peterg
## New dummy variables mtt_o (for optimisation), mtt_s (for segmentation)
##
## Revision 1.52  2000/08/24 08:30:45  peterg
## *** empty log message ***
##
## Revision 1.51  2000/08/01 12:25:24  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.54  2000/09/30 14:10:06  peterg
## Zap lines containing "Remove in mtt_m2p"
##
## Revision 1.53  2000/08/24 17:10:59  peterg
## New dummy variables mtt_o (for optimisation), mtt_s (for segmentation)
##
## Revision 1.52  2000/08/24 08:30:45  peterg
## *** empty log message ***
##
## Revision 1.51  2000/08/01 12:25:24  peterg
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
    odeo)
	echo "PROCEDURE $Sys_rep(VAR mtty : OutputVector;"
	echo "                       mttx : StateVector;"
	echo "                       mttu : InputVector;"
	echo "                       mttt : REAL;"
	echo "                       mttpar : ParameterVector);"
	;;
    cse)
	echo "PROCEDURE $Sys_rep(VAR mttdx: StateVector;"
	echo "                       mttx : StateVector;"
	echo "                       mttu : InputVector;"
	echo "                       mttt : REAL;"
	echo "                       mttpar : ParameterVector);"
	;;
    cseo)
	echo "PROCEDURE $Sys_rep(VAR mtty : OutputVector;"







|
|







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
    odeo)
	echo "PROCEDURE $Sys_rep(VAR mtty : OutputVector;"
	echo "                       mttx : StateVector;"
	echo "                       mttu : InputVector;"
	echo "                       mttt : REAL;"
	echo "                       mttpar : ParameterVector);"
	;;
    csex)
	echo "PROCEDURE $Sys_rep(VAR mttedx: StateVector;"
	echo "                       mttx : StateVector;"
	echo "                       mttu : InputVector;"
	echo "                       mttt : REAL;"
	echo "                       mttpar : ParameterVector);"
	;;
    cseo)
	echo "PROCEDURE $Sys_rep(VAR mtty : OutputVector;"
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
	echo "    glmpbynp     = StateMatrix;"
	## echo "    IntegrationMethod = 1..4;"
	echo ""
	echo "VAR"
	echo "    simpar                      : SimulationParameters;"
        echo "    t,ddt                       : REAL;"
	echo "    x,dx,AAx                    : StateVector;"

	echo "    u                           : InputVector;"
	echo "    y                           : OutputVector;"
	echo "    par                         : ParameterVector;"
	echo "    mttpar                      : ParameterVector;"
	echo "    mttnpar                     : INTEGER;"
	echo "    AA                          : StateMatrix;"
	echo "    MTTi,MTTj,it,iLast: INTEGER;"
	##echo "    mttSTEPFACTOR,mttWSTEPS,mttSTEPS,mttINPUT : INTEGER;"
	## echo "    mttMETHOD : IntegrationMethod;"
	echo "    open_switches  : StateVector;"
	echo "    numparfile, statefile, simparfile  : TEXT;"
	echo ""

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







>
|
|



|






>







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
	echo "    glmpbynp     = StateMatrix;"
	## echo "    IntegrationMethod = 1..4;"
	echo ""
	echo "VAR"
	echo "    simpar                      : SimulationParameters;"
        echo "    t,ddt                       : REAL;"
	echo "    x,dx,AAx                    : StateVector;"
	echo "    mttx,mttdx,mttAAx,mttedx    : StateVector;"
	echo "    u,mttu                      : InputVector;"
	echo "    y,mtty                      : OutputVector;"
	echo "    par                         : ParameterVector;"
	echo "    mttpar                      : ParameterVector;"
	echo "    mttnpar                     : INTEGER;"
	echo "    AA,mtte                     : StateMatrix;"
	echo "    MTTi,MTTj,it,iLast: INTEGER;"
	##echo "    mttSTEPFACTOR,mttWSTEPS,mttSTEPS,mttINPUT : INTEGER;"
	## echo "    mttMETHOD : IntegrationMethod;"
	echo "    open_switches  : StateVector;"
	echo "    numparfile, statefile, simparfile  : TEXT;"
	echo ""
        sympar_txt2declare $Sys p
        ;;
    switchopen)
	echo "PROCEDURE $Sys_rep(VAR open : StateVector; mttx : StateVector);"
	echo "VAR"
	echo "    MTTi,MTTj :  INTEGER;"
	;;
    *)	echo "PROCEDURE $Sys_rep;"
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
    if (kk==width){printf("\n"); kk=0}
  }
}
BEGIN{
  comment_regexp = "{"
  doing_header = 0
  doing_globals = 0
  No = 500;
  Ns = 10;
  inc ="$I"
}
{
  if ($1=="global") 
    doing_globals = 1
  else{ 
    if (doing_globals==1){







|
|







397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
    if (kk==width){printf("\n"); kk=0}
  }
}
BEGIN{
  comment_regexp = "{"
  doing_header = 0
  doing_globals = 0
  No = 1;
  Ns = 1;
  inc ="$I"
}
{
  if ($1=="global") 
    doing_globals = 1
  else{ 
    if (doing_globals==1){
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
          printf("{%s %s_input.p}\n",inc,Sys)

          if (Method=="euler") {
            printf("{%s %s_ode.p}\n",inc,Sys)
            printf("{%s %s_odeo.p}\n",inc,Sys)
          }
          if (Method=="implicit") {
            printf("{%s %s_cse.p}\n",inc,Sys)
            printf("{%s %s_cseo.p}\n",inc,Sys)
            printf("\n{%s %s_smxa.p}\n",inc,Sys);
            printf("\n{%s %s_smxax.p}\n",inc,Sys);
          }
          printf("{%s %s_switchopen.p}\n\n",inc,Sys)

          for (k=1;k<=j;k++) printf("%s\n", comment[k])
          printf("\n")
          printf("\nBEGIN{%s}\n", Sys_rep)
          printf("  open(statefile,\"%s_state.dat\");\n", Sys)
          printf("  open(simparfile,\"%s_simpar.dat\");\n", Sys)
          printf("  open(numparfile,\"%s_numpar.dat\");\n", Sys)
        }
        else{
          for (k=1;k<=j;k++) printf("%s\n", comment[k])
          printf("\n")
          printf("VAR \n");
          for (k=1;k<i;k++) printf("  %s,\n",global[k])
          printf("%s : REAL;\n", global[i])
          # printvar("x",Nx);
          # printvar("u",Nu);
          # printvar("y",Ny);
          printvar("_s",Ns);
          printvar("_o",No);

          printf("VAR mtt_i, mtt_j : INTEGER;\n");
          #if ( (rep=="smxa")||(rep=="smxax") ) {
          #  printvar("_t",Nt);
          #}







|



















|
|
|







438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
          printf("{%s %s_input.p}\n",inc,Sys)

          if (Method=="euler") {
            printf("{%s %s_ode.p}\n",inc,Sys)
            printf("{%s %s_odeo.p}\n",inc,Sys)
          }
          if (Method=="implicit") {
            printf("{%s %s_csex.p}\n",inc,Sys)
            printf("{%s %s_cseo.p}\n",inc,Sys)
            printf("\n{%s %s_smxa.p}\n",inc,Sys);
            printf("\n{%s %s_smxax.p}\n",inc,Sys);
          }
          printf("{%s %s_switchopen.p}\n\n",inc,Sys)

          for (k=1;k<=j;k++) printf("%s\n", comment[k])
          printf("\n")
          printf("\nBEGIN{%s}\n", Sys_rep)
          printf("  open(statefile,\"%s_state.dat\");\n", Sys)
          printf("  open(simparfile,\"%s_simpar.dat\");\n", Sys)
          printf("  open(numparfile,\"%s_numpar.dat\");\n", Sys)
        }
        else{
          for (k=1;k<=j;k++) printf("%s\n", comment[k])
          printf("\n")
          printf("VAR \n");
          for (k=1;k<i;k++) printf("  %s,\n",global[k])
          printf("%s : REAL;\n", global[i])
          printvar("x",Nx);
          printvar("u",Nu);
          printvar("y",Ny);
          printvar("_s",Ns);
          printvar("_o",No);

          printf("VAR mtt_i, mtt_j : INTEGER;\n");
          #if ( (rep=="smxa")||(rep=="smxax") ) {
          #  printvar("_t",Nt);
          #}


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