Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: f0381565ae760e578b5f26eba36299ad873fa92c5e2b13d45d756bc3fc00b320
User & Date: gawthrop@users.sourceforge.net on 1996-08-11 08:48:07
Other Links: branch diff | manifest | tags
Context
1996-08-11
09:32:12
Now takes the numpar parameters correctly check-in: 687a53f59f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:48:07
Initial revision check-in: f0381565ae user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1996-08-10
14:16:04
Now has T vector input - it was tmax & tstep check-in: 555890dc62 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/sympar2numpar_r2m version [c5ec703796].









































































1
2
3
4
5
6
7
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#! /bin/sh

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

# Bourne shell script: mknumpar
# Creates the deafault numerical parameters file for the system

# Copyright (c) P.J.Gawthrop 1996

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

# Inform user
echo Creating $1_numpar.m
echo Creating $1_parconv.m

# Remove the old log file
rm -f mknumpar.log

# Use reduce to accomplish the transformation
reduce >mknumpar.log << EOF

%Set up the number of argument variables to zero in case the user has forgotten
MTTNVar := 0;

%Read the symbolic parameters file
IN "$1_sympar.r";

OUT "$1_numpar.m";

write "function numpar = $1_numpar;";

IF MTTNvar>0 THEN
BEGIN
  FOR i := 1:MTTNvar DO
  BEGIN
    write "numpar(",i , ") = 1;		% ", MTTVar(i,1);
  END;
END;

SHUT "$1_numpar.m";

OUT "$1_parconv.m";

write "[ ...";

IF MTTNvar>0 THEN
BEGIN
  FOR i := 1:MTTNvar DO
  BEGIN
    write MTTVar(i,1), ", ...";
  END;
END;

write "] = $1_parconv(numpar);";

IF MTTNvar>0 THEN
BEGIN
  FOR i := 1:MTTNvar DO
  BEGIN
    write MTTVar(i,1), " = numpar(", i, ");";
  END;
END;

SHUT "$1_parconv.m";


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