jupedsim_scenarios.simulation_init#

Attributes#

Functions#

build_agent_path_state(→ dict[str, Any] | None)

Build DS routing state as origin->weighted-next mapping.

create_agent_parameters(model_type, position, params)

Create appropriate agent parameters based on the model type

initialize_simulation_from_json(→ tuple[dict[str, ...)

Initialize a JuPedSim simulation from a JSON configuration with fallback logic.

install_if_missing(pip_name[, import_name])

Pip install missing packages.

is_package_installed(→ bool)

Check if packages is installed.

Module Contents#

build_agent_path_state(variant_data: dict[str, Any], journey_key: str | None, transitions: list[dict[str, Any]], direct_steering_info: dict[str, dict[str, Any]], waypoint_routing: dict[str, Any] | None, seed: int, agent_id: int, initial_position: tuple[float, float] | None = None, agent_radius: float = 0.2) dict[str, Any] | None[source]#

Build DS routing state as origin->weighted-next mapping.

create_agent_parameters(model_type: str, position: tuple, params: dict, global_params=None, journey_id=None, stage_id=None)[source]#

Create appropriate agent parameters based on the model type

initialize_simulation_from_json(json_path: str, simulation: jupedsim.Simulation, walkable_area: pedpy.WalkableArea, seed: int = 42, model_type: str = 'CollisionFreeSpeedModel', global_parameters=None) tuple[dict[str, Any], list[tuple[float, float]], dict[int, float], dict[str, Any]][source]#

Initialize a JuPedSim simulation from a JSON configuration with fallback logic.

install_if_missing(pip_name: str, import_name: str | None = None)[source]#

Pip install missing packages.

is_package_installed(import_name: str) bool[source]#

Check if packages is installed.

clip_exit_to_walkable[source]#
find_nearest_exit[source]#
random_point_in_polygon[source]#
required_packages = [('jupedsim', 'jupedsim'), ('shapely', 'shapely'), ('numpy', 'numpy'), ('matplotlib',...[source]#
sample_agent_values[source]#