Overview
Comment:Removed some spurious debugging code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 8b1505aed5d8da7984c3ec5d10b0656f6a8201d7651e7f43d0ad92259cb9d9cc
User & Date: gawthrop@users.sourceforge.net on 1999-03-15 01:17:07
Other Links: branch diff | manifest | tags
Context
1999-03-15
05:53:33
Put in user-defined representations check-in: 4f7bc6c269 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
01:17:07
Removed some spurious debugging code check-in: 8b1505aed5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
01:09:15
Fixed bugs when Nx=0 (no state) check-in: 199d048e5c user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/make_ode2odes from [fa36d037f2] to [c4ac8a5bd5].

1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

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



## Revision 1.16  1999/03/06 02:28:38  peterg
## Rearranged evaluation to: state - input - output - write
##
## Revision 1.15  1999/03/06 02:19:43  peterg
## Changed args to _input
##
## Revision 1.14  1998/10/01 16:02:01  peterg











>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.17  1999/03/15 01:09:15  peterg
## Fixed bugs when Nx=0 (no state)
##
## Revision 1.16  1999/03/06 02:28:38  peterg
## Rearranged evaluation to: state - input - output - write
##
## Revision 1.15  1999/03/06 02:19:43  peterg
## Changed args to _input
##
## Revision 1.14  1998/10/01 16:02:01  peterg
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

if mttmethod==1			# Euler
  MTTddt = mttdt/mttstepfactor; # The small sample interval
endif;


for MTTit = 1:MTTilast		#Integration loop
MTTit
  if $Nx>0			# Don't if no states
    if mttmethod==1		# Euler
      for MTTjt = 1:mttstepfactor
	[MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative
	[MTTx] = mtt_euler(MTTx,MTTdx,MTTddt,$Nx); # Euler update
	[MTTx] = $1_switch(MTTx);	# Switches
	MTTt = MTTt + MTTddt;







|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

if mttmethod==1			# Euler
  MTTddt = mttdt/mttstepfactor; # The small sample interval
endif;


for MTTit = 1:MTTilast		#Integration loop

  if $Nx>0			# Don't if no states
    if mttmethod==1		# Euler
      for MTTjt = 1:mttstepfactor
	[MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative
	[MTTx] = mtt_euler(MTTx,MTTdx,MTTddt,$Nx); # Euler update
	[MTTx] = $1_switch(MTTx);	# Switches
	MTTt = MTTt + MTTddt;
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
      [MTTx] = $1_switch(MTTx);	# Switches
      MTTt = MTTt + mttdt;
    endif;
    else
      MTTt = MTTt + mttdt;
  endif;			# $Nx>0

MTTit
  [MTTy] = $1_odeo(MTTx,MTTu,MTTt);     # Output 
  [MTTu] = $1_input(MTTt,MTTx,MTTy);	# Input
  mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny);    # Write it out
endfor;				# Integration loop

EOF











<










128
129
130
131
132
133
134

135
136
137
138
139
140
141
142
143
144
      [MTTx] = $1_switch(MTTx);	# Switches
      MTTt = MTTt + mttdt;
    endif;
    else
      MTTt = MTTt + mttdt;
  endif;			# $Nx>0


  [MTTy] = $1_odeo(MTTx,MTTu,MTTt);     # Output 
  [MTTu] = $1_input(MTTt,MTTx,MTTy);	# Input
  mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny);    # Write it out
endfor;				# Integration loop

EOF





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