|
@ -0,0 +1,775 @@ |
|
|
|
|
|
{ |
|
|
|
|
|
"cells": [ |
|
|
|
|
|
{ |
|
|
|
|
|
"cell_type": "code", |
|
|
|
|
|
"execution_count": 4, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"outputs": [], |
|
|
|
|
|
"source": [ |
|
|
|
|
|
"import os\n", |
|
|
|
|
|
"import pandas as pd\n", |
|
|
|
|
|
"import numpy as np\n", |
|
|
|
|
|
"import sys\n", |
|
|
|
|
|
"sys.path.append('../../Scripts')\n", |
|
|
|
|
|
"from preprocess_daily import DailyPreprocessor" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"cell_type": "code", |
|
|
|
|
|
"execution_count": 5, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"outputs": [ |
|
|
|
|
|
{ |
|
|
|
|
|
"name": "stdout", |
|
|
|
|
|
"output_type": "stream", |
|
|
|
|
|
"text": [ |
|
|
|
|
|
"1. 데이터를 로드합니다.\n", |
|
|
|
|
|
"1-1. 네트워크가 로드되었습니다.\n", |
|
|
|
|
|
"1-2. 테이블들이 로드되었습니다.\n", |
|
|
|
|
|
"1-3. 네트워크의 모든 clean state requirement들을 체크했습니다.\n", |
|
|
|
|
|
"1-4. 테이블들의 무결성 검사를 완료했습니다.\n", |
|
|
|
|
|
"2. 중간산출물을 생성합니다.\n" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"name": "stderr", |
|
|
|
|
|
"output_type": "stream", |
|
|
|
|
|
"text": [ |
|
|
|
|
|
"이동류정보 불러오는 중: 100%|██████████| 17280/17280 [00:17<00:00, 992.30it/s] \n" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"name": "stdout", |
|
|
|
|
|
"output_type": "stream", |
|
|
|
|
|
"text": [ |
|
|
|
|
|
"2-1. 매칭 테이블들을 생성했습니다.\n", |
|
|
|
|
|
"2-2. 비보호우회전(g)을 배정했습니다.\n", |
|
|
|
|
|
"2-3. 직진 및 좌회전(G)을 배정했습니다.\n", |
|
|
|
|
|
"2-2. node2num_cycles.json를 저장했습니다.\n", |
|
|
|
|
|
"3. 이슈사항을 저장합니다.\n" |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
"source": [ |
|
|
|
|
|
"self = DailyPreprocessor()\n", |
|
|
|
|
|
"self.main()" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"cell_type": "code", |
|
|
|
|
|
"execution_count": 8, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"outputs": [ |
|
|
|
|
|
{ |
|
|
|
|
|
"data": { |
|
|
|
|
|
"text/html": [ |
|
|
|
|
|
"<div>\n", |
|
|
|
|
|
"<style scoped>\n", |
|
|
|
|
|
" .dataframe tbody tr th:only-of-type {\n", |
|
|
|
|
|
" vertical-align: middle;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe tbody tr th {\n", |
|
|
|
|
|
" vertical-align: top;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe thead th {\n", |
|
|
|
|
|
" text-align: right;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"</style>\n", |
|
|
|
|
|
"<table border=\"1\" class=\"dataframe\">\n", |
|
|
|
|
|
" <thead>\n", |
|
|
|
|
|
" <tr style=\"text-align: right;\">\n", |
|
|
|
|
|
" <th></th>\n", |
|
|
|
|
|
" <th>inter_no</th>\n", |
|
|
|
|
|
" <th>phas_A</th>\n", |
|
|
|
|
|
" <th>phas_B</th>\n", |
|
|
|
|
|
" <th>move_A</th>\n", |
|
|
|
|
|
" <th>move_B</th>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </thead>\n", |
|
|
|
|
|
" <tbody>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>0</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>8</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>1</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>7</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>2</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>6</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>3</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" <td>6</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>4</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" <td>5</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </tbody>\n", |
|
|
|
|
|
"</table>\n", |
|
|
|
|
|
"</div>" |
|
|
|
|
|
], |
|
|
|
|
|
"text/plain": [ |
|
|
|
|
|
" inter_no phas_A phas_B move_A move_B\n", |
|
|
|
|
|
"0 175 1 1 8 4\n", |
|
|
|
|
|
"1 175 2 2 7 3\n", |
|
|
|
|
|
"2 175 3 3 6 1\n", |
|
|
|
|
|
"3 175 3 4 6 2\n", |
|
|
|
|
|
"4 175 4 4 5 2" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"output_type": "display_data" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"data": { |
|
|
|
|
|
"text/html": [ |
|
|
|
|
|
"<div>\n", |
|
|
|
|
|
"<style scoped>\n", |
|
|
|
|
|
" .dataframe tbody tr th:only-of-type {\n", |
|
|
|
|
|
" vertical-align: middle;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe tbody tr th {\n", |
|
|
|
|
|
" vertical-align: top;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe thead th {\n", |
|
|
|
|
|
" text-align: right;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"</style>\n", |
|
|
|
|
|
"<table border=\"1\" class=\"dataframe\">\n", |
|
|
|
|
|
" <thead>\n", |
|
|
|
|
|
" <tr style=\"text-align: right;\">\n", |
|
|
|
|
|
" <th></th>\n", |
|
|
|
|
|
" <th>inter_no</th>\n", |
|
|
|
|
|
" <th>phase_no</th>\n", |
|
|
|
|
|
" <th>ring_type</th>\n", |
|
|
|
|
|
" <th>move_no</th>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </thead>\n", |
|
|
|
|
|
" <tbody>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>0</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>8</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>0</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>1</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>7</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>1</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>2</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>6</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </tbody>\n", |
|
|
|
|
|
"</table>\n", |
|
|
|
|
|
"</div>" |
|
|
|
|
|
], |
|
|
|
|
|
"text/plain": [ |
|
|
|
|
|
" inter_no phase_no ring_type move_no\n", |
|
|
|
|
|
"0 175 1 A 8\n", |
|
|
|
|
|
"0 175 1 B 4\n", |
|
|
|
|
|
"1 175 2 A 7\n", |
|
|
|
|
|
"1 175 2 B 3\n", |
|
|
|
|
|
"2 175 3 A 6" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"output_type": "display_data" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"data": { |
|
|
|
|
|
"text/html": [ |
|
|
|
|
|
"<div>\n", |
|
|
|
|
|
"<style scoped>\n", |
|
|
|
|
|
" .dataframe tbody tr th:only-of-type {\n", |
|
|
|
|
|
" vertical-align: middle;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe tbody tr th {\n", |
|
|
|
|
|
" vertical-align: top;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe thead th {\n", |
|
|
|
|
|
" text-align: right;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"</style>\n", |
|
|
|
|
|
"<table border=\"1\" class=\"dataframe\">\n", |
|
|
|
|
|
" <thead>\n", |
|
|
|
|
|
" <tr style=\"text-align: right;\">\n", |
|
|
|
|
|
" <th></th>\n", |
|
|
|
|
|
" <th>inter_no</th>\n", |
|
|
|
|
|
" <th>phase_no</th>\n", |
|
|
|
|
|
" <th>ring_type</th>\n", |
|
|
|
|
|
" <th>move_no</th>\n", |
|
|
|
|
|
" <th>inc_dir</th>\n", |
|
|
|
|
|
" <th>out_dir</th>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </thead>\n", |
|
|
|
|
|
" <tbody>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>0</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>8</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>1</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>2</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>7</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" <td>동</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>3</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" <td>서</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>4</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>6</td>\n", |
|
|
|
|
|
" <td>동</td>\n", |
|
|
|
|
|
" <td>서</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </tbody>\n", |
|
|
|
|
|
"</table>\n", |
|
|
|
|
|
"</div>" |
|
|
|
|
|
], |
|
|
|
|
|
"text/plain": [ |
|
|
|
|
|
" inter_no phase_no ring_type move_no inc_dir out_dir\n", |
|
|
|
|
|
"0 175 1 A 8 남 북\n", |
|
|
|
|
|
"1 175 1 B 4 북 남\n", |
|
|
|
|
|
"2 175 2 A 7 북 동\n", |
|
|
|
|
|
"3 175 2 B 3 남 서\n", |
|
|
|
|
|
"4 175 3 A 6 동 서" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"output_type": "display_data" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"data": { |
|
|
|
|
|
"text/html": [ |
|
|
|
|
|
"<div>\n", |
|
|
|
|
|
"<style scoped>\n", |
|
|
|
|
|
" .dataframe tbody tr th:only-of-type {\n", |
|
|
|
|
|
" vertical-align: middle;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe tbody tr th {\n", |
|
|
|
|
|
" vertical-align: top;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe thead th {\n", |
|
|
|
|
|
" text-align: right;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"</style>\n", |
|
|
|
|
|
"<table border=\"1\" class=\"dataframe\">\n", |
|
|
|
|
|
" <thead>\n", |
|
|
|
|
|
" <tr style=\"text-align: right;\">\n", |
|
|
|
|
|
" <th></th>\n", |
|
|
|
|
|
" <th>inter_no</th>\n", |
|
|
|
|
|
" <th>phase_no</th>\n", |
|
|
|
|
|
" <th>ring_type</th>\n", |
|
|
|
|
|
" <th>move_no</th>\n", |
|
|
|
|
|
" <th>inc_dir</th>\n", |
|
|
|
|
|
" <th>out_dir</th>\n", |
|
|
|
|
|
" <th>inc_angle</th>\n", |
|
|
|
|
|
" <th>out_angle</th>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </thead>\n", |
|
|
|
|
|
" <tbody>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>0</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>8</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" <td>179</td>\n", |
|
|
|
|
|
" <td>004</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>1</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" <td>003</td>\n", |
|
|
|
|
|
" <td>176</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>2</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>7</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" <td>동</td>\n", |
|
|
|
|
|
" <td>001</td>\n", |
|
|
|
|
|
" <td>095</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>3</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" <td>서</td>\n", |
|
|
|
|
|
" <td>179</td>\n", |
|
|
|
|
|
" <td>270</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>4</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>6</td>\n", |
|
|
|
|
|
" <td>동</td>\n", |
|
|
|
|
|
" <td>서</td>\n", |
|
|
|
|
|
" <td>090</td>\n", |
|
|
|
|
|
" <td>270</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </tbody>\n", |
|
|
|
|
|
"</table>\n", |
|
|
|
|
|
"</div>" |
|
|
|
|
|
], |
|
|
|
|
|
"text/plain": [ |
|
|
|
|
|
" inter_no phase_no ring_type move_no inc_dir out_dir inc_angle out_angle\n", |
|
|
|
|
|
"0 175 1 A 8 남 북 179 004\n", |
|
|
|
|
|
"1 175 1 B 4 북 남 003 176\n", |
|
|
|
|
|
"2 175 2 A 7 북 동 001 095\n", |
|
|
|
|
|
"3 175 2 B 3 남 서 179 270\n", |
|
|
|
|
|
"4 175 3 A 6 동 서 090 270" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"output_type": "display_data" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"data": { |
|
|
|
|
|
"text/html": [ |
|
|
|
|
|
"<div>\n", |
|
|
|
|
|
"<style scoped>\n", |
|
|
|
|
|
" .dataframe tbody tr th:only-of-type {\n", |
|
|
|
|
|
" vertical-align: middle;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe tbody tr th {\n", |
|
|
|
|
|
" vertical-align: top;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe thead th {\n", |
|
|
|
|
|
" text-align: right;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"</style>\n", |
|
|
|
|
|
"<table border=\"1\" class=\"dataframe\">\n", |
|
|
|
|
|
" <thead>\n", |
|
|
|
|
|
" <tr style=\"text-align: right;\">\n", |
|
|
|
|
|
" <th></th>\n", |
|
|
|
|
|
" <th>inter_no</th>\n", |
|
|
|
|
|
" <th>phase_no</th>\n", |
|
|
|
|
|
" <th>ring_type</th>\n", |
|
|
|
|
|
" <th>move_no</th>\n", |
|
|
|
|
|
" <th>inc_dir</th>\n", |
|
|
|
|
|
" <th>out_dir</th>\n", |
|
|
|
|
|
" <th>inc_angle</th>\n", |
|
|
|
|
|
" <th>out_angle</th>\n", |
|
|
|
|
|
" <th>inc_edge</th>\n", |
|
|
|
|
|
" <th>out_edge</th>\n", |
|
|
|
|
|
" <th>node_id</th>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </thead>\n", |
|
|
|
|
|
" <tbody>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>0</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>8</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" <td>179</td>\n", |
|
|
|
|
|
" <td>004</td>\n", |
|
|
|
|
|
" <td>-571542797_02</td>\n", |
|
|
|
|
|
" <td>571500487_01</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>1</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" <td>003</td>\n", |
|
|
|
|
|
" <td>176</td>\n", |
|
|
|
|
|
" <td>-571500487_01</td>\n", |
|
|
|
|
|
" <td>571542797_02</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>2</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>7</td>\n", |
|
|
|
|
|
" <td>북</td>\n", |
|
|
|
|
|
" <td>동</td>\n", |
|
|
|
|
|
" <td>001</td>\n", |
|
|
|
|
|
" <td>095</td>\n", |
|
|
|
|
|
" <td>-571500487_01</td>\n", |
|
|
|
|
|
" <td>571545870_01</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>3</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>남</td>\n", |
|
|
|
|
|
" <td>서</td>\n", |
|
|
|
|
|
" <td>179</td>\n", |
|
|
|
|
|
" <td>270</td>\n", |
|
|
|
|
|
" <td>-571542797_02</td>\n", |
|
|
|
|
|
" <td>571510153_01</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>4</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>6</td>\n", |
|
|
|
|
|
" <td>동</td>\n", |
|
|
|
|
|
" <td>서</td>\n", |
|
|
|
|
|
" <td>090</td>\n", |
|
|
|
|
|
" <td>270</td>\n", |
|
|
|
|
|
" <td>571545870_02</td>\n", |
|
|
|
|
|
" <td>571510153_01</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </tbody>\n", |
|
|
|
|
|
"</table>\n", |
|
|
|
|
|
"</div>" |
|
|
|
|
|
], |
|
|
|
|
|
"text/plain": [ |
|
|
|
|
|
" inter_no phase_no ring_type move_no inc_dir out_dir inc_angle out_angle \\\n", |
|
|
|
|
|
"0 175 1 A 8 남 북 179 004 \n", |
|
|
|
|
|
"1 175 1 B 4 북 남 003 176 \n", |
|
|
|
|
|
"2 175 2 A 7 북 동 001 095 \n", |
|
|
|
|
|
"3 175 2 B 3 남 서 179 270 \n", |
|
|
|
|
|
"4 175 3 A 6 동 서 090 270 \n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" inc_edge out_edge node_id \n", |
|
|
|
|
|
"0 -571542797_02 571500487_01 i0 \n", |
|
|
|
|
|
"1 -571500487_01 571542797_02 i0 \n", |
|
|
|
|
|
"2 -571500487_01 571545870_01 i0 \n", |
|
|
|
|
|
"3 -571542797_02 571510153_01 i0 \n", |
|
|
|
|
|
"4 571545870_02 571510153_01 i0 " |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"output_type": "display_data" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"data": { |
|
|
|
|
|
"text/html": [ |
|
|
|
|
|
"<div>\n", |
|
|
|
|
|
"<style scoped>\n", |
|
|
|
|
|
" .dataframe tbody tr th:only-of-type {\n", |
|
|
|
|
|
" vertical-align: middle;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe tbody tr th {\n", |
|
|
|
|
|
" vertical-align: top;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe thead th {\n", |
|
|
|
|
|
" text-align: right;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"</style>\n", |
|
|
|
|
|
"<table border=\"1\" class=\"dataframe\">\n", |
|
|
|
|
|
" <thead>\n", |
|
|
|
|
|
" <tr style=\"text-align: right;\">\n", |
|
|
|
|
|
" <th></th>\n", |
|
|
|
|
|
" <th>inter_no</th>\n", |
|
|
|
|
|
" <th>node_id</th>\n", |
|
|
|
|
|
" <th>phase_no</th>\n", |
|
|
|
|
|
" <th>ring_type</th>\n", |
|
|
|
|
|
" <th>move_no</th>\n", |
|
|
|
|
|
" <th>state</th>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </thead>\n", |
|
|
|
|
|
" <tbody>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>0</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>8</td>\n", |
|
|
|
|
|
" <td>grrrgrrrgGGGGrgrr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>1</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" <td>gGGrgrrrgrrrrrgrr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>2</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>7</td>\n", |
|
|
|
|
|
" <td>grrGgrrrgrrrrrgrr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>3</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>B</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>grrrgrrrgrrrrGgrr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>4</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>A</td>\n", |
|
|
|
|
|
" <td>6</td>\n", |
|
|
|
|
|
" <td>grrrgGGrgrrrrrgrr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </tbody>\n", |
|
|
|
|
|
"</table>\n", |
|
|
|
|
|
"</div>" |
|
|
|
|
|
], |
|
|
|
|
|
"text/plain": [ |
|
|
|
|
|
" inter_no node_id phase_no ring_type move_no state\n", |
|
|
|
|
|
"0 175 i0 1 A 8 grrrgrrrgGGGGrgrr\n", |
|
|
|
|
|
"1 175 i0 1 B 4 gGGrgrrrgrrrrrgrr\n", |
|
|
|
|
|
"2 175 i0 2 A 7 grrGgrrrgrrrrrgrr\n", |
|
|
|
|
|
"3 175 i0 2 B 3 grrrgrrrgrrrrGgrr\n", |
|
|
|
|
|
"4 175 i0 3 A 6 grrrgGGrgrrrrrgrr" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"output_type": "display_data" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"data": { |
|
|
|
|
|
"text/html": [ |
|
|
|
|
|
"<div>\n", |
|
|
|
|
|
"<style scoped>\n", |
|
|
|
|
|
" .dataframe tbody tr th:only-of-type {\n", |
|
|
|
|
|
" vertical-align: middle;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe tbody tr th {\n", |
|
|
|
|
|
" vertical-align: top;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
" .dataframe thead th {\n", |
|
|
|
|
|
" text-align: right;\n", |
|
|
|
|
|
" }\n", |
|
|
|
|
|
"</style>\n", |
|
|
|
|
|
"<table border=\"1\" class=\"dataframe\">\n", |
|
|
|
|
|
" <thead>\n", |
|
|
|
|
|
" <tr style=\"text-align: right;\">\n", |
|
|
|
|
|
" <th></th>\n", |
|
|
|
|
|
" <th>inter_no</th>\n", |
|
|
|
|
|
" <th>node_id</th>\n", |
|
|
|
|
|
" <th>move_no</th>\n", |
|
|
|
|
|
" <th>state</th>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </thead>\n", |
|
|
|
|
|
" <tbody>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>0</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>1</td>\n", |
|
|
|
|
|
" <td>grrrgrrGgrrrrrgrr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>1</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>2</td>\n", |
|
|
|
|
|
" <td>grrrgrrrgrrrrrgGr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>2</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>3</td>\n", |
|
|
|
|
|
" <td>grrrgrrrgrrrrGgrr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>3</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>4</td>\n", |
|
|
|
|
|
" <td>gGGrgrrrgrrrrrgrr</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" <tr>\n", |
|
|
|
|
|
" <th>4</th>\n", |
|
|
|
|
|
" <td>175</td>\n", |
|
|
|
|
|
" <td>i0</td>\n", |
|
|
|
|
|
" <td>5</td>\n", |
|
|
|
|
|
" <td>grrrgrrrgrrrrrgrG</td>\n", |
|
|
|
|
|
" </tr>\n", |
|
|
|
|
|
" </tbody>\n", |
|
|
|
|
|
"</table>\n", |
|
|
|
|
|
"</div>" |
|
|
|
|
|
], |
|
|
|
|
|
"text/plain": [ |
|
|
|
|
|
" inter_no node_id move_no state\n", |
|
|
|
|
|
"0 175 i0 1 grrrgrrGgrrrrrgrr\n", |
|
|
|
|
|
"1 175 i0 2 grrrgrrrgrrrrrgGr\n", |
|
|
|
|
|
"2 175 i0 3 grrrgrrrgrrrrGgrr\n", |
|
|
|
|
|
"3 175 i0 4 gGGrgrrrgrrrrrgrr\n", |
|
|
|
|
|
"4 175 i0 5 grrrgrrrgrrrrrgrG" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"output_type": "display_data" |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
"source": [ |
|
|
|
|
|
"display(self.match1.head())\n", |
|
|
|
|
|
"display(self.match2.head())\n", |
|
|
|
|
|
"display(self.match3.head())\n", |
|
|
|
|
|
"display(self.match4.head())\n", |
|
|
|
|
|
"display(self.match5.head())\n", |
|
|
|
|
|
"display(self.match6.head())\n", |
|
|
|
|
|
"display(self.matching.head())" |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"cell_type": "markdown", |
|
|
|
|
|
"metadata": {}, |
|
|
|
|
|
"source": [ |
|
|
|
|
|
"줄임말 목록\n", |
|
|
|
|
|
"- `f_` : 진입, from\n", |
|
|
|
|
|
"- `t_` : 진출, to\n", |
|
|
|
|
|
"- `vect` : 방향벡터, unit vector (`np.array([0.6, 0.8])`)\n", |
|
|
|
|
|
"- `rvec` : 방위, direction (동, 서, 남, 북, 북동, 북서, 남동, 남서)\n", |
|
|
|
|
|
"- `dire` : 정방향 방향벡터, unit vector to the right direction (`np.array([0,1])`)\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
"필요한 객체들 목록\n", |
|
|
|
|
|
"\n", |
|
|
|
|
|
"- `i2dire2rvec` : `inter_no` $\\mapsto$ `dire2rvec`\n", |
|
|
|
|
|
" - `dire2rvec` : `dire` $\\mapsto$ `rvec`\n", |
|
|
|
|
|
"- `i2f` : `inter_no` $\\mapsto$ `f_edges`\n", |
|
|
|
|
|
"- `i2t` : `inter_no` $\\mapsto$ `t_edges`\n", |
|
|
|
|
|
"- `i2f2dire` : `inter_no` $\\mapsto$ `f21dire`\n", |
|
|
|
|
|
" - `f2dire` : `from_edge` $\\mapsto$ `dire`\n", |
|
|
|
|
|
"- `i2t2dire` : `inter_no` $\\mapsto$ `t21dire`\n", |
|
|
|
|
|
" - `t2dire` : `to_edge` $\\mapsto$ `dire`" |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
"metadata": { |
|
|
|
|
|
"kernelspec": { |
|
|
|
|
|
"display_name": "sts", |
|
|
|
|
|
"language": "python", |
|
|
|
|
|
"name": "sts" |
|
|
|
|
|
}, |
|
|
|
|
|
"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.8.10" |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
"nbformat": 4, |
|
|
|
|
|
"nbformat_minor": 2 |
|
|
|
|
|
} |