Overview
Comment:Restyled by whitespace
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | github/restyled/deepsource-transform-1fe15620
Files: files | file ages | folders
SHA3-256: 5e152b1c6bc004ed50a0ffe1970150fcefbc6526965f18d19062f3e0b3c19906
User & Date: commits@restyled.io on 2021-04-16 07:13:11
Other Links: branch diff | manifest | tags
Context
2021-04-17
06:06:41
Merge pull request #18 from reduce-algebra/restyled/deepsource-transform-1fe15620

Restyle Format code with black, gofmt, yapf, autopep8, isort, standardrb, standardjs, prettier and rubocop Leaf check-in: 234bb2da05 user: trnsz@pobox.com tags: master, trunk

2021-04-16
07:13:11
Restyled by whitespace Leaf check-in: 5e152b1c6b user: commits@restyled.io tags: github/restyled/deepsource-transform-1fe15620, trunk
07:13:10
Restyled by prettier-markdown check-in: 3e06d47cb0 user: commits@restyled.io tags: github/restyled/deepsource-transform-1fe15620, trunk
Changes

Modified mtt/doc/mtt.html from [1a30bfd2d6] to [c4984a2298].

3521
3522
3523
3524
3525
3526
3527
3528

3529
3530
3531
3532
3533
3534
3535
3521
3522
3523
3524
3525
3526
3527

3528
3529
3530
3531
3532
3533
3534
3535







-
+







    <table>
      <tr>
        <td></td>
        <td class="example">
          <pre>
       mtt help representations
       mtt help components
       mtt help examples 
       mtt help examples
       mtt help crs
       mtt help representations &lt;match_string&gt;
       mtt help components &lt;match_string&gt;
       mtt help examples  &lt;match_string&gt;
       mtt help crs &lt;match_string&gt;
       mtt help &lt;component_or_example_or_CR_name&gt;
</pre
10562
10563
10564
10565
10566
10567
10568
10569

10570
10571
10572
10573
10574
10575
10576
10562
10563
10564
10565
10566
10567
10568

10569
10570
10571
10572
10573
10574
10575
10576







-
+







    </table>
    where n is an integer (unique within the label file). For example
    <table>
      <tr>
        <td></td>
        <td class="example">
          <pre>
%ALIAS  $a1  lin           
%ALIAS  $a1  lin
</pre
          >
        </td>
      </tr>
    </table>
    assigns the symbolic parameter to be lin. This parameter <code>$1</code> can
    then be used for passing a diofferent cr to the component (see section
10618
10619
10620
10621
10622
10623
10624
10625

10626
10627
10628
10629
10630
10631
10632
10618
10619
10620
10621
10622
10623
10624

10625
10626
10627
10628
10629
10630
10631
10632







-
+







    <!--docid::SEC96::-->
    <p>Component aliases are of the form</p>
    <table>
      <tr>
        <td></td>
        <td class="example">
          <pre>
%ALIAS Component_name   Component_location       
%ALIAS Component_name   Component_location
</pre
          >
        </td>
      </tr>
    </table>
    <p>An example appears in the following label file fragment</p>
    <table>
11853
11854
11855
11856
11857
11858
11859
11860

11861
11862
11863
11864
11865
11866
11867
11853
11854
11855
11856
11857
11858
11859

11860
11861
11862
11863
11864
11865
11866
11867







-
+







    <table>
      <tr>
        <td></td>
        <td class="example">
          <pre>
FOR ALL rho,g,vol,h,topt,bott,flowin,press
LET tktf2(rho,g,vol,h,topt,bott,effort,2,press,effort,1)
        = tank(rho,g,vol,h,topt,bott,press);      
        = tank(rho,g,vol,h,topt,bott,press);
</pre
          >
        </td>
      </tr>
    </table>
    Assuming that `tank' is not defined in a reduce file, MTT will leave it
    unresolved when generating m or c code.
11922
11923
11924
11925
11926
11927
11928
11929

11930
11931

11932
11933
11934
11935
11936
11937
11938
11922
11923
11924
11925
11926
11927
11928

11929
11930

11931
11932
11933
11934
11935
11936
11937
11938







-
+

-
+







        <td></td>
        <td class="example">
          <pre>
function p = tank (rho,g,vol,h,topt,bott,press)

  ## usage:  p = tank (vol,h,topt,bott,press)
  ##
  ## 
  ##

   val = press; zt = topt; zb = bott; 
   val = press; zt = topt; zb = bott;
   zval = 0.5*(abs(zb+(zt-zb)*val-h)+(zb+(zt-zb)*val-h));

   p = rho*g*zval + 0.5*(1+tanh((press-0.98)*500))*100000;

endfunction
</pre
          >
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996






11997
11998
11999
12000
12001
12002
12003
11984
11985
11986
11987
11988
11989
11990






11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003







-
-
-
-
-
-
+
+
+
+
+
+







    Following the example of the previous section, the unresolved CR `tank' can
    be expressed in c++ code. For example:
    <table>
      <tr>
        <td></td>
        <td class="example">
          <pre>
inline double tank(const double rho, 
                   const double g, 
                   const double vol, 
                   const double h, 
                   const double topt, 
                   const double bott, 
inline double tank(const double rho,
                   const double g,
                   const double vol,
                   const double h,
                   const double topt,
                   const double bott,
                   const double press)


  /*  ## usage:  p = tank (vol,h,topt,bott,press)
    ##
    ##
  */
14789
14790
14791
14792
14793
14794
14795
14796

14797
14798

14799
14800
14801
14802
14803
14804
14805
14789
14790
14791
14792
14793
14794
14795

14796
14797

14798
14799
14800
14801
14802
14803
14804
14805







-
+

-
+







    <table>
      <tr>
        <td></td>
        <td class="example">
          <pre>
# Makefile for the Two link GMV example

all: msdP_tf.m TwoLinkP_obs.m TwoLinkP_sm.m twolinkp_sm.m TwoLinkGMV_numpar.m 
all: msdP_tf.m TwoLinkP_obs.m TwoLinkP_sm.m twolinkp_sm.m TwoLinkGMV_numpar.m

msdP_tf.m: msdP_abg.fig 
msdP_tf.m: msdP_abg.fig
        mtt -q msdP tf m

TwoLinkP_obs.m: TwoLinkP_abg.fig TwoLinkP_lbl.txt
        mtt -q TwoLinkP obs m

TwoLinkP_sm.m: TwoLinkP_abg.fig TwoLinkP_lbl.txt
        mtt -q TwoLinkP sm m
16370
16371
16372
16373
16374
16375
16376
16377

16378
16379
16380
16381
16382
16383
16384
16370
16371
16372
16373
16374
16375
16376

16377
16378
16379
16380
16381
16382
16383
16384







-
+








B = 10

C = 1

D = 0

octave&gt; 
octave&gt;
</pre
          >
        </td>
      </tr>
    </table>
    generates the data structure rc corresponding the the bond graph of the
    system called `rc'. The following octave commands then generate the step
16815
16816
16817
16818
16819
16820
16821
16822

16823
16824
16825
16826
16827
16828
16829
16815
16816
16817
16818
16819
16820
16821

16822
16823
16824
16825
16826
16827
16828
16829







-
+







      installed, this may be done with the command
    </p>
    <table>
      <tr>
        <td></td>
        <td class="example">
          <pre>
  mtt sys sfun mexglx 
  mtt sys sfun mexglx
</pre
          >
        </td>
      </tr>
    </table>
    <p>
      which will generated the four .mex files and the .mdl file. In this case,


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