diff --git a/ptcs/data/gogatsusai2024/railway_ui_v5.json b/ptcs/data/gogatsusai2024/railway_ui_v5.json new file mode 100644 index 0000000..c45234c --- /dev/null +++ b/ptcs/data/gogatsusai2024/railway_ui_v5.json @@ -0,0 +1,1136 @@ +{ + "platforms": { + "p00": { + "position": { + "x": 300, + "y": 280 + } + }, + "p01": { + "position": { + "x": 300, + "y": 440 + } + }, + "p02": { + "position": { + "x": 580, + "y": 200 + } + }, + "p03": { + "position": { + "x": 580, + "y": 520 + } + }, + "p04": { + "position": { + "x": 860, + "y": 200 + } + }, + "p05": { + "position": { + "x": 860, + "y": 440 + } + }, + "p06": { + "position": { + "x": 1140, + "y": 200 + } + }, + "p07": { + "position": { + "x": 1140, + "y": 520 + } + }, + "p08": { + "position": { + "x": 1420, + "y": 200 + } + }, + "p09": { + "position": { + "x": 1420, + "y": 360 + } + }, + "p10": { + "position": { + "x": 1420, + "y": 520 + } + }, + "p11": { + "position": { + "x": 1700, + "y": 280 + } + }, + "p12": { + "position": { + "x": 1700, + "y": 440 + } + } + }, + "junctions": { + "c121": { + "position": { + "x": 1760, + "y": 400 + } + }, + "c122": { + "position": { + "x": 1760, + "y": 480 + } + }, + "c123": { + "position": { + "x": 1640, + "y": 400 + } + }, + "c124": { + "position": { + "x": 1640, + "y": 480 + } + }, + "c125": { + "position": { + "x": 1480, + "y": 400 + } + }, + "c126": { + "position": { + "x": 1480, + "y": 480 + } + }, + "c127": { + "position": { + "x": 1200, + "y": 400 + } + }, + "c128": { + "position": { + "x": 1200, + "y": 480 + } + }, + "c129": { + "position": { + "x": 920, + "y": 400 + } + }, + "c131": { + "position": { + "x": 640, + "y": 400 + } + }, + "c132": { + "position": { + "x": 640, + "y": 480 + } + }, + "c133": { + "position": { + "x": 360, + "y": 400 + } + }, + "c134": { + "position": { + "x": 360, + "y": 480 + } + }, + "c135": { + "position": { + "x": 240, + "y": 400 + } + }, + "c136": { + "position": { + "x": 240, + "y": 480 + } + }, + "c137": { + "position": { + "x": 160, + "y": 360 + } + }, + "c138": { + "position": { + "x": 80, + "y": 360 + } + }, + "c139": { + "position": { + "x": 240, + "y": 320 + } + }, + "c140": { + "position": { + "x": 240, + "y": 240 + } + }, + "c141": { + "position": { + "x": 520, + "y": 320 + } + }, + "c142": { + "position": { + "x": 520, + "y": 240 + } + }, + "c144": { + "position": { + "x": 800, + "y": 320 + } + }, + "c145": { + "position": { + "x": 800, + "y": 240 + } + }, + "c146": { + "position": { + "x": 800, + "y": 160 + } + }, + "c147": { + "position": { + "x": 960, + "y": 320 + } + }, + "c148": { + "position": { + "x": 960, + "y": 240 + } + }, + "c149": { + "position": { + "x": 960, + "y": 160 + } + }, + "c151": { + "position": { + "x": 1080, + "y": 240 + } + }, + "c152": { + "position": { + "x": 1360, + "y": 320 + } + }, + "c153": { + "position": { + "x": 1360, + "y": 240 + } + }, + "c154": { + "position": { + "x": 1640, + "y": 320 + } + }, + "c156": { + "position": { + "x": 1640, + "y": 240 + } + }, + "c157": { + "position": { + "x": 1760, + "y": 240 + } + }, + "c158": { + "position": { + "x": 1760, + "y": 320 + } + }, + "c159": { + "position": { + "x": 1840, + "y": 320 + } + }, + "c160": { + "position": { + "x": 1920, + "y": 240 + } + }, + "c161": { + "position": { + "x": 1840, + "y": 400 + } + }, + "c162": { + "position": { + "x": 1920, + "y": 480 + } + }, + "j04": { + "position": { + "x": 760, + "y": 320 + } + }, + "j05": { + "position": { + "x": 1000, + "y": 240 + } + }, + "j06": { + "position": { + "x": 1040, + "y": 240 + } + }, + "j07": { + "position": { + "x": 1080, + "y": 320 + } + }, + "j12": { + "position": { + "x": 1040, + "y": 480 + } + }, + "j13": { + "position": { + "x": 1000, + "y": 400 + } + }, + "j14": { + "position": { + "x": 960, + "y": 400 + } + }, + "j15": { + "position": { + "x": 920, + "y": 480 + } + } + }, + "sections": { + "S00": { + "from": "c140", + "to": "c142", + "points": [ + { + "x": 240, + "y": 240 + }, + { + "x": 520, + "y": 240 + } + ], + "block_id": "b00" + }, + "S01": { + "from": "c139", + "to": "c141", + "points": [ + { + "x": 240, + "y": 320 + }, + { + "x": 520, + "y": 320 + } + ], + "block_id": "b01" + }, + "S08": { + "from": "c142", + "to": "c146", + "points": [ + { + "x": 520, + "y": 240 + }, + { + "x": 720, + "y": 240 + }, + { + "x": 760, + "y": 160 + }, + { + "x": 800, + "y": 160 + } + ], + "block_id": "b08" + }, + "S09": { + "from": "c141", + "to": "j04", + "points": [ + { + "x": 520, + "y": 320 + }, + { + "x": 760, + "y": 320 + } + ], + "block_id": "b09" + }, + "S10": { + "from": "j04", + "to": "c145", + "points": [ + { + "x": 760, + "y": 320 + }, + { + "x": 800, + "y": 240 + } + ], + "block_id": "b09" + }, + "S11": { + "from": "j04", + "to": "c144", + "points": [ + { + "x": 760, + "y": 320 + }, + { + "x": 800, + "y": 320 + } + ], + "block_id": "b09" + }, + "S12": { + "from": "c146", + "to": "c149", + "points": [ + { + "x": 800, + "y": 160 + }, + { + "x": 960, + "y": 160 + } + ], + "block_id": "b12" + }, + "S13": { + "from": "c145", + "to": "c148", + "points": [ + { + "x": 800, + "y": 240 + }, + { + "x": 960, + "y": 240 + } + ], + "block_id": "b13" + }, + "S14": { + "from": "c144", + "to": "c147", + "points": [ + { + "x": 800, + "y": 320 + }, + { + "x": 960, + "y": 320 + } + ], + "block_id": "b14" + }, + "S15": { + "from": "c149", + "to": "j05", + "points": [ + { + "x": 960, + "y": 160 + }, + { + "x": 1000, + "y": 240 + } + ], + "block_id": "b15" + }, + "S16": { + "from": "c148", + "to": "j05", + "points": [ + { + "x": 960, + "y": 240 + }, + { + "x": 1000, + "y": 240 + } + ], + "block_id": "b15" + }, + "S17": { + "from": "c147", + "to": "j07", + "points": [ + { + "x": 960, + "y": 320 + }, + { + "x": 1080, + "y": 320 + } + ], + "block_id": "b15" + }, + "S18": { + "from": "j05", + "to": "j06", + "points": [ + { + "x": 1000, + "y": 240 + }, + { + "x": 1040, + "y": 240 + } + ], + "block_id": "b15" + }, + "S19": { + "from": "j06", + "to": "c151", + "points": [ + { + "x": 1040, + "y": 240 + }, + { + "x": 1080, + "y": 240 + } + ], + "block_id": "b15" + }, + "S20": { + "from": "j06", + "to": "j07", + "points": [ + { + "x": 1040, + "y": 240 + }, + { + "x": 1080, + "y": 320 + } + ], + "block_id": "b15" + }, + "S21": { + "from": "c151", + "to": "c153", + "points": [ + { + "x": 1080, + "y": 240 + }, + { + "x": 1360, + "y": 240 + } + ], + "block_id": "b21" + }, + "S22": { + "from": "j07", + "to": "c152", + "points": [ + { + "x": 1080, + "y": 320 + }, + { + "x": 1360, + "y": 320 + } + ], + "block_id": "b22" + }, + "S23": { + "from": "c153", + "to": "c156", + "points": [ + { + "x": 1360, + "y": 240 + }, + { + "x": 1640, + "y": 240 + } + ], + "block_id": "b23" + }, + "S24": { + "from": "c152", + "to": "c154", + "points": [ + { + "x": 1360, + "y": 320 + }, + { + "x": 1640, + "y": 320 + } + ], + "block_id": "b24" + }, + "S25": { + "from": "c156", + "to": "c157", + "points": [ + { + "x": 1640, + "y": 240 + }, + { + "x": 1760, + "y": 240 + } + ], + "block_id": "b25" + }, + "S26": { + "from": "c154", + "to": "c158", + "points": [ + { + "x": 1640, + "y": 320 + }, + { + "x": 1760, + "y": 320 + } + ], + "block_id": "b26" + }, + "S30": { + "from": "c122", + "to": "c124", + "points": [ + { + "x": 1760, + "y": 480 + }, + { + "x": 1640, + "y": 480 + } + ], + "block_id": "b30" + }, + "S31": { + "from": "c121", + "to": "c123", + "points": [ + { + "x": 1760, + "y": 400 + }, + { + "x": 1640, + "y": 400 + } + ], + "block_id": "b31" + }, + "S32": { + "from": "c124", + "to": "c126", + "points": [ + { + "x": 1640, + "y": 480 + }, + { + "x": 1480, + "y": 480 + } + ], + "block_id": "b32" + }, + "S34": { + "from": "c123", + "to": "c125", + "points": [ + { + "x": 1640, + "y": 400 + }, + { + "x": 1480, + "y": 400 + } + ], + "block_id": "b32" + }, + "S39": { + "from": "c126", + "to": "c128", + "points": [ + { + "x": 1480, + "y": 480 + }, + { + "x": 1200, + "y": 480 + } + ], + "block_id": "b39" + }, + "S40": { + "from": "c125", + "to": "c127", + "points": [ + { + "x": 1480, + "y": 400 + }, + { + "x": 1200, + "y": 400 + } + ], + "block_id": "b40" + }, + "S41": { + "from": "c128", + "to": "j12", + "points": [ + { + "x": 1200, + "y": 480 + }, + { + "x": 1040, + "y": 480 + } + ], + "block_id": "b41" + }, + "S42": { + "from": "c127", + "to": "j13", + "points": [ + { + "x": 1200, + "y": 400 + }, + { + "x": 1000, + "y": 400 + } + ], + "block_id": "b42" + }, + "S43": { + "from": "j12", + "to": "j15", + "points": [ + { + "x": 1040, + "y": 480 + }, + { + "x": 920, + "y": 480 + } + ], + "block_id": "b43" + }, + "S44": { + "from": "j12", + "to": "j13", + "points": [ + { + "x": 1040, + "y": 480 + }, + { + "x": 1000, + "y": 400 + } + ], + "block_id": "b43" + }, + "S46": { + "from": "j13", + "to": "j14", + "points": [ + { + "x": 1000, + "y": 400 + }, + { + "x": 960, + "y": 400 + } + ], + "block_id": "b43" + }, + "S47": { + "from": "j14", + "to": "j15", + "points": [ + { + "x": 960, + "y": 400 + }, + { + "x": 920, + "y": 480 + } + ], + "block_id": "b43" + }, + "S48": { + "from": "j14", + "to": "c129", + "points": [ + { + "x": 960, + "y": 400 + }, + { + "x": 920, + "y": 400 + } + ], + "block_id": "b43" + }, + "S49": { + "from": "j15", + "to": "c132", + "points": [ + { + "x": 920, + "y": 480 + }, + { + "x": 640, + "y": 480 + } + ], + "block_id": "b49" + }, + "S50": { + "from": "c129", + "to": "c131", + "points": [ + { + "x": 920, + "y": 400 + }, + { + "x": 640, + "y": 400 + } + ], + "block_id": "b50" + }, + "S51": { + "from": "c132", + "to": "c134", + "points": [ + { + "x": 640, + "y": 480 + }, + { + "x": 360, + "y": 480 + } + ], + "block_id": "b51" + }, + "S52": { + "from": "c131", + "to": "c133", + "points": [ + { + "x": 640, + "y": 400 + }, + { + "x": 360, + "y": 400 + } + ], + "block_id": "b52" + }, + "S53": { + "from": "c136", + "to": "c138", + "points": [ + { + "x": 240, + "y": 480 + }, + { + "x": 80, + "y": 480 + }, + { + "x": 80, + "y": 360 + } + ], + "block_id": "b53" + }, + "S54": { + "from": "c135", + "to": "c137", + "points": [ + { + "x": 240, + "y": 400 + }, + { + "x": 160, + "y": 400 + }, + { + "x": 160, + "y": 360 + } + ], + "block_id": "b54" + }, + "S56": { + "from": "c137", + "to": "c139", + "points": [ + { + "x": 160, + "y": 360 + }, + { + "x": 160, + "y": 320 + }, + { + "x": 240, + "y": 320 + } + ], + "block_id": "b56" + }, + "S57": { + "from": "c138", + "to": "c140", + "points": [ + { + "x": 80, + "y": 360 + }, + { + "x": 80, + "y": 240 + }, + { + "x": 240, + "y": 240 + } + ], + "block_id": "b57" + }, + "S58": { + "from": "c157", + "to": "c160", + "points": [ + { + "x": 1760, + "y": 240 + }, + { + "x": 1920, + "y": 240 + } + ], + "block_id": "b58" + }, + "S59": { + "from": "c158", + "to": "c159", + "points": [ + { + "x": 1760, + "y": 320 + }, + { + "x": 1840, + "y": 320 + } + ], + "block_id": "b59" + }, + "S60": { + "from": "c160", + "to": "c162", + "points": [ + { + "x": 1920, + "y": 240 + }, + { + "x": 1920, + "y": 480 + } + ], + "block_id": "b60" + }, + "S61": { + "from": "c159", + "to": "c161", + "points": [ + { + "x": 1840, + "y": 320 + }, + { + "x": 1840, + "y": 400 + } + ], + "block_id": "b61" + }, + "S62": { + "from": "c162", + "to": "c122", + "points": [ + { + "x": 1920, + "y": 480 + }, + { + "x": 1760, + "y": 480 + } + ], + "block_id": "b62" + }, + "S63": { + "from": "c161", + "to": "c121", + "points": [ + { + "x": 1840, + "y": 400 + }, + { + "x": 1760, + "y": 400 + } + ], + "block_id": "b63" + }, + "S64": { + "from": "c134", + "to": "c136", + "points": [ + { + "x": 360, + "y": 480 + }, + { + "x": 240, + "y": 480 + } + ], + "block_id": "b51" + }, + "S65": { + "from": "c133", + "to": "c135", + "points": [ + { + "x": 360, + "y": 400 + }, + { + "x": 240, + "y": 400 + } + ], + "block_id": "b51" + } + } +} diff --git a/ptcs/docs/gogatsusai2024_v5.drawio b/ptcs/docs/gogatsusai2024_v5.drawio new file mode 100644 index 0000000..411e1b9 --- /dev/null +++ b/ptcs/docs/gogatsusai2024_v5.drawio @@ -0,0 +1,732 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ptcs/ptcs_control/control/fixed_block.py b/ptcs/ptcs_control/control/fixed_block.py index 1550fde..5f9ff39 100644 --- a/ptcs/ptcs_control/control/fixed_block.py +++ b/ptcs/ptcs_control/control/fixed_block.py @@ -101,13 +101,13 @@ def _calc_direction(self) -> None: t1: Train | None = None match current_section.block_id: case "b00": # 代々木上原 → 下北沢 - t1 = self.junctions["c18"].find_nearest_train() + t1 = self.junctions["c141"].find_nearest_train() case "b12": # 豪徳寺 → 経堂 - t1 = self.junctions["c24"].find_nearest_train() + t1 = self.junctions["c148"].find_nearest_train() case "b30": # 千歳船橋 ← 成城学園前 - t1 = self.junctions["j08"].find_nearest_train() + t1 = self.junctions["c123"].find_nearest_train() case "b41": # 豪徳寺 ← 経堂 - t1 = self.junctions["c41"].find_nearest_train() + t1 = self.junctions["j13"].find_nearest_train() if t1 and t1.type == TrainType.CommuterSemiExpress: # TODO @@ -138,7 +138,7 @@ def _calc_stop(self) -> None: case TrainType.LimitedExpress: stops = [] case TrainType.Local: - stops = ["S00", "S08", "S12", "S21", "S23", "S30", "S39", "S41", "S49", "S51", "S53"] + stops = ["S00", "S08", "S12", "S21", "S23", "S25", "S30", "S39", "S41", "S49", "S51", "S64"] case TrainType.CommuterSemiExpress: stops = [ "S00", @@ -155,8 +155,8 @@ def _calc_stop(self) -> None: "S40", "S49", "S50", - "S53", - "S54", + "S64", + "S65", ] case _: stops = [] diff --git a/ptcs/ptcs_control/gogatsusai2024.py b/ptcs/ptcs_control/gogatsusai2024.py index d30f1d7..4b504c2 100644 --- a/ptcs/ptcs_control/gogatsusai2024.py +++ b/ptcs/ptcs_control/gogatsusai2024.py @@ -181,75 +181,75 @@ def configure(control: FixedBlockControl) -> None: # control.add_train(t9) for sensor_position_id, uid, junction_id in [ - # ("P01", "0433ca30af6180", "c35"), - # ("P02", "047c6731af6180", "c34"), - # ("P03", "04117931af6180", "j08"), - # ("P04", "0497d230af6180", "c36"), - # # ("P05", "04d7932baf6180", "c38"), - # ("P06", "040e6f2daf6180", "c37"), - # ("P07", "04059229af6180", "c40"), - # ("P08", "04f1ac2baf6180", "c39"), - # ("P09", "0451002baf6180", "c41"), - # ("P10", "040a992aaf6181", "j12"), - # ("P11", "0494a12baf6180", "c42"), - # ("P12", "04299928af6180", "j15"), - # ("P13", "047d8129af6180", "c44"), - # ("P14", "042d962baf6180", "c43"), - # ("P15", "0455b128af6180", "c46"), - # ("P16", "04369a28af6180", "c45"), - # ("P17", "04a96f28af6180", "c49"), - # ("P18", "044be628af6180", "c48"), - # ("P19", "0489e22caf6180", "c50"), - ("P20", "044f62e1", "c17"), - ("P21", "4402d7e2", "c16"), - ("P22", "14ea36e1", "c18"), - ("P23", "b4aa5ee1", "j00"), - ("P24", "64175ae1", "c19"), - ("P25", "943a69e1", "j03"), - ("P26", "34d041e1", "c22"), - ("P27", "b4345fe1", "c21"), - ("P28", "04b966e1", "c20"), - ("P29", "840b83e2", "c25"), - ("P30", "f47992e2", "c24"), - ("P31", "44c495e2", "c23"), - ("P32", "84e8e3e2", "j07"), - ("P33", "6448cee2", "c26"), - ("P34", "74be8ee1", "c28"), - ("P35", "14df82e2", "c27"), - ("P36", "94e4e3e2", "c30"), - ("P37", "44086de1", "c29"), - ("P38", "c4225be1", "c32"), - ("P39", "44086de1", "c31"), - ("P40", "b49a5ee1", "c33"), - ("P41", "446dd7e2", "c38"), - ("P42", "74765ce1", "j08"), - ("P43", "84576be1", "c36"), - ("P44", "24f992e2", "j00"), - ("P45", "54c383e1", "c19"), - ("P46", "d413dee2", "c18"), - ("P47", "6467d7e2", "j00"), - ("P48", "445dd9e2", "c25"), - ("P49", "745935e1", "c24"), - ("P50", "740876e1", "c23"), - ("P51", "74f562e1", "c35"), - ("P52", "448f81e2", "c34"), - ("P53", "c42566e1", "j08"), - ("P54", "f4ed6ae1", "c36"), - # ("P65", "44e76ae1", "c38"), - ("P56", "145667e1", "c37"), - ("P57", "a4cac8e2", "c40"), - ("P58", "f49b68e1", "c39"), - ("P59", "048468e1", "c41"), - ("P60", "145f63e1", "j12"), - ("P61", "447f5de1", "c42"), - ("P62", "64da62e1", "j15"), - ("P63", "f493dde2", "c44"), - ("P64", "947968e1", "c43"), - ("P65", "0477cee2", "c46"), - ("P66", "b46e63e1", "c45"), - ("P67", "84d07ae1", "c49"), - ("P68", "241157e1", "c48"), - ("P69", "e4c0e3e2", "c50"), + # ("P01", "0433ca30af6180", ""), + # ("P02", "047c6731af6180", ""), + # ("P03", "04117931af6180", ""), + # ("P04", "0497d230af6180", ""), + # ("P05", "04d7932baf6180", ""), + # ("P06", "040e6f2daf6180", ""), + # ("P07", "04059229af6180", ""), + # ("P08", "04f1ac2baf6180", ""), + # ("P09", "0451002baf6180", ""), + # ("P10", "040a992aaf6181", ""), + # ("P11", "0494a12baf6180", ""), + # ("P12", "04299928af6180", ""), + # ("P13", "047d8129af6180", ""), + # ("P14", "042d962baf6180", ""), + # ("P15", "0455b128af6180", ""), + # ("P16", "04369a28af6180", ""), + # ("P17", "04a96f28af6180", ""), + # ("P18", "044be628af6180", ""), + # ("P19", "0489e22caf6180", ""), + # ("P20", "044f62e1", ""), + ("P21", "4402d7e2", "c121"), + ("P22", "14ea36e1", "c122"), + ("P23", "b4aa5ee1", "c123"), + ("P24", "64175ae1", "c124"), + ("P25", "943a69e1", "c125"), + ("P26", "34d041e1", "c126"), + ("P27", "b4345fe1", "c127"), + ("P28", "04b966e1", "c128"), + ("P29", "840b83e2", "c129"), + ("P30", "f47992e2", "j15"), + ("P31", "44c495e2", "c131"), + ("P32", "84e8e3e2", "c132"), + ("P33", "6448cee2", "c133"), + ("P34", "74be8ee1", "c134"), + ("P35", "14df82e2", "c135"), + ("P36", "94e4e3e2", "c136"), + ("P37", "44086de1", "c137"), + ("P38", "c4225be1", "c138"), + ("P39", "44086de1", "c139"), + ("P40", "b49a5ee1", "c140"), + ("P41", "446dd7e2", "c141"), + ("P42", "74765ce1", "c142"), + # ("P43", "84576be1", ""), + ("P44", "24f992e2", "c144"), + ("P45", "54c383e1", "c145"), + ("P46", "d413dee2", "c146"), + ("P47", "6467d7e2", "c147"), + ("P48", "445dd9e2", "c148"), + ("P49", "745935e1", "c149"), + ("P50", "740876e1", "j07"), + ("P51", "74f562e1", "c151"), + ("P52", "448f81e2", "c152"), + ("P53", "c42566e1", "c153"), + ("P54", "f4ed6ae1", "c154"), + # ("P55", "44e76ae1", ""), + ("P56", "145667e1", "c156"), + ("P57", "a4cac8e2", "c157"), + ("P58", "f49b68e1", "c158"), + ("P59", "048468e1", "c159"), + ("P60", "145f63e1", "c160"), + ("P61", "447f5de1", "c161"), + ("P62", "64da62e1", "c162"), + # ("P63", "f493dde2", ""), + # ("P64", "947968e1", ""), + # ("P65", "0477cee2", ""), + # ("P66", "b46e63e1", ""), + # ("P67", "84d07ae1", ""), + # ("P68", "241157e1", ""), + # ("P69", "e4c0e3e2", ""), ]: junction = control.junctions[junction_id] diff --git a/ptcs/ptcs_control/gogatsusai2024_generated.py b/ptcs/ptcs_control/gogatsusai2024_generated.py index c8a369c..c077f62 100644 --- a/ptcs/ptcs_control/gogatsusai2024_generated.py +++ b/ptcs/ptcs_control/gogatsusai2024_generated.py @@ -7,112 +7,102 @@ def configure(control: BaseControl) -> None: - c16 = Junction(id="c16") - c17 = Junction(id="c17") - c18 = Junction(id="c18") - c19 = Junction(id="c19") - c20 = Junction(id="c20") - c21 = Junction(id="c21") - c22 = Junction(id="c22") - c23 = Junction(id="c23") - c24 = Junction(id="c24") - c25 = Junction(id="c25") - c26 = Junction(id="c26") - c27 = Junction(id="c27") - c28 = Junction(id="c28") - c29 = Junction(id="c29") - c30 = Junction(id="c30") - c31 = Junction(id="c31") - c32 = Junction(id="c32") - c33 = Junction(id="c33") - c34 = Junction(id="c34") - c35 = Junction(id="c35") - c36 = Junction(id="c36") - c37 = Junction(id="c37") - c38 = Junction(id="c38") - c39 = Junction(id="c39") - c40 = Junction(id="c40") - c41 = Junction(id="c41") - c42 = Junction(id="c42") - c43 = Junction(id="c43") - c44 = Junction(id="c44") - c45 = Junction(id="c45") - c46 = Junction(id="c46") - c48 = Junction(id="c48") - c49 = Junction(id="c49") - c50 = Junction(id="c50") - j00 = Junction(id="j00") - j01 = Junction(id="j01") - j02 = Junction(id="j02") - j03 = Junction(id="j03") + c121 = Junction(id="c121") + c122 = Junction(id="c122") + c123 = Junction(id="c123") + c124 = Junction(id="c124") + c125 = Junction(id="c125") + c126 = Junction(id="c126") + c127 = Junction(id="c127") + c128 = Junction(id="c128") + c129 = Junction(id="c129") + c131 = Junction(id="c131") + c132 = Junction(id="c132") + c133 = Junction(id="c133") + c134 = Junction(id="c134") + c135 = Junction(id="c135") + c136 = Junction(id="c136") + c137 = Junction(id="c137") + c138 = Junction(id="c138") + c139 = Junction(id="c139") + c140 = Junction(id="c140") + c141 = Junction(id="c141") + c142 = Junction(id="c142") + c144 = Junction(id="c144") + c145 = Junction(id="c145") + c146 = Junction(id="c146") + c147 = Junction(id="c147") + c148 = Junction(id="c148") + c149 = Junction(id="c149") + c151 = Junction(id="c151") + c152 = Junction(id="c152") + c153 = Junction(id="c153") + c154 = Junction(id="c154") + c156 = Junction(id="c156") + c157 = Junction(id="c157") + c158 = Junction(id="c158") + c159 = Junction(id="c159") + c160 = Junction(id="c160") + c161 = Junction(id="c161") + c162 = Junction(id="c162") j04 = Junction(id="j04") j05 = Junction(id="j05") j06 = Junction(id="j06") j07 = Junction(id="j07") - j08 = Junction(id="j08") - j09 = Junction(id="j09") - j10 = Junction(id="j10") - j11 = Junction(id="j11") j12 = Junction(id="j12") + j13 = Junction(id="j13") + j14 = Junction(id="j14") j15 = Junction(id="j15") - control.add_junction(c16) - control.add_junction(c17) - control.add_junction(c18) - control.add_junction(c19) - control.add_junction(c20) - control.add_junction(c21) - control.add_junction(c22) - control.add_junction(c23) - control.add_junction(c24) - control.add_junction(c25) - control.add_junction(c26) - control.add_junction(c27) - control.add_junction(c28) - control.add_junction(c29) - control.add_junction(c30) - control.add_junction(c31) - control.add_junction(c32) - control.add_junction(c33) - control.add_junction(c34) - control.add_junction(c35) - control.add_junction(c36) - control.add_junction(c37) - control.add_junction(c38) - control.add_junction(c39) - control.add_junction(c40) - control.add_junction(c41) - control.add_junction(c42) - control.add_junction(c43) - control.add_junction(c44) - control.add_junction(c45) - control.add_junction(c46) - control.add_junction(c48) - control.add_junction(c49) - control.add_junction(c50) - control.add_junction(j00) - control.add_junction(j01) - control.add_junction(j02) - control.add_junction(j03) + control.add_junction(c121) + control.add_junction(c122) + control.add_junction(c123) + control.add_junction(c124) + control.add_junction(c125) + control.add_junction(c126) + control.add_junction(c127) + control.add_junction(c128) + control.add_junction(c129) + control.add_junction(c131) + control.add_junction(c132) + control.add_junction(c133) + control.add_junction(c134) + control.add_junction(c135) + control.add_junction(c136) + control.add_junction(c137) + control.add_junction(c138) + control.add_junction(c139) + control.add_junction(c140) + control.add_junction(c141) + control.add_junction(c142) + control.add_junction(c144) + control.add_junction(c145) + control.add_junction(c146) + control.add_junction(c147) + control.add_junction(c148) + control.add_junction(c149) + control.add_junction(c151) + control.add_junction(c152) + control.add_junction(c153) + control.add_junction(c154) + control.add_junction(c156) + control.add_junction(c157) + control.add_junction(c158) + control.add_junction(c159) + control.add_junction(c160) + control.add_junction(c161) + control.add_junction(c162) control.add_junction(j04) control.add_junction(j05) control.add_junction(j06) control.add_junction(j07) - control.add_junction(j08) - control.add_junction(j09) - control.add_junction(j10) - control.add_junction(j11) control.add_junction(j12) + control.add_junction(j13) + control.add_junction(j14) control.add_junction(j15) - S00 = Section(id="S00", length=80.0, block_id="b00") - S01 = Section(id="S01", length=80.0, block_id="b01") - S02 = Section(id="S02", length=60.0, block_id="b02") - S03 = Section(id="S03", length=44.721359549995796, block_id="b02") - S04 = Section(id="S04", length=20.0, block_id="b02") - S05 = Section(id="S05", length=20.0, block_id="b02") - S06 = Section(id="S06", length=44.721359549995796, block_id="b02") - S07 = Section(id="S07", length=20.0, block_id="b02") + S00 = Section(id="S00", length=140.0, block_id="b00") + S01 = Section(id="S01", length=140.0, block_id="b01") S08 = Section(id="S08", length=164.72135954999578, block_id="b08") S09 = Section(id="S09", length=120.0, block_id="b09") S10 = Section(id="S10", length=44.721359549995796, block_id="b09") @@ -130,44 +120,40 @@ def configure(control: BaseControl) -> None: S22 = Section(id="S22", length=140.0, block_id="b22") S23 = Section(id="S23", length=140.0, block_id="b23") S24 = Section(id="S24", length=140.0, block_id="b24") - S25 = Section(id="S25", length=140.0, block_id="b25") - S26 = Section(id="S26", length=120.0, block_id="b26") - S27 = Section(id="S27", length=120.0, block_id="b27") - S28 = Section(id="S28", length=60.0, block_id="b28") - S29 = Section(id="S29", length=80.0, block_id="b29") + S25 = Section(id="S25", length=60.0, block_id="b25") + S26 = Section(id="S26", length=60.0, block_id="b26") S30 = Section(id="S30", length=60.0, block_id="b30") S31 = Section(id="S31", length=60.0, block_id="b31") - S32 = Section(id="S32", length=20.0, block_id="b32") - S33 = Section(id="S33", length=44.721359549995796, block_id="b32") - S34 = Section(id="S34", length=60.0, block_id="b32") - S35 = Section(id="S35", length=20.0, block_id="b32") - S36 = Section(id="S36", length=40.0, block_id="b32") - S37 = Section(id="S37", length=44.721359549995796, block_id="b32") - S38 = Section(id="S38", length=20.0, block_id="b32") + S32 = Section(id="S32", length=80.0, block_id="b32") + S34 = Section(id="S34", length=80.0, block_id="b32") S39 = Section(id="S39", length=140.0, block_id="b39") S40 = Section(id="S40", length=140.0, block_id="b40") S41 = Section(id="S41", length=80.0, block_id="b41") - S42 = Section(id="S42", length=80.0, block_id="b42") + S42 = Section(id="S42", length=100.0, block_id="b42") S43 = Section(id="S43", length=60.0, block_id="b43") - S45 = Section(id="S45", length=60.0, block_id="b43") + S44 = Section(id="S44", length=44.721359549995796, block_id="b43") + S46 = Section(id="S46", length=20.0, block_id="b43") + S47 = Section(id="S47", length=44.721359549995796, block_id="b43") + S48 = Section(id="S48", length=20.0, block_id="b43") S49 = Section(id="S49", length=140.0, block_id="b49") S50 = Section(id="S50", length=140.0, block_id="b50") S51 = Section(id="S51", length=140.0, block_id="b51") S52 = Section(id="S52", length=140.0, block_id="b52") S53 = Section(id="S53", length=140.0, block_id="b53") - S54 = Section(id="S54", length=120.0, block_id="b54") - S55 = Section(id="S55", length=120.0, block_id="b55") + S54 = Section(id="S54", length=60.0, block_id="b54") S56 = Section(id="S56", length=60.0, block_id="b56") - S57 = Section(id="S57", length=80.0, block_id="b57") + S57 = Section(id="S57", length=140.0, block_id="b57") + S58 = Section(id="S58", length=80.0, block_id="b58") + S59 = Section(id="S59", length=40.0, block_id="b59") + S60 = Section(id="S60", length=120.0, block_id="b60") + S61 = Section(id="S61", length=40.0, block_id="b61") + S62 = Section(id="S62", length=80.0, block_id="b62") + S63 = Section(id="S63", length=40.0, block_id="b63") + S64 = Section(id="S64", length=60.0, block_id="b51") + S65 = Section(id="S65", length=60.0, block_id="b51") control.add_section(S00) control.add_section(S01) - control.add_section(S02) - control.add_section(S03) - control.add_section(S04) - control.add_section(S05) - control.add_section(S06) - control.add_section(S07) control.add_section(S08) control.add_section(S09) control.add_section(S10) @@ -187,33 +173,35 @@ def configure(control: BaseControl) -> None: control.add_section(S24) control.add_section(S25) control.add_section(S26) - control.add_section(S27) - control.add_section(S28) - control.add_section(S29) control.add_section(S30) control.add_section(S31) control.add_section(S32) - control.add_section(S33) control.add_section(S34) - control.add_section(S35) - control.add_section(S36) - control.add_section(S37) - control.add_section(S38) control.add_section(S39) control.add_section(S40) control.add_section(S41) control.add_section(S42) control.add_section(S43) - control.add_section(S45) + control.add_section(S44) + control.add_section(S46) + control.add_section(S47) + control.add_section(S48) control.add_section(S49) control.add_section(S50) control.add_section(S51) control.add_section(S52) control.add_section(S53) control.add_section(S54) - control.add_section(S55) control.add_section(S56) control.add_section(S57) + control.add_section(S58) + control.add_section(S59) + control.add_section(S60) + control.add_section(S61) + control.add_section(S62) + control.add_section(S63) + control.add_section(S64) + control.add_section(S65) A, B = SectionConnection.A, SectionConnection.B THROUGH, DIVERGING, CONVERGING = ( @@ -221,111 +209,103 @@ def configure(control: BaseControl) -> None: JunctionConnection.DIVERGING, JunctionConnection.CONVERGING, ) - control.connect(S00, A, c16, THROUGH) - control.connect(S00, B, j00, CONVERGING) - control.connect(S01, A, c17, THROUGH) - control.connect(S01, B, c18, THROUGH) - control.connect(S02, A, j00, THROUGH) - control.connect(S02, B, j03, THROUGH) - control.connect(S03, A, j00, DIVERGING) - control.connect(S03, B, j01, DIVERGING) - control.connect(S04, A, c18, CONVERGING) - control.connect(S04, B, j01, THROUGH) - control.connect(S05, A, j01, CONVERGING) - control.connect(S05, B, j02, CONVERGING) - control.connect(S06, A, j02, DIVERGING) - control.connect(S06, B, j03, DIVERGING) - control.connect(S07, A, j02, THROUGH) - control.connect(S07, B, c19, THROUGH) - control.connect(S08, A, j03, CONVERGING) - control.connect(S08, B, c20, THROUGH) - control.connect(S09, A, c19, CONVERGING) + control.connect(S00, A, c140, THROUGH) + control.connect(S00, B, c142, THROUGH) + control.connect(S01, A, c139, THROUGH) + control.connect(S01, B, c141, THROUGH) + control.connect(S08, A, c142, CONVERGING) + control.connect(S08, B, c146, THROUGH) + control.connect(S09, A, c141, CONVERGING) control.connect(S09, B, j04, CONVERGING) control.connect(S10, A, j04, DIVERGING) - control.connect(S10, B, c21, THROUGH) + control.connect(S10, B, c145, THROUGH) control.connect(S11, A, j04, THROUGH) - control.connect(S11, B, c22, THROUGH) - control.connect(S12, A, c20, CONVERGING) - control.connect(S12, B, c23, THROUGH) - control.connect(S13, A, c21, CONVERGING) - control.connect(S13, B, c24, THROUGH) - control.connect(S14, A, c22, CONVERGING) - control.connect(S14, B, c25, THROUGH) - control.connect(S15, A, c23, CONVERGING) + control.connect(S11, B, c144, THROUGH) + control.connect(S12, A, c146, CONVERGING) + control.connect(S12, B, c149, THROUGH) + control.connect(S13, A, c145, CONVERGING) + control.connect(S13, B, c148, THROUGH) + control.connect(S14, A, c144, CONVERGING) + control.connect(S14, B, c147, THROUGH) + control.connect(S15, A, c149, CONVERGING) control.connect(S15, B, j05, DIVERGING) - control.connect(S16, A, c24, CONVERGING) + control.connect(S16, A, c148, CONVERGING) control.connect(S16, B, j05, THROUGH) - control.connect(S17, A, c25, CONVERGING) + control.connect(S17, A, c147, CONVERGING) control.connect(S17, B, j07, THROUGH) control.connect(S18, A, j05, CONVERGING) control.connect(S18, B, j06, CONVERGING) control.connect(S19, A, j06, THROUGH) - control.connect(S19, B, c26, THROUGH) + control.connect(S19, B, c151, THROUGH) control.connect(S20, A, j06, DIVERGING) control.connect(S20, B, j07, DIVERGING) - control.connect(S21, A, c26, CONVERGING) - control.connect(S21, B, c27, THROUGH) + control.connect(S21, A, c151, CONVERGING) + control.connect(S21, B, c153, THROUGH) control.connect(S22, A, j07, CONVERGING) - control.connect(S22, B, c28, THROUGH) - control.connect(S23, A, c27, CONVERGING) - control.connect(S23, B, c29, THROUGH) - control.connect(S24, A, c28, CONVERGING) - control.connect(S24, B, c30, THROUGH) - control.connect(S25, A, c29, CONVERGING) - control.connect(S25, B, c31, THROUGH) - control.connect(S26, A, c30, CONVERGING) - control.connect(S26, B, c32, THROUGH) - control.connect(S27, A, c31, CONVERGING) - control.connect(S27, B, c33, THROUGH) - control.connect(S28, A, c32, CONVERGING) - control.connect(S28, B, c35, THROUGH) - control.connect(S29, A, c33, CONVERGING) - control.connect(S29, B, c34, THROUGH) - control.connect(S30, A, c34, CONVERGING) - control.connect(S30, B, c36, THROUGH) - control.connect(S31, A, c35, CONVERGING) - control.connect(S31, B, j08, CONVERGING) - control.connect(S32, A, c36, CONVERGING) - control.connect(S32, B, j09, THROUGH) - control.connect(S33, A, j08, DIVERGING) - control.connect(S33, B, j09, DIVERGING) - control.connect(S34, A, j08, THROUGH) - control.connect(S34, B, j11, THROUGH) - control.connect(S35, A, j09, CONVERGING) - control.connect(S35, B, j10, CONVERGING) - control.connect(S36, A, j10, THROUGH) - control.connect(S36, B, c37, THROUGH) - control.connect(S37, A, j10, DIVERGING) - control.connect(S37, B, j11, DIVERGING) - control.connect(S38, A, j11, CONVERGING) - control.connect(S38, B, c38, THROUGH) - control.connect(S39, A, c37, CONVERGING) - control.connect(S39, B, c39, THROUGH) - control.connect(S40, A, c38, CONVERGING) - control.connect(S40, B, c40, THROUGH) - control.connect(S41, A, c39, CONVERGING) - control.connect(S41, B, j12, THROUGH) - control.connect(S42, A, c40, CONVERGING) - control.connect(S42, B, c41, THROUGH) - control.connect(S43, A, j12, CONVERGING) + control.connect(S22, B, c152, THROUGH) + control.connect(S23, A, c153, CONVERGING) + control.connect(S23, B, c156, THROUGH) + control.connect(S24, A, c152, CONVERGING) + control.connect(S24, B, c154, THROUGH) + control.connect(S25, A, c156, CONVERGING) + control.connect(S25, B, c157, THROUGH) + control.connect(S26, A, c154, CONVERGING) + control.connect(S26, B, c158, THROUGH) + control.connect(S30, A, c122, THROUGH) + control.connect(S30, B, c124, THROUGH) + control.connect(S31, A, c121, THROUGH) + control.connect(S31, B, c123, THROUGH) + control.connect(S32, A, c124, CONVERGING) + control.connect(S32, B, c126, THROUGH) + control.connect(S34, A, c123, CONVERGING) + control.connect(S34, B, c125, THROUGH) + control.connect(S39, A, c126, CONVERGING) + control.connect(S39, B, c128, THROUGH) + control.connect(S40, A, c125, CONVERGING) + control.connect(S40, B, c127, THROUGH) + control.connect(S41, A, c128, CONVERGING) + control.connect(S41, B, j12, CONVERGING) + control.connect(S42, A, c127, CONVERGING) + control.connect(S42, B, j13, THROUGH) + control.connect(S43, A, j12, THROUGH) control.connect(S43, B, j15, THROUGH) - control.connect(S45, A, c41, CONVERGING) - control.connect(S45, B, c42, THROUGH) + control.connect(S44, A, j12, DIVERGING) + control.connect(S44, B, j13, DIVERGING) + control.connect(S46, A, j13, CONVERGING) + control.connect(S46, B, j14, CONVERGING) + control.connect(S47, A, j14, DIVERGING) + control.connect(S47, B, j15, DIVERGING) + control.connect(S48, A, j14, THROUGH) + control.connect(S48, B, c129, THROUGH) control.connect(S49, A, j15, CONVERGING) - control.connect(S49, B, c43, THROUGH) - control.connect(S50, A, c42, CONVERGING) - control.connect(S50, B, c44, THROUGH) - control.connect(S51, A, c43, CONVERGING) - control.connect(S51, B, c45, THROUGH) - control.connect(S52, A, c44, CONVERGING) - control.connect(S52, B, c46, THROUGH) - control.connect(S53, A, c45, CONVERGING) - control.connect(S53, B, c48, THROUGH) - control.connect(S54, A, c46, CONVERGING) - control.connect(S54, B, c49, THROUGH) - control.connect(S55, A, c48, CONVERGING) - control.connect(S55, B, c50, THROUGH) - control.connect(S56, A, c49, CONVERGING) - control.connect(S56, B, c17, CONVERGING) - control.connect(S57, A, c50, CONVERGING) - control.connect(S57, B, c16, CONVERGING) + control.connect(S49, B, c132, THROUGH) + control.connect(S50, A, c129, CONVERGING) + control.connect(S50, B, c131, THROUGH) + control.connect(S51, A, c132, CONVERGING) + control.connect(S51, B, c134, THROUGH) + control.connect(S52, A, c131, CONVERGING) + control.connect(S52, B, c133, THROUGH) + control.connect(S53, A, c136, THROUGH) + control.connect(S53, B, c138, THROUGH) + control.connect(S54, A, c135, THROUGH) + control.connect(S54, B, c137, THROUGH) + control.connect(S56, A, c137, CONVERGING) + control.connect(S56, B, c139, CONVERGING) + control.connect(S57, A, c138, CONVERGING) + control.connect(S57, B, c140, CONVERGING) + control.connect(S58, A, c157, CONVERGING) + control.connect(S58, B, c160, THROUGH) + control.connect(S59, A, c158, CONVERGING) + control.connect(S59, B, c159, THROUGH) + control.connect(S60, A, c160, CONVERGING) + control.connect(S60, B, c162, THROUGH) + control.connect(S61, A, c159, CONVERGING) + control.connect(S61, B, c161, THROUGH) + control.connect(S62, A, c162, CONVERGING) + control.connect(S62, B, c122, CONVERGING) + control.connect(S63, A, c161, CONVERGING) + control.connect(S63, B, c121, CONVERGING) + control.connect(S64, A, c134, CONVERGING) + control.connect(S64, B, c136, CONVERGING) + control.connect(S65, A, c133, CONVERGING) + control.connect(S65, B, c135, CONVERGING) diff --git a/ptcs/ptcs_ui/src/config/ui.ts b/ptcs/ptcs_ui/src/config/ui.ts index 79c8e85..b31f05d 100644 --- a/ptcs/ptcs_ui/src/config/ui.ts +++ b/ptcs/ptcs_ui/src/config/ui.ts @@ -1,6 +1,6 @@ import { DEFAULT_THEME } from "@mantine/core"; import { RailwayUI } from "../types"; -import generated from "../../../data/gogatsusai2024/railway_ui_v4.json"; +import generated from "../../../data/gogatsusai2024/railway_ui_v5.json"; // 色の一覧: https://v5.mantine.dev/theming/colors/#default-colors