Differences From Artifact [5d3130fe45]:

To Artifact [9b3dd18d71]:


9
10
11
12
13
14
15



16
17
18
19
20
21
22
# Acausal bond graph to causal bond graph: mfile format

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



## Revision 1.12  2001/05/08 15:18:10  gawthrop
## Added trig and hyperbolic functions to argument exclusion list
##
## Revision 1.11  2000/09/19 11:14:30  peterg
## Now writes the first component type header correctely
##
## Revision 1.10  2000/01/26 10:11:10  peterg







>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Acausal bond graph to causal bond graph: mfile format

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.13  2001/06/04 08:13:37  gawthrop
## Various changes to support PPP
##
## Revision 1.12  2001/05/08 15:18:10  gawthrop
## Added trig and hyperbolic functions to argument exclusion list
##
## Revision 1.11  2000/09/19 11:14:30  peterg
## Now writes the first component type header correctely
##
## Revision 1.10  2000/01/26 10:11:10  peterg
154
155
156
157
158
159
160




161
162
163
164
165












166
167
168
169
170
171
172
173
    cr["TF"] = "lin";  arg["TF"]  = sprintf("flow,%s%s", $2, s_arg);
    cr["GY"] = "lin";  arg["GY"]  = sprintf("flow,%s%s", $2, s_arg);

    cr["AE"] = "lin";  arg["AE"]  = sprintf("%s%s", $2, s_arg);
    cr["AF"] = "lin";  arg["AF"]  = sprintf("%s%s", $2, s_arg);

    cr["CDx"] = "lin";  arg["CDx"]  = sprintf("%s%s", $2, s_arg);





  ## Heading
  if (Component !~ OldComponent) print "\n% Component type", Component

  ## Component












    print  "\t" $2 "\t" cr[Component] "\t\t" arg[Component];
    OldComponent=Component;
  }
  END{
    print "\n% Port aliases" >> "mtt_junk_alias.txt";
    for (k=1;k<=j;k++){
      if (port_alias[k] ~ "\\["){ # Only do ports
        port_name = substr(port_alias[k],2,length(port_alias[k])-2);







>
>
>
>





>
>
>
>
>
>
>
>
>
>
>
>
|







157
158
159
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
    cr["TF"] = "lin";  arg["TF"]  = sprintf("flow,%s%s", $2, s_arg);
    cr["GY"] = "lin";  arg["GY"]  = sprintf("flow,%s%s", $2, s_arg);

    cr["AE"] = "lin";  arg["AE"]  = sprintf("%s%s", $2, s_arg);
    cr["AF"] = "lin";  arg["AF"]  = sprintf("%s%s", $2, s_arg);

    cr["CDx"] = "lin";  arg["CDx"]  = sprintf("%s%s", $2, s_arg);


    cr["RS"] = lin;  arg["RS"]  = sprintf("flow,%s%s", $2, s_arg);


  ## Heading
  if (Component !~ OldComponent) print "\n% Component type", Component

  ## Component
    printf("\t%s\t", Component);
    if (Component in cr)
      printf("%s\t\t", cr[Component])
    else 
      printf("none\t\t");

   if (Component in arg)
      printf("%s\t\t\n", arg[Component])
    else {
	print "lbl2args_txt2out", Component | "/bin/sh"; close("/bin/sh")
    }

    ##print  "\t" $2 "\t" cr[Component] "\t\t" arg[Component];
    OldComponent=Component;
  }
  END{
    print "\n% Port aliases" >> "mtt_junk_alias.txt";
    for (k=1;k<=j;k++){
      if (port_alias[k] ~ "\\["){ # Only do ports
        port_name = substr(port_alias[k],2,length(port_alias[k])-2);

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