simworld.citygen.route package
Submodules
simworld.citygen.route.route_generator module
Route generation module for creating travel routes in the simulation.
This module handles the creation of travel routes based on road segments and points of interest in the generated city, providing navigation paths for the simulation.
- class simworld.citygen.route.route_generator.RouteGenerator(config)
Bases:
objectGenerates routes between points of interest in the city.
This class creates travel routes along roads and between elements in the city, providing navigation paths for agents in the simulation.
- generate_route_along_road(road: Segment)
Generate a route along a road segment.
Creates a route with random points along a given road segment.
- Args:
road: The road segment to generate the route along.
- generate_route_based_on_elements(elements: List[Element])
Generate routes based on elements’ positions.
Creates routes connecting specific elements in the city.
- Args:
elements: List of elements to use as route endpoints.
- generate_target_point_randomly()
Generate a random target point based on available elements.
- Returns:
A randomly selected point based on an element’s position.
- get_point_around_label(point: Point, quadtrees: List[QuadTree], distance: float = 50, k: int = 5)
Get the label of a point based on its K nearest neighbors.
Analyzes the surroundings of a point to determine its contextual information.
- Args:
point: The point to analyze. quadtrees: List of quadtrees containing spatial data. distance: Search radius around the point. k: Number of nearest neighbors to consider.
- Returns:
Dictionary containing statistics about nearby elements and buildings.
simworld.citygen.route.route_manager module
Route manager module for generating and managing routes.
This module provides functionality to create and manage routes between points in the simulation.
Module contents
Route generation and management package.
This package provides functionality for generating and managing travel routes in the city. It includes tools for creating routes along roads, between points of interest, and managing route data for simulation purposes.