Overview
Comment:zero_vector --> zero_state.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 9a4649bbe9ac6f1eca60c11074f74fe2555dac92e0acdeec29a4e60540656a81
User & Date: gawthrop@users.sourceforge.net on 1999-08-02 12:44:21
Other Links: branch diff | manifest | tags
Context
1999-08-02
12:52:12
Removed redundant .p copying. check-in: 2978f3a691 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:44:21
zero_vector --> zero_state. check-in: 9a4649bbe9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1999-07-29
05:18:59
Initial revision check-in: 2fe74103ba user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/switch_txt2m from [5e93b0c2d2] to [06a98cb492].

12
13
14
15
16
17
18




19
20
21
22
23
24
25


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




## Revision 1.7  1999/04/02 06:30:37  peterg
## New _switchopen
## Removed switcha
##
## Revision 1.6  1998/10/01 18:20:50  peterg
## Split up the three if conditions on the switch and state value into
## three separate ifs. This is because p2c seems to generate incorrect







>
>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.8  1999/04/20 00:55:40  peterg
## Changed <= to < in switchopen.m
## Removed switch.m generation - redundant
##
## Revision 1.7  1999/04/02 06:30:37  peterg
## New _switchopen
## Removed switcha
##
## Revision 1.6  1998/10/01 18:20:50  peterg
## Split up the three if conditions on the switch and state value into
## three separate ifs. This is because p2c seems to generate incorrect
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#Write some file headers
lang_header $1 switchopen m 'mttx' '[open]' > $1_switchopen.m

# Set states to zero
awk '{
  if ($1=="#"){
    printf("#== open - boolean vector of open switches ==#\n")
    printf("[open] = zero_vector(%i); # Default to not open\n", Nx);
    
  }
  else{
  printf("\n#== Switch: %s ==#\n",$1)
  printf("if (%s==0.0) \n", $1);
  printf("  open(%s) = 1;\n", $2);
  printf("end;\n");







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#Write some file headers
lang_header $1 switchopen m 'mttx' '[open]' > $1_switchopen.m

# Set states to zero
awk '{
  if ($1=="#"){
    printf("#== open - boolean vector of open switches ==#\n")
    printf("[open] = zero_state(%i); # Default to not open\n", Nx);
    
  }
  else{
  printf("\n#== Switch: %s ==#\n",$1)
  printf("if (%s==0.0) \n", $1);
  printf("  open(%s) = 1;\n", $2);
  printf("end;\n");


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