Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] How to create random trips for N vehicles per hour split between a ratio of two vehicle types?
  • From: Devon Fazekas <thomas-d@xxxxxxxxxx>
  • Date: Sun, 16 Oct 2022 16:43:07 +0000
  • Accept-language: en-CA, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sOJ8kHX6x9DAbQRhZTuhCuRTWm0fIuTqZ9zeXhdiRRg=; b=c1yhbN+A7ndRfAHDtZjCK+k31zlVvl6T85U1FJihp+sDKSPvAYKgr4wMvP3jDyUnWk6BRL/2CvqsKwB0xBPmq4OhQn2+HoH85g0oqvIA00Z41aSMk/q7ctdwvNy1PRh2942AK+rhkWnZokVrd++hfnaEBKGO5Vw+8jywSXEjkQYqNjahWaNveb/dWt5mwBIM/DxhsxTGkYDwpykHVO422QbVzvblrso9MkgvWnmz4JLqlIRwIdtYgAOAZkf+AdhBIZggfr2WFO4twksG8XNcusj1LGh1aV9GrvG3vKWO8sNnwbmCSVvLAgOyVWQmJlIcPj+BaMS8Eh7Nn8fRavI5Ag==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WtnZA/47vo9LPgI6WxcHGkt6dkhDqWk5GjzkotCiQV05lFsIYGh6Vef6rxE1XUrywMmZGCHxrYo8GdO6YLcCfoPb+hJ4merTbqFKwSul7seyUJv422lmDzyQRd2o1DB5qeJSRu5sD7eHkcqEBftAaI2ivQPQeYzSvHfWDPFel31KZrPlXG2+Ml2TusIGbAeCuS/tYsybgLr5ZNvq/AyDcDtXT1VpHpQor2vW2OY2439ozHsGDLEc4xav+Eze1iI8TLpXvh1FeyAKZJ8Dwu7Uq+Sq7c9cGGGyBG+jvA5uUGZj3HBMe+vQmeehsz7K/rgMy8+c5lq3+g9uzEALYChgEg==
  • Delivered-to: sumo-user@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/sumo-user/>
  • List-help: <mailto:sumo-user-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHY4Xyqa+TGFKgaIUOpHahNlVRjGA==
  • Thread-topic: How to create random trips for N vehicles per hour split between a ratio of two vehicle types?

I have two types of vehicles, A and B. The total number of vehicles must be split between both types. I'm testing if the number of SSM conflicts reduces as the penetration ratio of type B vehicles increase from 0%, 25%, 50%, and so on. I also need to repeat for increasing traffic demand (1000 veh/hr, 1500 veh/hr, 2000 veh/hr).

So, for the base case, I need to insert 1000 vehicles per hour (all as type A).

 

 

How can I create random trips of `N` vehicles per hour, where 75% of them are of vehicle type `A` and 25% of type `B`.

 

My current approach uses RandomTrips.py with the –insertion-rate` option equal to `N` and a `vTypeDistribution` containing two vehicles types leveraging the `probability` attribute with values `A` and `B`.

 

 

randomTrips.py

--net-file="grid.net.xml"

--output-trip-file="trips.trips.xml"

--trip-attributes='departPos="random" departSpeed="max" type="civilianVehicles" departLane="best"'

--min-distance=1500

--allow-fringe

--fringe-factor="10000"

--insertion-rate=100

 

 

This approach doesn’t guarantee the ratios I need as it relies on probability.


Back to the top