Setting Up Truck Bans
This guide explains how to configure Truck Ban restrictions for your logistical simulations.
Prerequisites
- Geofences: You must have defined the Geofences (Polygons) that represent the restricted areas.
- Rules: You must identify the Time Periods and Vehicle Types affected.
Step-by-Step Configuration
1. Define Geofence Rules
Define the truck ban rule by specifying the following parameters:
- Geofence: The restricted zone defined as a Polygon.
- Time Period: The start and end times of the ban (e.g., 08:00-10:00).
- Vehicle Type (Optional): If left blank, the rule applies to ALL vehicles. If specified, it applies only to that type.
2. Link Rule to Simulation
Ensure the created rule is linked to the specific Simulation or Project scope. This association tells the system to apply the ban logic during the execution of that specific project.
3. Enable Logistics Settings
In your Simulation configuration, locate the Logistics API Settings and configure the following parameters:
truckban_enabled: Set totrueto activate the feature.truckban_strategy: Choose your strategy:DEFAULT: Adjusts time windows for all vehicles.DUPLICATE_NODES: Duplicates nodes to apply restrictions only to specific vehicle types.
truckban_buffer_time_windows: (Optional) Set a safety buffer in seconds (default is1800i.e., 30 minutes).
4. Configure Vehicle Labels (If using Duplicate Strategy)
If you chose DUPLICATE_NODES, you must ensure your vehicles and vehicle types have matching labels.
- Ensure the
Vehicle Typeobject haslabelspopulated (e.g.,["6-wheeler"]). - The system uses these labels to match the restricted (duplicated) nodes to the correct vehicles:
- The duplicated node (restricted windows) will have
vehicle_labelsmatching the banned type. - The original node will have logic to exclude the banned type if it's assigned there, or allow others.
- The duplicated node (restricted windows) will have
Example Configuration
"logistics_api_settings": {
"truckban_enabled": true,
"truckban_strategy": "DUPLICATE_NODES",
"truckban_buffer_time_windows": 1800
}
Troubleshooting
Q: How many truck-ban geofences are supported?
There is no hard limit on the number of truckban geofences in a given simulation. Each simulation can be linked to multiple rules.
Q: What format should the geofence be?
The system currently supports Polygons. If you have a complex area or a MultiPolygon (e.g., disjointed areas like Manila), you may need to create separate Polygon rules for each section.