Skip to content
Edit this page

ictdesigntools.pathways.tray

Cable tray fill for communications (control and signal) cables.

Two rule sets can be selected:

  • nec: NEC 392.22(A) for multiconductor control and/or signal cables only. The sum of the cable cross-sectional areas may not exceed 50% of the tray's interior cross-section for ladder and ventilated trays, or 40% for solid-bottom trays. Wire mesh (basket) trays are open-bottomed and are given the 50% limit here; the code text names ladder and ventilated trough trays, so the UI says to confirm this with the authority having jurisdiction. A depth of 6 in is used for the area when the tray's usable depth is greater than 6 in.
  • tia: TIA-569 / BICSI design practice, as described in secondary sources: a 50% maximum fill, a 25% target for the initial installation (so cables can be added later), and the same 6 in depth limit. Published figures vary between sources and editions (some give 40% as the ceiling), so the limits live in one place here and the UI says to verify them.

NEC Table 392.22(A), the power-cable fill table, is deliberately not included.

Dimensions are in mm, areas in mm² and loads in kg per metre of tray. Tray sizes and load ratings are published in inches and lb/ft, and are converted exactly when this module loads.

The cable load is the sum of the cable weights per metre of tray, compared with the tray's working load at the support span it is built to. A working load is given as a NEMA VE 1 load/span class (12B: 75 lb/ft at a 12 ft span), as a manufacturer's rating at the span it was published for, or taken as a typical value for the tray type. A rating applies at its own span or any shorter one (no credit is taken for shorter spans, which a manufacturer's table may give). At a longer span it is reduced by the square of the spans, as the bending load of a uniformly loaded span grows with the span squared, and flagged for confirmation with the manufacturer. Published working loads already include the 1.5 safety factor and are cable loads; the tray's own weight, when given, is added only to the load on each support.

LoadClass dataclass

LoadClass(name: str, span_m: float, load_kg_per_m: float)

A NEMA VE 1 load/span class: the working load at the span, published in lb/ft and ft.

LoadInput dataclass

LoadInput(
    span_m: float = DEFAULT_SPAN_M,
    load_class: str | None = None,
    rating_kg_per_m: float | None = None,
    rating_span_m: float | None = None,
    tray_weight_kg_per_m: float | None = None,
)

How the tray is supported and rated. Give load_class, or rating_kg_per_m at rating_span_m (a manufacturer's working load; the support span when not given), or neither for the tray type's typical rating.

TrayFillResult dataclass

TrayFillResult(
    standard_slug: str,
    standard_label: str,
    reference: str,
    tray_slug: str,
    tray_label: str,
    width_mm: float,
    depth_mm: float,
    calc_depth_mm: float,
    tray_area_mm2: float,
    lines: list[CableLine],
    lanes: list[Compartment],
    lane_widths_mm: list[float],
    unused_width_mm: float,
    total_count: int,
    total_area_mm2: float,
    fill_pct: float,
    limit_pct: float,
    target_pct: float | None,
    passes: bool,
    within_target: bool | None,
    max_area_mm2: float,
    remaining_area_mm2: float,
    min_width_mm: float | None,
    cable_weight_kg_per_m: float,
    unweighted_count: int,
    load_rating_kg_per_m: float,
    load_basis: str,
    pull: PullSummary | None = None,
    span_m: float = DEFAULT_SPAN_M,
    load_class: str | None = None,
    published_load_kg_per_m: float = 0.0,
    rated_span_m: float = DEFAULT_SPAN_M,
    tray_weight_kg_per_m: float | None = None,
)

load_extrapolated property

load_extrapolated: bool

The support span is longer than the rating's: reduced, and to be confirmed.

support_load_kg property

support_load_kg: float

Load on each support: the cables and, when given, the tray over one span.

subdivided property

subdivided: bool

True when the tray is split into lanes (or part of it is left unused).

rating_at_span

rating_at_span(
    load_kg_per_m: float, rated_span_m: float, span_m: float
) -> float

A working load published at rated_span_m, at the support span span_m.

Source code in src/ictdesigntools/pathways/tray.py
def rating_at_span(load_kg_per_m: float, rated_span_m: float, span_m: float) -> float:
    """A working load published at ``rated_span_m``, at the support span ``span_m``."""
    if span_m <= rated_span_m + 1e-9:
        return load_kg_per_m
    return load_kg_per_m * (rated_span_m / span_m) ** 2

resolve_lane_widths

resolve_lane_widths(
    lanes: Sequence[LaneInput], tray_width_mm: float
) -> tuple[list[float], float]

Width of each lane, and the tray width left unused (mm).

Source code in src/ictdesigntools/pathways/tray.py
def resolve_lane_widths(lanes: Sequence[LaneInput],
                        tray_width_mm: float) -> tuple[list[float], float]:  # fmt: skip
    """Width of each lane, and the tray width left unused (mm)."""
    for lane in lanes:
        if lane.width_mm is not None and not (
            math.isfinite(lane.width_mm) and lane.width_mm >= MIN_LANE_WIDTH_MM - 1e-9
        ):
            raise FillError(f"A lane must be at least {MIN_LANE_WIDTH_MM:g} mm wide.")
    fixed = sum(lane.width_mm for lane in lanes if lane.width_mm is not None)
    open_lanes = sum(1 for lane in lanes if lane.width_mm is None)
    if open_lanes > 1:
        raise FillError("Only one lane can take the remaining width; give the others a width.")
    if fixed > tray_width_mm + 1e-9:
        raise FillError(
            f"The lanes add up to {fixed:g} mm, which is wider than the {tray_width_mm:g} mm tray."
        )
    if open_lanes:
        leftover = tray_width_mm - fixed
        if leftover < MIN_LANE_WIDTH_MM - 1e-9:
            raise FillError(
                f"The other lanes leave only {max(leftover, 0):g} mm for the remaining lane "
                f"(at least {MIN_LANE_WIDTH_MM:g} mm is needed)."
            )
        return [leftover if lane.width_mm is None else lane.width_mm for lane in lanes], 0.0
    return [lane.width_mm for lane in lanes], tray_width_mm - fixed  # type: ignore[misc]

calculate_lanes

calculate_lanes(
    standard_slug: str,
    tray_slug: str,
    width_mm: float,
    depth_mm: float,
    lanes: Sequence[LaneInput],
    load_kg_per_m: float | None = None,
    run: Run | None = None,
    load: LoadInput | None = None,
) -> TrayFillResult

Fill, cable load against the working load at the support span (load), and, when run (the tray route) is given, the pull of each lane's cables along it. load_kg_per_m is short for a working load at the support span.

Source code in src/ictdesigntools/pathways/tray.py
def calculate_lanes(
    standard_slug: str,
    tray_slug: str,
    width_mm: float,
    depth_mm: float,
    lanes: Sequence[LaneInput],
    load_kg_per_m: float | None = None,
    run: pulling.Run | None = None,
    load: LoadInput | None = None,
) -> TrayFillResult:
    """Fill, cable load against the working load at the support span (``load``), and, when
    ``run`` (the tray route) is given, the pull of each lane's cables along it.
    ``load_kg_per_m`` is short for a working load at the support span."""
    standard = STANDARDS.get(standard_slug)
    if standard is None:
        raise FillError(f"“{standard_slug}” is not a supported standard (use nec or tia).")
    tray = TRAY_TYPES.get(tray_slug)
    if tray is None:
        raise FillError(f"“{tray_slug}” is not a supported tray type.")
    if not (math.isfinite(width_mm) and 0 < width_mm <= MAX_TRAY_WIDTH_MM + 1e-9):
        raise FillError(f"The tray width must be more than 0 and at most {MAX_TRAY_WIDTH_MM:g} mm.")
    if not (math.isfinite(depth_mm) and 0 < depth_mm <= MAX_TRAY_DEPTH_MM + 1e-9):
        raise FillError(f"The tray depth must be more than 0 and at most {MAX_TRAY_DEPTH_MM:g} mm.")
    if load_kg_per_m is not None:
        if load is not None:
            raise FillError("Give the working load in `load`, not as well as load_kg_per_m.")
        load = LoadInput(rating_kg_per_m=load_kg_per_m)
    load = load or LoadInput()
    published, rated_span, basis, load_class = _rating(tray, load)
    if not lanes:
        raise FillError("Add at least one lane.")
    if len(lanes) > MAX_LANES:
        raise FillError(f"Use at most {MAX_LANES} lanes.")
    if not any(lane.lines for lane in lanes):
        raise FillError("Add at least one cable.")

    limit = standard.max_fraction(tray_slug)
    widths, unused = resolve_lane_widths(lanes, width_mm)
    calc_depth = min(depth_mm, DEPTH_CAP_MM)
    target = standard.target * 100 if standard.target else None
    compartments = [
        Compartment(
            label=lane.name or f"Lane {i}",
            lines=list(lane.lines),
            container_area_mm2=w * calc_depth,
            limit_pct=limit * 100,
            target_pct=target,
            kind="lane",
            inner_mm=w,
            remaining_width=lane.width_mm is None and len(lanes) > 1,
        )
        for i, (lane, w) in enumerate(zip(lanes, widths, strict=True), 1)
    ]
    merged, _ = merge_lines([c.lines for c in compartments])
    cable_area = sum(line.area_total_mm2 for line in merged)
    area = sum(c.container_area_mm2 for c in compartments)
    fill = cable_area / area

    min_width = None
    if len(lanes) == 1 and unused == 0:
        for candidate in TRAY_WIDTHS_MM:
            if cable_area / _area(candidate, depth_mm) <= limit + 1e-9:
                min_width = candidate
                break

    pulls = None
    if run is not None:
        groups = [(c.label, c.lines) for c in compartments if c.lines]
        pulls = pulling.PullSummary(run, [pulling.pull(label, ls, None, run)
                                          for label, ls in groups])  # fmt: skip
    return TrayFillResult(
        standard_slug=standard_slug,
        standard_label=standard.label,
        reference=standard.reference,
        tray_slug=tray_slug,
        tray_label=tray.label,
        width_mm=width_mm,
        depth_mm=depth_mm,
        calc_depth_mm=calc_depth,
        tray_area_mm2=area,
        lines=merged,
        lanes=compartments,
        lane_widths_mm=widths,
        unused_width_mm=unused,
        total_count=sum(line.count for line in merged),
        total_area_mm2=cable_area,
        fill_pct=fill * 100,
        limit_pct=limit * 100,
        target_pct=target,
        passes=all(c.passes for c in compartments),
        within_target=(all(c.within_target for c in compartments) if standard.target else None),
        max_area_mm2=area * limit,
        remaining_area_mm2=area * limit - cable_area,
        min_width_mm=min_width,
        cable_weight_kg_per_m=sum(line.weight_total_kg_per_m or 0.0 for line in merged),
        unweighted_count=sum(line.count for line in merged if line.weight_kg_per_m is None),
        load_rating_kg_per_m=rating_at_span(published, rated_span, load.span_m),
        load_basis=basis,
        pull=pulls,
        span_m=load.span_m,
        load_class=load_class,
        published_load_kg_per_m=published,
        rated_span_m=rated_span,
        tray_weight_kg_per_m=load.tray_weight_kg_per_m,
    )

calculate

calculate(
    standard_slug: str,
    tray_slug: str,
    width_mm: float,
    depth_mm: float,
    lines: Sequence[CableLine],
    load_kg_per_m: float | None = None,
    run: Run | None = None,
    load: LoadInput | None = None,
) -> TrayFillResult

Fill for the whole tray as a single lane.

Source code in src/ictdesigntools/pathways/tray.py
def calculate(
    standard_slug: str,
    tray_slug: str,
    width_mm: float,
    depth_mm: float,
    lines: Sequence[CableLine],
    load_kg_per_m: float | None = None,
    run: pulling.Run | None = None,
    load: LoadInput | None = None,
) -> TrayFillResult:
    """Fill for the whole tray as a single lane."""
    return calculate_lanes(standard_slug, tray_slug, width_mm, depth_mm,
                           [LaneInput(None, list(lines))], load_kg_per_m, run, load)  # fmt: skip