<commit_before>"""
Use line resistance to estimate line length.

In:

* `S_base` [VA], System base VA
* `V_base` [V], Base voltage
* `R_pu` [pu], Line resistance
* `R_cond` [ohms/m], Conductor resistance
* `bundle` [-], Number of conductors per phase

Out: `length` [m], Line length

2015-08-11.
Ported from .m file provided by <NAME>.
Original code by <NAME>.
"""
function estimate_length(S_base, V_base, R_pu, R_cond, bundle)
    R_base = V_base^2/S_base
    R_ohms = R_pu*R_base
    push!(length, R_ohms/(R_pu/bundle))
    # Ensure length estimate is positive
    default = 1e-4*1609.3
    length <= 0 && (length = default)
    return length
end
<commit_msg>Change "length" to "line_length" to avoid function name conflict.<commit_after>"""
Use line resistance to estimate line length.

In:

* `S_base` [VA], System base VA
* `V_base` [V], Base voltage
* `R_pu` [pu], Line resistance
* `R_cond` [ohms/m], Conductor resistance
* `bundle` [-], Number of conductors per phase

Out: `length` [m], Line length

2015-08-11.
Ported from .m file provided by <NAME>.
Original code by <NAME>.
"""
function estimate_length(S_base, V_base, R_pu, R_cond, bundle)
    R_base = V_base^2/S_base
    R_ohms = R_pu*R_base
    line_length = R_ohms/(R_pu/bundle)
    # Ensure length estimate is positive
    default = 1e-4*1609.3
    line_length <= 0 && (line_length = default)
    return line_length
end

{'fraction_non_alphanumeric': 0.13112391930835735, 'fraction_numerical': 0.024495677233429394, 'mean_word_length': 3.9430604982206408, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2702621', 'n_tokens_mistral': 519, 'n_tokens_neox': 498, 'n_words': 158}