︙ | | | ︙ | |
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
|
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.35 2001/06/13 10:39:51 gawthrop
## Zeros output matices in csex and cseo just in case some elements are
## actually zero and not set in code. Works for m and oct.
##
## Revision 1.34 2001/05/26 18:36:43 gawthrop
## Further modifications. Now works on rcPPP
## -- next jobs:
## add identification to ppp_nlin_sim
## create real-time ppp_nlin_run
##
## Revision 1.33 2001/05/26 15:46:38 gawthrop
## Updated to account for new nonlinear ppp
##
## Revision 1.32 2001/05/24 07:42:12 gawthrop
## Included and updated the missing tf_r2m
##
## Revision 1.31 2001/04/03 14:49:42 gawthrop
## Revised to incorporate new ssim (sensitivity simulation)
## representation (m only just now).
##
## Revision 1.30 2001/03/30 15:13:58 gawthrop
## Rationalised simulation modes to each return mtt_data
##
|
>
>
>
>
>
>
>
>
>
>
>
|
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
|
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.36 2001/07/12 04:00:51 gawthrop
## Now zeros y correctly - ie Ny NOT Nx elements
##
## Revision 1.35 2001/06/13 10:39:51 gawthrop
## Zeros output matices in csex and cseo just in case some elements are
## actually zero and not set in code. Works for m and oct.
##
## Revision 1.34 2001/05/26 18:36:43 gawthrop
## Further modifications. Now works on rcPPP
## -- next jobs:
## add identification to ppp_nlin_sim
## create real-time ppp_nlin_run
##
## Revision 1.33 2001/05/26 15:46:38 gawthrop
## Updated to account for new nonlinear ppp
##
## Revision 1.32 2001/05/24 07:42:12 gawthrop
## Included and updated the missing tf_r2m
##
## Revision 1.31.2.2 2001/07/02 00:34:56 geraint
## gcc-3.0 compatibility.
##
## Revision 1.31.2.1 2001/05/04 04:07:24 geraint
## Numerical solution of algebraic equations.
## sys_ae.cc written for unsolved inputs.
## Solution of equations using hybrd from MINPACK (as used by Octave fsolve).
##
## Revision 1.31 2001/04/03 14:49:42 gawthrop
## Revised to incorporate new ssim (sensitivity simulation)
## representation (m only just now).
##
## Revision 1.30 2001/03/30 15:13:58 gawthrop
## Rationalised simulation modes to each return mtt_data
##
|
︙ | | | ︙ | |
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
# Representation-specific stuff
eqnargs='mttx,mttu,mttt,mttpar'
inputeqnargs='mttx,mtty,mttt,mttpar'
case $rep in
cse)
states=yes;
inputs=yes;
parameters=yes;
output='mttdx,mtte'
args=$eqnargs
;;
|
>
>
>
>
>
>
>
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
# Representation-specific stuff
eqnargs='mttx,mttu,mttt,mttpar'
inputeqnargs='mttx,mtty,mttt,mttpar'
case $rep in
ae)
states=yes;
inputs=yes;
parameters=yes;
output=mttyz;
args=$eqnargs;
;;
cse)
states=yes;
inputs=yes;
parameters=yes;
output='mttdx,mtte'
args=$eqnargs
;;
|
︙ | | | ︙ | |
223
224
225
226
227
228
229
230
231
232
233
234
235
236
|
states=no;
parameters=no;
declareinputs=no;
else
states=yes;
parameters=yes;
declareinputs=yes
fi
;;
logic)
states=no;
inputs=no;
parameters=yes;
output=mttopen
|
>
|
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
states=no;
parameters=no;
declareinputs=no;
else
states=yes;
parameters=yes;
declareinputs=yes
declarestates=yes
fi
;;
logic)
states=no;
inputs=no;
parameters=yes;
output=mttopen
|
︙ | | | ︙ | |
519
520
521
522
523
524
525
526
527
528
529
530
531
532
|
$Lc Inputs $Rc
EOF
N=`n2m 1 $Nu`
for i in $N; do
echo $constant_declaration 'mttu'$i' = mttu('$i$minusone');'
done
fi
if [ "$declareinputs" = "yes" ]; then
declare_vars input
fi
if [ "$declaredummies" = "yes" ]; then
|
>
>
>
>
>
>
>
>
>
|
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
|
$Lc Inputs $Rc
EOF
N=`n2m 1 $Nu`
for i in $N; do
echo $constant_declaration 'mttu'$i' = mttu('$i$minusone');'
done
cat <<EOF
$Lc Unknown Inputs $Rc
EOF
Ni=`n2m 1 $Nyz`
for i in $Ni; do
echo $constant_declaration 'mttui'$i' = mttu('$Nu+$i$minusone');'
done
fi
if [ "$declareinputs" = "yes" ]; then
declare_vars input
fi
if [ "$declaredummies" = "yes" ]; then
|
︙ | | | ︙ | |
574
575
576
577
578
579
580
581
582
583
584
585
586
587
|
arg_type="Octave_map"
arg_size="";
;;
mttu)
arg_type="ColumnVector"
arg_size="(MTTNU)"
;;
mtty)
arg_type="ColumnVector"
arg_size="(MTTNY)"
;;
mttt)
arg_type="const double"
arg_size=""
|
>
>
>
>
|
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
|
arg_type="Octave_map"
arg_size="";
;;
mttu)
arg_type="ColumnVector"
arg_size="(MTTNU)"
;;
mttyz)
arg_type="ColumnVector"
arg_size="(MTTNYZ)"
;;
mtty)
arg_type="ColumnVector"
arg_size="(MTTNY)"
;;
mttt)
arg_type="const double"
arg_size=""
|
︙ | | | ︙ | |
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
|
#include <math.h>
#include "useful-functions.hh"
#include "${system}_cr.h"
#include "${system}_def.h"
#include "${system}_sympar.h"
DEFUN_DLD (${system}_${rep}, args, ,
"Usage: [$output] = ${system}_${rep}($args)
Octave ${rep} representation of system ${system}
Generated by MTT on `date`")
{
octave_value_list retval;
#endif // ! STANDALONE
EOF
}
|
|
<
<
|
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
|
#include <math.h>
#include "useful-functions.hh"
#include "${system}_cr.h"
#include "${system}_def.h"
#include "${system}_sympar.h"
DEFUN_DLD (${system}_${rep}, args, ,
"Usage: [$output] = ${system}_${rep}($args)\nOctave ${rep} representation of system ${system}\nGenerated by MTT on `date`")
{
octave_value_list retval;
#endif // ! STANDALONE
EOF
}
|
︙ | | | ︙ | |