Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] jtrrouter --turn-defaults actual turn behavior

Hi everyone

When I set '--turn-defaults' to '0,0,1', only left-turn cars are included in simulation

The analogous behavior doesn't happen when I set to '0,1,0' (only straight) or '1,0,0' (only right-turns)


Is there anything I am missing?

Thank you in advance


Sincerely,

Marcelo d'Almeida
import os
import sys
import subprocess

# we need to import python modules from the $SUMO_HOME/tools directory
if 'SUMO_HOME' in os.environ:
    tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
    sys.path.append(tools)
else:
    sys.exit("please declare environment variable 'SUMO_HOME'")

from os.path import expanduser

import sumolib

home = expanduser("~")


net_file = home + '/temp/multi_intersection__right_on_red.net.xml'
base_route_file = home + '/temp/multi_intersection.base.rou.xml'

route_file = home + '/temp/multi_intersection.rou.xml'

JTRROUTER = sumolib.checkBinary('jtrrouter')
args = [JTRROUTER,
        '-n', net_file,
        '--turn-defaults', '0,1,0',
        '--route-files', base_route_file,
        '--accept-all-destinations',
        '--max-edges-factor', str(0.5),
        '-o', route_file]

subprocess.call(args)

Attachment: temp.zip
Description: Zip archive


Back to the top