16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
## [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile)
## ###############################################################
## ## Version control history
## ###############################################################
## ## $Id$
## ## $Log$
## ## Revision 1.50 2003/03/13 15:18:39 gawthrop
## ## Now uses __ to delimit subsystems in names.
## ##
## ## Revision 1.49 2001/07/26 05:02:53 geraint
## ## Now writes cbg.fig when under-causal (again).
## ##
## ## Revision 1.48 2001/07/23 23:20:27 gawthrop
|
>
>
>
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
## [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile)
## ###############################################################
## ## Version control history
## ###############################################################
## ## $Id$
## ## $Log$
## ## Revision 1.51 2004/02/20 20:42:40 geraint
## ## Initialize Flipped.cons with [] instead of "".
## ##
## ## Revision 1.50 2003/03/13 15:18:39 gawthrop
## ## Now uses __ to delimit subsystems in names.
## ##
## ## Revision 1.49 2001/07/26 05:02:53 geraint
## ## Now writes cbg.fig when under-causal (again).
## ##
## ## Revision 1.48 2001/07/23 23:20:27 gawthrop
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
|
disp ("----");
i
name
port
port_bond_direction
port.connections
if (sign(port.connections)!=port_bond_direction(i)) # Direction different?
eval(["ABG.ports.",name,".connections = - port.connections;"]); # Flip direction at port
Flipped.ports=[Flipped.ports;name]; # Remember which port has been flipped
bond_index=abs(port.connections); # Index of bond on port
mtt_info(sprintf("Flip port %s on %s"\
,name,full_name),infofile); # And report
for [subsystem,name] = ABG.subsystems # and at the other end
|
>
>
>
>
>
>
|
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
|
disp ("----");
i
name
port
port_bond_direction
port.connections
if (i > max (size (port_bond_direction)))
the_system = sprintf ("\"%s:%s\"", system_type, system_name);
mtt_error (sprintf ("Please check that %s has no disconnected ports.", the_system));
mtt_error (sprintf ("abg2cbg: port_bond_direction(%d) does not exist.", i));
exit(1);
end
if (sign(port.connections)!=port_bond_direction(i)) # Direction different?
eval(["ABG.ports.",name,".connections = - port.connections;"]); # Flip direction at port
Flipped.ports=[Flipped.ports;name]; # Remember which port has been flipped
bond_index=abs(port.connections); # Index of bond on port
mtt_info(sprintf("Flip port %s on %s"\
,name,full_name),infofile); # And report
for [subsystem,name] = ABG.subsystems # and at the other end
|