feat: Add new 1x1200/35 product configuration to data files and datasheets, including scripts to manage its technical and ampacity values.
All checks were successful
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Successful in 7s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Successful in 1m37s
Build & Deploy KLZ Cables / 🏗️ Build Gatekeeper (push) Successful in 21s
Build & Deploy KLZ Cables / 🏗️ Build App (push) Successful in 4m7s
Build & Deploy KLZ Cables / 🚀 Deploy (push) Successful in 44s
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Successful in 1m18s
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 2s
All checks were successful
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Successful in 7s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Successful in 1m37s
Build & Deploy KLZ Cables / 🏗️ Build Gatekeeper (push) Successful in 21s
Build & Deploy KLZ Cables / 🏗️ Build App (push) Successful in 4m7s
Build & Deploy KLZ Cables / 🚀 Deploy (push) Successful in 44s
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Successful in 1m18s
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 2s
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -398,6 +398,24 @@ locale: de
|
|||||||
"55",
|
"55",
|
||||||
"4195"
|
"4195"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configuration": "1x1200/35",
|
||||||
|
"cells": [
|
||||||
|
"Al",
|
||||||
|
"RM",
|
||||||
|
"0,95",
|
||||||
|
"48,5",
|
||||||
|
"0,0247",
|
||||||
|
"3,4",
|
||||||
|
"Auf Anfrage",
|
||||||
|
"Auf Anfrage",
|
||||||
|
"113",
|
||||||
|
"2,4",
|
||||||
|
"885",
|
||||||
|
"59",
|
||||||
|
"4800"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -737,6 +755,24 @@ locale: de
|
|||||||
"60",
|
"60",
|
||||||
"4634"
|
"4634"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configuration": "1x1200/35",
|
||||||
|
"cells": [
|
||||||
|
"Al",
|
||||||
|
"RM",
|
||||||
|
"1,05",
|
||||||
|
"52,3",
|
||||||
|
"0,0247",
|
||||||
|
"5,5",
|
||||||
|
"Auf Anfrage",
|
||||||
|
"Auf Anfrage",
|
||||||
|
"113",
|
||||||
|
"2,4",
|
||||||
|
"990",
|
||||||
|
"66",
|
||||||
|
"5200"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1076,6 +1112,24 @@ locale: de
|
|||||||
"65",
|
"65",
|
||||||
"5093"
|
"5093"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configuration": "1x1200/35",
|
||||||
|
"cells": [
|
||||||
|
"Al",
|
||||||
|
"RM",
|
||||||
|
"1,15",
|
||||||
|
"57,5",
|
||||||
|
"0,0247",
|
||||||
|
"8,0",
|
||||||
|
"Auf Anfrage",
|
||||||
|
"Auf Anfrage",
|
||||||
|
"113",
|
||||||
|
"2,4",
|
||||||
|
"1065",
|
||||||
|
"71",
|
||||||
|
"5900"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -398,6 +398,24 @@ locale: en
|
|||||||
"55",
|
"55",
|
||||||
"4195"
|
"4195"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configuration": "1x1200/35",
|
||||||
|
"cells": [
|
||||||
|
"Al",
|
||||||
|
"RM",
|
||||||
|
"0.95",
|
||||||
|
"48.5",
|
||||||
|
"0.0247",
|
||||||
|
"3.4",
|
||||||
|
"On Request",
|
||||||
|
"On Request",
|
||||||
|
"113",
|
||||||
|
"2.4",
|
||||||
|
"885",
|
||||||
|
"59",
|
||||||
|
"4800"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -737,6 +755,24 @@ locale: en
|
|||||||
"60",
|
"60",
|
||||||
"4634"
|
"4634"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configuration": "1x1200/35",
|
||||||
|
"cells": [
|
||||||
|
"Al",
|
||||||
|
"RM",
|
||||||
|
"1.05",
|
||||||
|
"52.3",
|
||||||
|
"0.0247",
|
||||||
|
"5.5",
|
||||||
|
"On Request",
|
||||||
|
"On Request",
|
||||||
|
"113",
|
||||||
|
"2.4",
|
||||||
|
"990",
|
||||||
|
"66",
|
||||||
|
"5200"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1076,6 +1112,24 @@ locale: en
|
|||||||
"65",
|
"65",
|
||||||
"5093"
|
"5093"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configuration": "1x1200/35",
|
||||||
|
"cells": [
|
||||||
|
"Al",
|
||||||
|
"RM",
|
||||||
|
"1.15",
|
||||||
|
"57.5",
|
||||||
|
"0.0247",
|
||||||
|
"8",
|
||||||
|
"On Request",
|
||||||
|
"On Request",
|
||||||
|
"113",
|
||||||
|
"2.4",
|
||||||
|
"1065",
|
||||||
|
"71",
|
||||||
|
"5900"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
59
scripts/update_ampacity.py
Normal file
59
scripts/update_ampacity.py
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
import openpyxl
|
||||||
|
|
||||||
|
def update_excel_ampacity(file_path, headers_row_idx, ampacity_cols_identifiers, target_cross_section="1x1200/35"):
|
||||||
|
print(f"Updating {file_path}...")
|
||||||
|
wb = openpyxl.load_workbook(file_path)
|
||||||
|
ws = wb.active
|
||||||
|
|
||||||
|
# openpyxl is 1-indexed for rows and columns
|
||||||
|
headers = [cell.value for cell in ws[headers_row_idx]]
|
||||||
|
|
||||||
|
# Identify column indices for ampacity (0-indexed locally for easier row access)
|
||||||
|
col_indices = []
|
||||||
|
for identifier in ampacity_cols_identifiers:
|
||||||
|
if isinstance(identifier, int):
|
||||||
|
col_indices.append(identifier)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
# list.index returns 0-indexed position
|
||||||
|
col_indices.append(headers.index(identifier))
|
||||||
|
except ValueError:
|
||||||
|
print(f"Warning: Could not find column '{identifier}' in {file_path}")
|
||||||
|
|
||||||
|
# Find row index for "Number of cores and cross-section" or use index 8
|
||||||
|
cs_col_idx = 8
|
||||||
|
try:
|
||||||
|
cs_col_idx = headers.index("Number of cores and cross-section")
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
rows_updated = 0
|
||||||
|
# ws.iter_rows returns 1-indexed rows
|
||||||
|
for row in ws.iter_rows(min_row=headers_row_idx + 1):
|
||||||
|
# row is a tuple of cells, so row[cs_col_idx] is 0-indexed access to the tuple
|
||||||
|
if str(row[cs_col_idx].value).strip() == target_cross_section:
|
||||||
|
for col_idx in col_indices:
|
||||||
|
row[col_idx].value = "On Request"
|
||||||
|
rows_updated += 1
|
||||||
|
|
||||||
|
wb.save(file_path)
|
||||||
|
print(f"Updated {rows_updated} rows in {file_path}")
|
||||||
|
|
||||||
|
# File 1: medium-voltage-KM.xlsx
|
||||||
|
update_excel_ampacity(
|
||||||
|
'data/excel/medium-voltage-KM.xlsx',
|
||||||
|
1, # Headers are in first row (1-indexed)
|
||||||
|
[
|
||||||
|
'Current ratings in air, trefoil*',
|
||||||
|
'Current ratings in air, flat*',
|
||||||
|
'Current ratings in ground, trefoil*',
|
||||||
|
'Current ratings in ground, flat*'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# File 2: medium-voltage-KM 170126.xlsx
|
||||||
|
update_excel_ampacity(
|
||||||
|
'data/excel/medium-voltage-KM 170126.xlsx',
|
||||||
|
1, # Indices 39 and 41 were from a 0-indexed JSON representation
|
||||||
|
[39, 41]
|
||||||
|
)
|
||||||
87
scripts/update_excel.py
Normal file
87
scripts/update_excel.py
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import openpyxl
|
||||||
|
|
||||||
|
excel_path = 'data/excel/medium-voltage-KM.xlsx'
|
||||||
|
wb = openpyxl.load_workbook(excel_path)
|
||||||
|
ws = wb.active
|
||||||
|
|
||||||
|
# Technical data for 1x1200RM/35
|
||||||
|
new_rows_data = [
|
||||||
|
{
|
||||||
|
"Rated voltage": "6/10",
|
||||||
|
"Test voltage": 21,
|
||||||
|
"Nominal insulation thickness": 3.4,
|
||||||
|
"Diameter over insulation (approx.)": 48.5,
|
||||||
|
"Minimum sheath thickness": 2.1,
|
||||||
|
"Outer diameter (approx.)": 59,
|
||||||
|
"Bending radius (min.)": 885,
|
||||||
|
"Weight (approx.)": 4800,
|
||||||
|
"Capacitance (approx.)": 0.95,
|
||||||
|
"Inductance, trefoil (approx.)": 0.24,
|
||||||
|
"Inductance in air, flat (approx.) 1": 0.40,
|
||||||
|
"Inductance in ground, flat (approx.) 1": 0.42,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Rated voltage": "12/20",
|
||||||
|
"Test voltage": 42,
|
||||||
|
"Nominal insulation thickness": 5.5,
|
||||||
|
"Diameter over insulation (approx.)": 52.3,
|
||||||
|
"Minimum sheath thickness": 2.1,
|
||||||
|
"Outer diameter (approx.)": 66,
|
||||||
|
"Bending radius (min.)": 990,
|
||||||
|
"Weight (approx.)": 5200,
|
||||||
|
"Capacitance (approx.)": 1.05,
|
||||||
|
"Inductance, trefoil (approx.)": 0.23,
|
||||||
|
"Inductance in air, flat (approx.) 1": 0.43,
|
||||||
|
"Inductance in ground, flat (approx.) 1": 0.45,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Rated voltage": "18/30",
|
||||||
|
"Test voltage": 63,
|
||||||
|
"Nominal insulation thickness": 8.0,
|
||||||
|
"Diameter over insulation (approx.)": 57.5,
|
||||||
|
"Minimum sheath thickness": 2.4,
|
||||||
|
"Outer diameter (approx.)": 71,
|
||||||
|
"Bending radius (min.)": 1065,
|
||||||
|
"Weight (approx.)": 5900,
|
||||||
|
"Capacitance (approx.)": 1.15,
|
||||||
|
"Inductance, trefoil (approx.)": 0.22,
|
||||||
|
"Inductance in air, flat (approx.) 1": 0.45,
|
||||||
|
"Inductance in ground, flat (approx.) 1": 0.47,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
# Find a template row for NA2XS(F)2Y
|
||||||
|
template_row = None
|
||||||
|
headers = [cell.value for cell in ws[1]]
|
||||||
|
|
||||||
|
for row in ws.iter_rows(min_row=3, values_only=True):
|
||||||
|
if row[0] == 'NA2XS(F)2Y':
|
||||||
|
template_row = list(row)
|
||||||
|
break
|
||||||
|
|
||||||
|
if not template_row:
|
||||||
|
print("Error: Could not find template row for NA2XS(F)2Y")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
# Function to update template with new values
|
||||||
|
def create_row(template, updates, headers):
|
||||||
|
new_row = template[:]
|
||||||
|
# Change "Number of cores and cross-section"
|
||||||
|
cs_idx = headers.index("Number of cores and cross-section")
|
||||||
|
new_row[cs_idx] = "1x1200/35"
|
||||||
|
|
||||||
|
# Apply specific updates
|
||||||
|
for key, value in updates.items():
|
||||||
|
if key in headers:
|
||||||
|
idx = headers.index(key)
|
||||||
|
new_row[idx] = value
|
||||||
|
return new_row
|
||||||
|
|
||||||
|
# Append new rows
|
||||||
|
for data in new_rows_data:
|
||||||
|
new_row_values = create_row(template_row, data, headers)
|
||||||
|
ws.append(new_row_values)
|
||||||
|
print(f"Added row for {data['Rated voltage']} kV")
|
||||||
|
|
||||||
|
wb.save(excel_path)
|
||||||
|
print("Excel file updated successfully.")
|
||||||
120
scripts/update_excel_v2.py
Normal file
120
scripts/update_excel_v2.py
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
import openpyxl
|
||||||
|
|
||||||
|
excel_path = 'data/excel/medium-voltage-KM 170126.xlsx'
|
||||||
|
wb = openpyxl.load_workbook(excel_path)
|
||||||
|
ws = wb.active
|
||||||
|
|
||||||
|
# Technical data for 1x1200RM/35
|
||||||
|
# Indices based on Row 2 (Units) and Row 1
|
||||||
|
# Index 0: Part Number
|
||||||
|
# Index 8: Querschnitt
|
||||||
|
# Index 9: Rated voltage
|
||||||
|
# Index 10: Test voltage
|
||||||
|
# Index 23: LD mm
|
||||||
|
# Index 24: ID mm
|
||||||
|
# Index 25: DI mm
|
||||||
|
# Index 26: MWD mm
|
||||||
|
# Index 27: AD mm
|
||||||
|
# Index 28: BR
|
||||||
|
# Index 29: G kg
|
||||||
|
# Index 30: RI Ohm
|
||||||
|
# Index 31: Cap
|
||||||
|
# Index 32: Inductance trefoil
|
||||||
|
# Index 35: BK
|
||||||
|
# Index 39: SBL 30
|
||||||
|
# Index 41: SBE 20
|
||||||
|
|
||||||
|
new_rows_data = [
|
||||||
|
{
|
||||||
|
"voltage": "6/10",
|
||||||
|
"test_v": 21,
|
||||||
|
"ld": 41.5,
|
||||||
|
"id": 3.4,
|
||||||
|
"di": 48.5,
|
||||||
|
"mwd": 2.1,
|
||||||
|
"ad": 59,
|
||||||
|
"br": 885,
|
||||||
|
"g": 4800,
|
||||||
|
"ri": 0.0247,
|
||||||
|
"cap": 0.95,
|
||||||
|
"ind": 0.24,
|
||||||
|
"bk": 113,
|
||||||
|
"sbl": 1300,
|
||||||
|
"sbe": 933
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"voltage": "12/20",
|
||||||
|
"test_v": 42,
|
||||||
|
"ld": 41.5,
|
||||||
|
"id": 5.5,
|
||||||
|
"di": 52.3,
|
||||||
|
"mwd": 2.1,
|
||||||
|
"ad": 66,
|
||||||
|
"br": 990,
|
||||||
|
"g": 5200,
|
||||||
|
"ri": 0.0247,
|
||||||
|
"cap": 1.05,
|
||||||
|
"ind": 0.23,
|
||||||
|
"bk": 113,
|
||||||
|
"sbl": 1200,
|
||||||
|
"sbe": 900
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"voltage": "18/30",
|
||||||
|
"test_v": 63,
|
||||||
|
"ld": 41.5,
|
||||||
|
"id": 8.0,
|
||||||
|
"di": 57.5,
|
||||||
|
"mwd": 2.4,
|
||||||
|
"ad": 71,
|
||||||
|
"br": 1065,
|
||||||
|
"g": 5900,
|
||||||
|
"ri": 0.0247,
|
||||||
|
"cap": 1.15,
|
||||||
|
"ind": 0.22,
|
||||||
|
"bk": 113,
|
||||||
|
"sbl": 1300,
|
||||||
|
"sbe": 950
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
# Find a template row for NA2XS(F)2Y
|
||||||
|
template_row = None
|
||||||
|
for row in ws.iter_rows(min_row=3, values_only=True):
|
||||||
|
if row[0] == 'NA2XS(F)2Y' and row[9] == '6/10':
|
||||||
|
template_row = list(row)
|
||||||
|
break
|
||||||
|
|
||||||
|
if not template_row:
|
||||||
|
print("Error: Could not find template row for NA2XS(F)2Y")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
# Function to update template with new values
|
||||||
|
def create_row(template, data):
|
||||||
|
new_row = template[:]
|
||||||
|
new_row[8] = "1x1200/35"
|
||||||
|
new_row[9] = data["voltage"]
|
||||||
|
new_row[10] = data["test_v"]
|
||||||
|
new_row[23] = data["ld"]
|
||||||
|
new_row[24] = data["id"]
|
||||||
|
new_row[25] = data["di"]
|
||||||
|
new_row[26] = data["mwd"]
|
||||||
|
new_row[27] = data["ad"]
|
||||||
|
new_row[28] = data["br"]
|
||||||
|
new_row[29] = data["g"]
|
||||||
|
new_row[30] = data["ri"]
|
||||||
|
new_row[31] = data["cap"]
|
||||||
|
new_row[32] = data["ind"]
|
||||||
|
new_row[35] = data["bk"]
|
||||||
|
new_row[39] = data["sbl"]
|
||||||
|
new_row[41] = data["sbe"]
|
||||||
|
return new_row
|
||||||
|
|
||||||
|
# Append new rows
|
||||||
|
for data in new_rows_data:
|
||||||
|
new_row_values = create_row(template_row, data)
|
||||||
|
ws.append(new_row_values)
|
||||||
|
print(f"Added row for {data['voltage']} kV")
|
||||||
|
|
||||||
|
wb.save(excel_path)
|
||||||
|
print("Excel file updated successfully.")
|
||||||
Reference in New Issue
Block a user