<jupyter_start><jupyter_text>Tutorial: Batch ProcessingThis tutorial explains how to use the batch processing script to solve CommonRoad planning problems in parallel. The configuration for batch processing is stored in `batch_processing_config.yaml`. Some of the parameters are explained as follows:* **input_path**: input directory of your intended CommonRoad scenarios.* **output_path**: output directory of CommonRoad solution files.* **overwrite**: whether the existing solution files should be overwritten.* **validate_solution**: check the validity of the solutions with the feasibility checker.* **num_worker_processes**: the number of parallel executions of motion planners.Parameters specified under the `default` block will be applied to all scenarios. If you wish to specify a different paramter for specific scenarios, simply insert a new block with the content of the `default` block copied, and overwrite parameters therein. This new block should be named after the ID of the sceanrio that you wish to aplly the parameters to. Related parameters are explained as follows:* **vehicle_model**: model of the vehicle, valid values: **PM, KS, ST and MB**. Refer to [Vehicle Models](https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/-/blob/master/vehicleModels_commonRoad.pdf) for more information.* **vehicle_type**: type of the vehicle, valid values: **FORD_ESCORT, BMW_320i and VW_VANAGON**.* **cost_function**: id of cost function. Refer to [Cost Functions](https://gitlab.lrz.de/tum-cps/commonroad-cost-functions/-/blob/master/costFunctions_commonRoad.pdf) for more information.* **planner**: the planner that is used to solve for solutions, possible values are: bfs, dfs, dls, ucs, gbfs, astar, student, student_example* **planning_problem_idx**: index of the planning problem. for cooperative scenarios: 0, 1, 2, ..., otherwise: 0* **max_tree_depth**: maximum depth of the search tree* **timeout**: timeout time for motion planner [s].Note: the paths can either be **relative** or **absolute**.To start the search with batch processing, you can either directly run `SMP/batch_processing/batch_processing_parallel.py` in IDEs (e.g. PyCharm) with `commonroad-search/` marked as sources root, or run the following script.  Parallel Batch ProcessingIn parallel batch processing, the search are carried out on multiple threads simultaneously. This reduces the overall time required to test your algorithm on all the given scenarios. One drawback is that it is not very easy to debug your code with parallel batch processing.<jupyter_code>%load_ext autoreload
%autoreload 2

import os
import sys

# add the folder containing batch processing script into python path
sys.path.append(os.path.join(os.getcwd(), "../../"))

from SMP.batch_processing.batch_processing_parallel import run_parallel_processing
run_parallel_processing()<jupyter_output><empty_output><jupyter_text>Sequential Batch ProcessingAlternatively, one can use the `SMP/batch_processing/batch_processing_sequential.py` script to carry out the search sequentially on a single thread. This is a more user-friendly approach if you wish you debug your code in IDES (e.g. creating breakpoints in PyCharm) but still have it run against multiple scenarios.<jupyter_code>from SMP.batch_processing.batch_processing_sequential import run_sequential_processing
run_sequential_processing()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07910271546635184, 'fraction_numerical': 0.0023612750885478157, 'mean_word_length': 6.00206611570248, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '117957', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 888, 'n_tokens_neox': 847, 'n_words': 391, 'path': 'tutorials/4_batch_processing/tutorial_batch_processing.ipynb', 'repo_name': 'ZhuowenZou/CSE203MotionPlanning', 'size': '3388'}