eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.49k stars 1.41k forks source link

permit setting all vType parameters #10430

Open namdre opened 2 years ago

namdre commented 2 years ago

there are a number of vType parameters (i.e. jmIgnoreFoeProb) that cannot currently by manipulated

(see #10427)

define new traci constants and functions:

namdre commented 2 years ago

Maybe it would be useful to write a small script that generates this code? This could also be re-used once we add more attributes (to any domain)

behrisch commented 2 years ago
rummel123 commented 1 year ago

I need to get the boardingDuration via traci. Maybe its possible to add the getBoardingDuration method provisionaly?

namdre commented 1 year ago

since you cannot change it via TraCI, why not parse it directly out of the simulation input files?

rummel123 commented 1 year ago

I need it for the drtOrtools.py and I don't want to parse the (unknown) simulation files.

namdre commented 1 year ago

@behrisch The constant 0x3f was used by @m-kro and then you changed it in 28c0b5f919a621ca846b9660ee7e0a81e6e846d3

It would probably make sense to add it as a placeholder (i.e. TRACI_CONST int RESERVED_FOR_XYZ_DO_NOT_USE = 0x3f)

behrisch commented 1 year ago

There is nothing wrong with using 0x3f it is just wasteful because we may want to keep it for a parameter applicable to "every" domain

MustaphaBichi commented 1 year ago

Sorry to ask you Namdre, can MinGap parameter be changed? if yes, Is it possible to set the new value in route definitions?

namdre commented 1 year ago

yes: traci.vehicletype.setMinGap and traci.vehicle.setMinGap.
If you want to load this from xml, you have to define it as <vType ... minGap="VALUE"/>

MustaphaBichi commented 1 year ago

yes: traci.vehicletype.setMinGap and traci.vehicle.setMinGap. If you want to load this from xml, you have to define it as <vType ... minGap="VALUE"/>

Thank you for your kind response.

MustaphaBichi commented 1 year ago

yes: traci.vehicletype.setMinGap and traci.vehicle.setMinGap. If you want to load this from xml, you have to define it as <vType ... minGap="VALUE"/>

I created additional file as seen below, in order to define two vehicle type; passenger, and bus, with minGap of 2m.

I loaded the type file in my configuration file with the code below. after running the simulation, there is no effect i.e only passenger car were shown.

Secondly, I created additional file as seen below, with the file extension add.xml I loaded the file while generating randomTrips, as seen in the code below, but only the defult setting was used (i.e pessenger car) C:\Sumo\My Sumo Work\sample>python randomTrips.py -n sample.net.xml --additional-file additional.add.xml -r sample.rou.xml -e 1000 -p 1 --validate Please.. can you help me out? I really want to create a network using randomTrip with multiple vehicle type (passenger, bus, and trunk), with minGap of 1m.
MustaphaBichi commented 1 year ago

I created additional file as seen below, in order to define two vehicle type; passenger, and bus, with minGap of 2m. `

<vType id="bus" minGap="2" length="12" vClass="bus"/>

I loaded the type file in my configuration file with the code below. after running the simulation, there is no effect i.e only passenger car were shown. I loaded the type file in my configuration file with the code below. After running the simulation, there is no effect i.e only passenger car were shown.`

Secondly, I created additional file as seen below, with the file extension add.xml `

<vType id="bus" minGap="2" length="12" vClass="bus"/>

`

I loaded the file while generating randomTrips, as seen in the code below, but only the defult setting was used (i.e pessenger car) C:\Users\musty\Sumo\My Sumo Work\sample>python randomTrips.py -n sample.net.xml --additional-file additional.add.xml -r sample.rou.xml -e 1000 -p 1 --validate

Please.. can you help me out? I really want to create a network using randomTrip with multiple vehicle type (passenger, bus, and trunk), with minGap of 1m.

namdre commented 1 year ago

see https://sumo.dlr.de/docs/Tools/Trip.html#setting_a_vehicle_type_from_an_external_file (but please don't post questions that are unrelated to the original ticket, rather open a new ticket)

MustaphaBichi commented 1 year ago

Noted, Thank you