simworld.citygen.road package
Submodules
simworld.citygen.road.road_generator module
Road network generation module for the city simulation.
This module handles the procedural generation of road networks, including the creation of road segments, intersections, and the overall structure of the city’s transportation system.
- class simworld.citygen.road.road_generator.RoadGenerator(config, num_segments: int | None = None)
Bases:
objectHandles procedural road network generation.
- create_segment(start: Point, angle: float, length: float, is_highway: bool, t: float = 0) Segment
Create a new road segment with specified parameters.
- Args:
start: Starting point of the segment. angle: Direction angle in degrees. length: Length of the segment. is_highway: Whether this is a highway segment. t: Time parameter for generation sequencing.
- Returns:
A new road segment.
- generate_next_segments(segment: Segment)
Generate potential next segments from the current segment.
- Args:
segment: The current segment to generate branches from.
simworld.citygen.road.road_manager module
Road network management module for the city simulation.
This module provides functionality for managing road segments, including spatial indexing, conflict detection, and intersection identification.
Module contents
Road generation module for creating road networks in the simulation.
This module provides functionality to generate road networks based on various parameters and constraints, including road density, width, and connectivity.