Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Generating Emergency vehicles RandomTrips.py

You cannot specify a spread of absolute speeds, only a spread relative to the speed limit. Assuming your roads have an average speed o 50km/h this is how you define it:

--trip-attributes "departLane=\"best\" speedFactor=\"normc(1.4,0.2,1.2,1.6)\" color=\"255,255,255\""  --vehicle-class emergency

Explanation: speeds are defined as a truncated normal distribution centered on 1.4 (70km/h) with a deviation of 0.2 (10km/h) and truncated at 1.2 (60 km/h) and 1.6 (80 km/h).
Note, that the option --vehicle-class is needed so that all attributes are correctly assigned (the speedFactor normc defintion must get written into a vType)

Am Mo., 6. Dez. 2021 um 01:38 Uhr schrieb Nao Tomori <jeremiahferrer26@xxxxxxxxx>:
How can I set a max speed 70km/h that deviates 10km/h in speed. Meaning some ambulance travel 80km/h while some travel 60km/h using random trips

--trip-attributes "departLane=\"best\" maxspeed=\"70\" color=\"255,255,255\""

On Mon, Dec 6, 2021, 6:33 AM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
- when using your numbers in the documented formula it should read (3600 - 0) / 10 
- the argument for option '-p' must be a number, not a mathematical _expression_ (hence '-p 360')



Am So., 5. Dez. 2021 um 00:18 Uhr schrieb Nao Tomori <jeremiahferrer26@xxxxxxxxx>:

I'm sorry to bother but I'd like to follow up my question please correct me if I'm using the wrong syntax

So I tried using

--trip-attributes "departLane=\"best\" maxspeed=\"70\" color=\"255,255,255\""

With

-p (0 - 3600/10)

As I need 10 randomly scattered

 

But what I got was 1617 instances of yellow emergency vehicles, and I’m not sure whether maxspeed was in it

What I am doing wrong?

python "%SUMO_HOME%\tools\randomTrips.py" -n osm.net.xml --fringe-factor 5 -p (0 - 3600/10) -o osm.emergency.trips.xml -e 3600 --vehicle-class emergency --vclass emergency --prefix Am --min-distance 200 --trip-attributes "departLane=\"best\" maxspeed=\"70\" color=\"255,255,255\"" --fringe-start-attributes "departSpeed=\"max\"" --allow-fringe.min-length 1000 --lanes --validate

 Thank You in advance.


On Sat, Dec 4, 2021, 12:59 AM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
- speedDev is the standard deviation relative to the speed limit. The default is 0.1 which lets 68% of the vehicles drive at  90%-110% of the speed limit.
- fringeFactor increase the probability of vehicles to depart/arrive at the network fringe by the given factor (relative to departure/arrival within the network).
- vehicles always react to other traffic so you need TraCI to enforce a specific speed. (Unless you have a scenario without intersections and the specific vehicle has no leader vehicles).



Am Fr., 3. Dez. 2021 um 11:39 Uhr schrieb Starlight Charlotte <jeremiahferrer26@xxxxxxxxx>:

Dear Users,

 

I have generate both truck and passenger vehicles using Random trips, however I’d like to generate only 10 emergency vehicles randomly scattered in the span of 3600 seconds, with the max speed varying 70 km/h (give or take 10 km/h), also I’d like the model to look like a white ambulance.
Here’s my attempt so far:

 

python "%SUMO_HOME%\tools\randomTrips.py" -n osm.net.xml --fringe-factor 5 -p 2.225291 -o osm.emergency.trips.xml -e 3600 --vehicle-class emergency --vclass emergency --prefix Am --min-distance 200 --trip-attributes "departLane=\"best\" speedFactor=70 color=255,255,255

" --fringe-start-attributes "departSpeed=\"max\" speedDev=10 " --allow-fringe.min-length 1000 --lanes --validate

 


Also have questions:

I’m not so sure about the difference between speedFactor and speedDev?

How --fringe-factor works?

 

In my osm.passenger.trips.xml

I’d like to assign 1 passenger vehicle to have the max speed of 50km/h throughout the entire simulation

 

Sent from Mail for Windows

 


Virus-free. www.avast.com
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top