신호생성 repo (24. 1. 5 ~).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

116 lines
2.7 KiB

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import os, sys, copy, argparse, json, pickle\n",
"import sumolib, traci\n",
"from tqdm import tqdm\n",
"from datetime import datetime\n",
"path_root = os.path.dirname(os.path.dirname(os.path.abspath('.')))\n",
"path_scr = os.path.join(path_root, 'scripts')\n",
"sys.path.append(path_scr)\n",
"from preprocess_daily import DailyPreprocessor\n",
"# from generate_signals import SignalGenerator"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"self = DailyPreprocessor(config_name = 'test_0731')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1. 데이터를 로드합니다.\n",
"1-1. 네트워크가 로드되었습니다.\n",
"1-2. 테이블들이 로드되었습니다.\n",
"1-5. 테이블을 표준화했습니다.\n",
"1-6. 주요 객체 (리스트, 딕셔너리)들을 저장했습니다.\n"
]
}
],
"source": [
"# 1. 데이터 불러오기\n",
"self.load_data()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2. 중간산출물을 생성합니다.\n",
"2-1. 매칭 테이블들을 생성했습니다.\n",
"2-2. 초기화 신호가 지정되었습니다. (우회전 : g)\n",
"2-3. 유턴 인덱스 / 비보호좌회전 인덱스를 지정했습니다.\n",
"2-4. 직진 및 좌회전(G)을 배정했습니다.\n",
"2-5. node2num_cycles.json를 저장했습니다.\n"
]
}
],
"source": [
"# 2. 중간산출물 만들기\n",
"self.get_intermediates()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3. 이슈사항을 저장합니다.\n"
]
}
],
"source": [
"# 3. 이슈사항 저장\n",
"self.write_issues()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "siggen_env",
"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.12.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}