Skip to content

Interacting with Disconnect Maps

Every disconnect channel in the system BOM. Call new() to build the map and routing context, optionally assign() required hops, then resolve() to fill channel-map chains.


Columns

Columns are automatically generated when disconnect_map.new() is called. Additional columns are not supported and may result in an error when parsing.

Column Description
requirement user assign() step number for this disconnect-channel mapping
satisfaction resolve() assign() step number (always >= requirement when both set)

Commands:

Use the following functions by first importing the module in your script like this:

from harnice.lists import disconnect_map
then use as written.

disconnect_map.new()

Create disconnect channel rows on the disconnect map from the BOM.

Rebuilds system.disconnect_routing_context as one row per unique (from_channel_type, to_channel_type) pair within each merged_net, per disconnect, per directionality (1 / -1, or 0 if reversible), with an availables count of disconnect channels that obey that directionality. Does not route channels or fill channel-map chains (see resolve()).

disconnect_map.assign(to_from_channel_device_refdes, to_from_channel_id, intended_disconnect_refdes, intended_disconnect_channel_id=None, from_channel_is_close_to_disconnect_side=None, satisfaction=False)

Assign a mapped channel through a disconnect.

Looks up the mapped channel's from→to types and merged_net, finds the matching routing-context row(s), picks a free disconnect channel that obeys directionality, records the device↔disconnect mapping on the disconnect map, and decrements availables on the matching context row (never below 0).

By default writes requirement (user assign). With satisfaction=True (used by resolve), writes satisfaction instead.

Returns 0 on a real assignment, -1 if an imaginary disconnect-map row was appended because availables was already 0.

disconnect_map.resolve()

Complete disconnect routing for each mapped channel (channel-map order).

Uses the routing context (filtered to merged_net + from→to pair) to find the fewest disconnect channels that connect from_harness → optional ordered requirement waypoints → to_harness. Prefers paths with remaining availables; if none exist, allows availables == 0 (imaginaries).

Gap fills call assign(..., satisfaction=True). Existing requirement rows get a satisfaction stamp. Writes chain_of_connectors and chain_of_nets on each mapped channel-map row from the resulting path.