Overview
Comment: | Octave script to generate a connections structure which describes the component names at the head and tail of each bond of a (possibly vector-expanded) system. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
244dd050e3be7f97e0a12c4e07d2c54f |
User & Date: | geraint@users.sourceforge.net on 2004-08-26 00:03:46 |
Other Links: | branch diff | manifest | tags |
Context
2004-08-26
| ||
00:05:09 | Creates _connections.dat. Records component names at the end of each (possibly vector-expanded) bond. check-in: ad0591cdc4 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
00:03:46 | Octave script to generate a connections structure which describes the component names at the head and tail of each bond of a (possibly vector-expanded) system. check-in: 244dd050e3 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2004-08-25
| ||
20:16:41 | Added --dia_output_file to usage. check-in: f75ef2b760 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/m/abg2connections.m version [83377ee03d].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | ## -*-octave-*- put Emacs into Octave mode ## ## ###################################### ## ##### Model Transformation Tools ##### ## ###################################### ## ## abg2connections_m ## ## Creates a cell array recording the name of the ## component at each end of every bond. ## ## This data may differ from ibg.m because of the ## expansion of vector bonds that takes place ## during the generation of abg.m function connections = abg2connections (abg) substructures = {"ports", "subsystems"}; for i = [1,2] substruct = substructures{i}; if (isfield (abg, substruct)) for [val, key] = eval (sprintf ("abg.%s", substruct)) for bond_id = val.connections if (bond_id > 0) connections.head {+bond_id} = key else connections.tail {-bond_id} = key endif endfor endfor endif endfor endfunction |