3hr-energy-data-structure/SLD Data Parser.ipynb
2023-01-06 18:44:14 +09:00

310 lines
9.2 KiB
Text

{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"id": "4a4c4d52",
"metadata": {
"ExecuteTime": {
"end_time": "2023-01-06T09:06:47.322571Z",
"start_time": "2023-01-06T09:06:47.008066Z"
}
},
"outputs": [
{
"ename": "UnicodeDecodeError",
"evalue": "'cp949' codec can't decode byte 0xec in position 481: illegal multibyte sequence",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mUnicodeDecodeError\u001b[0m Traceback (most recent call last)",
"Input \u001b[1;32mIn [2]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mopen\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFEEDER_TAGS_DESCRIPTION.TXT\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;28;01mas\u001b[39;00m sld_file:\n\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m line \u001b[38;5;129;01min\u001b[39;00m sld_file:\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28mprint\u001b[39m(line)\n",
"\u001b[1;31mUnicodeDecodeError\u001b[0m: 'cp949' codec can't decode byte 0xec in position 481: illegal multibyte sequence"
]
}
],
"source": [
"with open('FEEDER_TAGS_DESCRIPTION.TXT') as sld_file:\n",
" for line in sld_file:\n",
" print(line)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "b35cabe9",
"metadata": {
"ExecuteTime": {
"end_time": "2023-01-06T09:08:31.904446Z",
"start_time": "2023-01-06T09:08:31.895471Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"E001\t\t\t\t\tNo.1 Line Incoming Kwh\n",
"\tE012\t\t\t\t30/40MVA TR Rougher Line\n",
"\t\tF001\t\t\tRougher Incoming\n",
"\t\t\tF002\t\tFurnace Power\n",
"\t\t\tF008\t\tRougher Thy. P/S\n",
"\t\t\tF009\t\tRougher AC Power\n",
"\t\t\tF010\t\tWater Treatment Power Supply-1\n",
"\t\t\tF011\t\tFinisher AC Power\n",
"\t\t\t\tF411\tFM Fume Exhaust Fan\n",
"\t\t\t\tF411H\tFM Fume Exhaust Fan Inverter\n",
"\t\t\tF017\t\tNo.4 Furnace\n",
"\tE024\t\t\t\tHSE Main Thy.\n",
"\tE025\t\t\t\tR1 Main Thy. Top/Bottom\n",
"\tE026\t\t\t\tR2 Main Thy. Top/Bottom\n",
"E002\t\t\t\t\t22KV No.2 Incoming\n",
"\tE013\t\t\t\t12/15MVA TR Hot Finishing Line(정정라인)\n",
"\t\tFF04\t\t\tHDL Incomming\n",
"\t\tFF05\t\t\tCoil Yard Cooling Incoming\n",
"\t\tFF06\t\t\tHPL Incoming\n",
"\t\tFF07\t\t\tNo.1 HSL Incoming\n",
"\t\tFF08\t\t\tNo.2 HSL Incoming\n",
"\t\tFF09\t\t\tCrane\n",
"\t\tFF10\t\t\tLighting\n",
"\t\tFF11\t\t\tRepair\n",
"\t\tFF12\t\t\tHFY\n",
"\tE014\t\t\t\t30/40MVA TR Finisher Line\n",
"\t\tF101\t\t\tFinisher Incoming\n",
"\t\t\tF102\t\tNo.2 Crane & Lighting Power\n",
"\t\t\tF103\t\tFinisher Thy. P/S\n",
"\t\t\tF104\t\tCrop Shear Main Drive\n",
"\t\t\tF105\t\tEdge Heater Power\n",
"\t\t\tF106\t\tCoiler/Conveyor AC Power\n",
"\t\t\tF107\t\tCoiler Thy. P/S\n",
"\t\t\tF108\t\tWater Treatment Power Supply-2\n",
"\t\t\tF114\t\tNo.3 D/C AC Drive PS(FN550)\n",
"\tE017\t\t\t\tPOL Line\n",
"\tE018\t\t\t\t2MVA TR Emergency Power\n",
"\t\tF605\t\t\tECS VCB\n",
"E004\t\t\t\t\tNo.3 Bus Incoming\n",
"E003\t\t\t\t\t22KV No.3 Incoming \n",
"\tEN031\t\t\t\tF1 Mill Roll Drive\n",
"\tEN032\t\t\t\tF2 Mill Roll Drive\n",
"\tEN033\t\t\t\tF3 Mill Roll Drive\n",
"\tEN034\t\t\t\tF4 Mill Roll Drive\n",
"\tEN035\t\t\t\tF5 Mill Roll Drive\n",
"\tEN036\t\t\t\tF6 Mill Roll Drive\n",
"\tEN037\t\t\t\tF7 Mill Roll Drive\n",
"EN060\t\t\t\t\t22KV No.4 Incoming \n",
"\tEN065\t\t\t\tNo.4 30/40MVA TR 1'RY\n",
"\t\tFN053\t\t\tAir Compressor\n",
"\t\tFN054\t\t\tDescaling Pump\n",
"\t\tFN055\t\t\tECS 가설전원\n",
"\t\tFN056\t\t\tRoll Cool Water Booster Pump\n",
"\tE050\t\t\t\tIncoming\n",
"\t\tE053\t\t\t300Bar(FSB) Descaling\n",
"\t\t\tF131\t\tDes Pump-1\n",
"\t\t\tF133\t\tDes Pump-2\n"
]
}
],
"source": [
"with open('FEEDER_TAGS_DESCRIPTION.TXT', encoding='UTF-8') as sld_file:\n",
" print(sld_file.read())"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "665f036d",
"metadata": {
"ExecuteTime": {
"end_time": "2023-01-06T09:11:38.991942Z",
"start_time": "2023-01-06T09:11:38.974628Z"
}
},
"outputs": [],
"source": [
"import re"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "37ff949c",
"metadata": {},
"outputs": [],
"source": [
"re.compile"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "4b1c0ac1",
"metadata": {
"ExecuteTime": {
"end_time": "2023-01-06T09:09:24.610867Z",
"start_time": "2023-01-06T09:09:24.598899Z"
},
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"E001\t\t\t\t\tNo.1 Line Incoming Kwh\n",
"\n",
"\tE012\t\t\t\t30/40MVA TR Rougher Line\n",
"\n",
"\t\tF001\t\t\tRougher Incoming\n",
"\n",
"\t\t\tF002\t\tFurnace Power\n",
"\n",
"\t\t\tF008\t\tRougher Thy. P/S\n",
"\n",
"\t\t\tF009\t\tRougher AC Power\n",
"\n",
"\t\t\tF010\t\tWater Treatment Power Supply-1\n",
"\n",
"\t\t\tF011\t\tFinisher AC Power\n",
"\n",
"\t\t\t\tF411\tFM Fume Exhaust Fan\n",
"\n",
"\t\t\t\tF411H\tFM Fume Exhaust Fan Inverter\n",
"\n",
"\t\t\tF017\t\tNo.4 Furnace\n",
"\n",
"\tE024\t\t\t\tHSE Main Thy.\n",
"\n",
"\tE025\t\t\t\tR1 Main Thy. Top/Bottom\n",
"\n",
"\tE026\t\t\t\tR2 Main Thy. Top/Bottom\n",
"\n",
"E002\t\t\t\t\t22KV No.2 Incoming\n",
"\n",
"\tE013\t\t\t\t12/15MVA TR Hot Finishing Line(정정라인)\n",
"\n",
"\t\tFF04\t\t\tHDL Incomming\n",
"\n",
"\t\tFF05\t\t\tCoil Yard Cooling Incoming\n",
"\n",
"\t\tFF06\t\t\tHPL Incoming\n",
"\n",
"\t\tFF07\t\t\tNo.1 HSL Incoming\n",
"\n",
"\t\tFF08\t\t\tNo.2 HSL Incoming\n",
"\n",
"\t\tFF09\t\t\tCrane\n",
"\n",
"\t\tFF10\t\t\tLighting\n",
"\n",
"\t\tFF11\t\t\tRepair\n",
"\n",
"\t\tFF12\t\t\tHFY\n",
"\n",
"\tE014\t\t\t\t30/40MVA TR Finisher Line\n",
"\n",
"\t\tF101\t\t\tFinisher Incoming\n",
"\n",
"\t\t\tF102\t\tNo.2 Crane & Lighting Power\n",
"\n",
"\t\t\tF103\t\tFinisher Thy. P/S\n",
"\n",
"\t\t\tF104\t\tCrop Shear Main Drive\n",
"\n",
"\t\t\tF105\t\tEdge Heater Power\n",
"\n",
"\t\t\tF106\t\tCoiler/Conveyor AC Power\n",
"\n",
"\t\t\tF107\t\tCoiler Thy. P/S\n",
"\n",
"\t\t\tF108\t\tWater Treatment Power Supply-2\n",
"\n",
"\t\t\tF114\t\tNo.3 D/C AC Drive PS(FN550)\n",
"\n",
"\tE017\t\t\t\tPOL Line\n",
"\n",
"\tE018\t\t\t\t2MVA TR Emergency Power\n",
"\n",
"\t\tF605\t\t\tECS VCB\n",
"\n",
"E004\t\t\t\t\tNo.3 Bus Incoming\n",
"\n",
"E003\t\t\t\t\t22KV No.3 Incoming \n",
"\n",
"\tEN031\t\t\t\tF1 Mill Roll Drive\n",
"\n",
"\tEN032\t\t\t\tF2 Mill Roll Drive\n",
"\n",
"\tEN033\t\t\t\tF3 Mill Roll Drive\n",
"\n",
"\tEN034\t\t\t\tF4 Mill Roll Drive\n",
"\n",
"\tEN035\t\t\t\tF5 Mill Roll Drive\n",
"\n",
"\tEN036\t\t\t\tF6 Mill Roll Drive\n",
"\n",
"\tEN037\t\t\t\tF7 Mill Roll Drive\n",
"\n",
"EN060\t\t\t\t\t22KV No.4 Incoming \n",
"\n",
"\tEN065\t\t\t\tNo.4 30/40MVA TR 1'RY\n",
"\n",
"\t\tFN053\t\t\tAir Compressor\n",
"\n",
"\t\tFN054\t\t\tDescaling Pump\n",
"\n",
"\t\tFN055\t\t\tECS 가설전원\n",
"\n",
"\t\tFN056\t\t\tRoll Cool Water Booster Pump\n",
"\n",
"\tE050\t\t\t\tIncoming\n",
"\n",
"\t\tE053\t\t\t300Bar(FSB) Descaling\n",
"\n",
"\t\t\tF131\t\tDes Pump-1\n",
"\n",
"\t\t\tF133\t\tDes Pump-2\n"
]
}
],
"source": [
"with open('FEEDER_TAGS_DESCRIPTION.TXT', encoding='UTF-8') as sld_file:\n",
" for line in sld_file:\n",
" print(line)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 5
}