Exemple #1
0
# Change to inspect mode
netedit.inspectMode()

# inspect E1
netedit.leftClick(match, 350, 250)

# obtain parameters reference
parametersReference = netedit.getParametersReference(match)

# unblock additional
netedit.changeBlockAdditional(comboboxAdditional, 6)

# change to move mode
netedit.moveMode()

# move E1 to right (must be allowed)
netedit.moveElement(match, 250, 250, 350, 250)

# Check undos and redos
netedit.undo(match, 5)
netedit.redo(match, 5)

# save additionals
netedit.saveAdditionals()

# save newtork
netedit.saveNetwork()

# quit netedit 
netedit.quit(neteditProcess, False, False)
Exemple #2
0
# select all lanes with disallow = "authority" and remove it
netedit.selectItems("Net Element", "lane", "disallow", "=authority")
netedit.deleteSelectedItems()

# select all lanes with disallow = "vip" and remove it
netedit.selectItems("Net Element", "lane", "disallow", "=vip")
netedit.deleteSelectedItems()

# select all lanes with disallow = "hov" and remove it
netedit.selectItems("Net Element", "lane", "disallow", "=hov")
netedit.deleteSelectedItems()

# select all lanes with disallow = "custom1" and remove it
netedit.selectItems("Net Element", "lane", "disallow", "=custom1")
netedit.deleteSelectedItems()

# select all lanes with disallow = "custom2" and remove it
netedit.selectItems("Net Element", "lane", "disallow", "=custom2")
netedit.deleteSelectedItems()

# select all lanes with disallow = "all" and remove it
# (we cannot use "=all" since "all" is expanded to include all vClassess)
netedit.selectItems("Net Element", "lane", "disallow", "all")
netedit.deleteSelectedItems()

# save newtork
netedit.saveNetwork()

# quit netedit
netedit.quit(neteditProcess)
Exemple #3
0
testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
neteditTestRoot = os.path.join(os.environ.get('TEXTTEST_HOME', testRoot),
                               'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select busStop
netedit.changeAdditional("busStop")

# create busStop in mode "reference left"
netedit.leftClick(match, 250, 250)

# go to shape mode
netedit.shapeMode()

# go to additional mode
netedit.changeShape("poly")

# create polygon
netedit.createSquaredPoly(match, 100, 50, 100, True)

# quit netedit saving all
netedit.quit(neteditProcess, True, True, True, True, True, True)
Exemple #4
0
# Change to inspect mode
netedit.inspectMode()

# inspect chargingStation
netedit.leftClick(match, 300, 250)

# obtain parameters reference
parametersReference = netedit.getParametersReference(match)

# unblock additional
netedit.changeBlockAdditional(comboboxAdditional, 8)

# change to move mode
netedit.moveMode()

# move chargingStation to right (must be allowed)
netedit.moveElement(match, 250, 250, 350, 250)

# Check undos and redos
netedit.undo(match, 5)
netedit.redo(match, 5)

# save additionals
netedit.saveAdditionals()

# save newtork
netedit.saveNetwork()

# quit netedit
netedit.quit(neteditProcess, False, False)
Exemple #5
0
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select busStop
netedit.changeAdditional("busStop")

# create busStop in mode "reference left"
netedit.leftClick(match, 250, 250)

# quit netedit
netedit.quit(neteditProcess, True, True, True, False)

# Open netedit again
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select busStop
netedit.changeAdditional("busStop")

# create busStop in mode "reference left"
netedit.leftClick(match, 250, 250)

# save newtork but don't save additionals
netedit.saveNetwork()