sumo icon indicating copy to clipboard operation
sumo copied to clipboard

permit setting all vType parameters

Open namdre opened this issue 3 years ago • 14 comments

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

(see #10427)

define new traci constants and functions:

  • collisionMinGapFactor
  • imgFile
  • carFollowModel
  • personCapacity (cannot be set at the moment)
  • containerCapacity
  • boardingDuration
  • loadingDuration
  • scale
  • impatience
  • jmCrossingGap
  • jmIgnoreKeepClearTime
  • jmDriveAfterRedTime
  • jmDriveAfterYellowTime
  • jmDriveRedSpeed
  • jmIgnoreFoeProb
  • jmIgnoreFoeSpeed
  • jmIgnoreJunctionFoeProb
  • jmSigmaMinor
  • jmStoplineGap
  • jmTimegapMinor
  • startupDelay (#7832)
  • sigmaStep
  • timeToTeleport
  • timeToTeleportBidi
  • desiredMaxSpeed

namdre avatar Mar 28 '22 14:03 namdre

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)

namdre avatar Mar 29 '22 13:03 namdre

  • first check whether we have enough constants left because they also get passed to the vehicle
  • differentiate between first class and second class parameters (let jm* be second class as well as future cf model params EIDM etc.)

behrisch avatar Sep 02 '22 08:09 behrisch

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

rummel123 avatar Nov 09 '22 11:11 rummel123

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

namdre avatar Nov 09 '22 11:11 namdre

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

rummel123 avatar Nov 09 '22 11:11 rummel123

@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)

namdre avatar Dec 09 '22 09:12 namdre

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

behrisch avatar Dec 22 '22 09:12 behrisch

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

MustaphaBichi avatar Jun 19 '23 04:06 MustaphaBichi

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"/>

namdre avatar Jun 19 '23 05:06 namdre

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 avatar Jun 19 '23 13:06 MustaphaBichi

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. <vType id="car" minGap="2" length="5" vClass="passenger"/> <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.

Secondly, I created additional file as seen below, with the file extension add.xml <vType id="car" minGap="2" length="5" vClass="passenger"/> <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:\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 avatar Jun 22 '23 10:06 MustaphaBichi

I created additional file as seen below, in order to define two vehicle type; passenger, and bus, with minGap of 2m. <additional> <vType id="car" minGap="2" length="5" vClass="passenger"/> <vType id="bus" minGap="2" length="12" vClass="bus"/> </additional> 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 <routes> <vType id="car" minGap="2" length="5" vClass="passenger"/> <vType id="bus" minGap="2" length="12" vClass="bus"/> </routes>

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.

MustaphaBichi avatar Jun 22 '23 10:06 MustaphaBichi

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)

namdre avatar Jun 22 '23 10:06 namdre

Noted, Thank you

MustaphaBichi avatar Jun 22 '23 10:06 MustaphaBichi