Ejemplo n.º 1
0
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select containerStop
netedit.changeAdditional(comboboxAdditional, 3)

# change reference to center
netedit.modifyStoppingPlaceReference(comboboxAdditional, 8, 2)

# create containerStop in mode "reference center"
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move containerStop to left
netedit.moveElement(match, 150, 275, 50, 275)

# move back
netedit.moveElement(match, 50, 275, 150, 275)

# move containerStop to right
netedit.moveElement(match, 150, 275, 250, 275)

# move back
netedit.moveElement(match, 250, 275, 150, 275)

# move containerStop to left overpassing lane
netedit.moveElement(match, 150, 275, -100, 275)

# move back
netedit.moveElement(match, 0, 275, 150, 275)
Ejemplo n.º 2
0
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select containerStop
netedit.changeAdditional(comboboxAdditional, 3)

# change reference to center
netedit.modifyStoppingPlaceReference(comboboxAdditional, 8, 2)

# create containerStop in mode "reference center"
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move containerStop to right
netedit.moveElement(match, 150, 275, 250, 275)

# Change to inspect mode
netedit.inspectMode()

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

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

# block additional
netedit.changeBlockAdditional(comboboxAdditional, 5)

# change to move mode
netedit.moveMode()
Ejemplo n.º 3
0
netedit.leftClick(match, 100, 100)

# block POILane
netedit.modifyBoolAttribute(13)

# inspect second POILane
netedit.leftClick(match, 100, 350)

# block POILane
netedit.modifyBoolAttribute(13)

# go to move mode
netedit.moveMode()

# try to move first POILane to left down
netedit.moveElement(match, -80, 55, 200, 60)

# try to move second POILane to left up
netedit.moveElement(match, -80, 400, 200, 300)

# go to inspect mode again
netedit.inspectMode()

# inspect first POILane
netedit.leftClick(match, 100, 100)

# unblock POILane
netedit.modifyBoolAttribute(13)

# inspect first POILane
netedit.leftClick(match, 100, 350)
Ejemplo n.º 4
0
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select E2
netedit.changeAdditional("e2Detector")

# create E2
netedit.leftClick(match, 240, 250)

# change to move mode
netedit.moveMode()

# move E2 to right
netedit.moveElement(match, 120, 250, 220, 250)

# go to inspect mode
netedit.inspectMode()

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

# block additional
netedit.modifyBoolAttribute(12)

# change to move mode
netedit.moveMode()

# try to move E2 to right (must be blocked)
netedit.moveElement(match, 250, 250, 350, 250)
Ejemplo n.º 5
0
# create E3
netedit.leftClick(match, 250, 250)

# select entry detector
netedit.changeAdditional(comboboxAdditional, -4)

# Create Entry detector E3 (for saving)
netedit.selectChild(comboboxAdditional, 4, 1)
netedit.leftClick(match, 400, 250)

# change to move mode
netedit.moveMode()

# move E3 to up
netedit.moveElement(match, 120, 250, 120, 50)

# move E3 to down
netedit.moveElement(match, 120, 50, 120, 300)

# move E3 to left
netedit.moveElement(match, 120, 300, -100, 300)

# move E3 to right
netedit.moveElement(match, -100, 300, 450, 300)

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

# save additionals
Ejemplo n.º 6
0
netedit.additionalMode()

# select chargingStation
netedit.changeAdditional("chargingStation")

# change reference to center
netedit.modifyAdditionalDefaultValue(9, "reference center")

# create chargingStation in mode "reference center"
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move chargingStation to right
netedit.moveElement(match, 150, 260, 250, 260)

# go to inspect mode
netedit.inspectMode()

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

# block additional
netedit.modifyBoolAttribute(10)

# change to move mode
netedit.moveMode()

# try to move chargingStation to right (must be blocked)
netedit.moveElement(match, 250, 260, 350, 260)
Ejemplo n.º 7
0
netedit.additionalMode()

# obtain match for comboboxAdditional
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select E1
netedit.changeAdditional(comboboxAdditional, 6)

# create E1
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move E1 to right
netedit.moveElement(match, 120, 250, 250, 250)

# Change to inspect mode
netedit.inspectMode()

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

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

# block additional
netedit.changeBlockAdditional(comboboxAdditional, 6)

# change to move mode
netedit.moveMode()
Ejemplo n.º 8
0
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select containerStop
netedit.changeAdditional(comboboxAdditional, 3)

# change reference to center
netedit.modifyStoppingPlaceReference(comboboxAdditional, 8, 2)

# create containerStop in mode "reference center"
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move containerStop to left
netedit.moveElement(match, 150, 275, 50, 275)

# move back
netedit.moveElement(match, 50, 275, 150, 275)

# move containerStop to right
netedit.moveElement(match, 150, 275, 250, 275)

# move back
netedit.moveElement(match, 250, 275, 150, 275)

# move containerStop to left overpassing lane
netedit.moveElement(match, 150, 275, -100, 275)

# move back
netedit.moveElement(match, 0, 275, 150, 275)
Ejemplo n.º 9
0
Archivo: test.py Proyecto: ikriz/sumo
netedit.modifyShapeDefaultBoolValue(10)

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

# enable block shape
netedit.modifyShapeDefaultBoolValue(11)

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

# go to move mode
netedit.moveMode()

# move first polygon (only a existent vertex will be moved
netedit.moveElement(match, -90, 120, -90, 300)

# move second polygon (only a verte will be moved)
netedit.moveElement(match, 10, 120, 10, 300)

# move third polygon (entre shape will be moved)
netedit.moveElement(match, 130, 120, 130, 300)

# move four polygon (will not be moved
netedit.moveElement(match, 260, 120, 260, 300)

# move five polygon (will not be moved
netedit.moveElement(match, 380, 120, 380, 300)

# Check undo redo
netedit.undo(match, 8)
Ejemplo n.º 10
0
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select E2
netedit.changeAdditional("e2Detector")

# create E2
netedit.leftClick(match, 210, 250)

# change to move mode
netedit.moveMode()

# move E2 to left
netedit.moveElement(match, 120, 250, 30, 250)

# move back
netedit.moveElement(match, 50, 250, 120, 250)

# move E2 to right
netedit.moveElement(match, 130, 250, 250, 250)

# move back
netedit.moveElement(match, 260, 250, 120, 250)

# move E2 to left overpassing lane
netedit.moveElement(match, 130, 250, -150, 250)

# move back
netedit.moveElement(match, -80, 250, 120, 250)
Ejemplo n.º 11
0
netedit.additionalMode()

# obtain match for comboboxAdditional
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select E2
netedit.changeAdditional(comboboxAdditional, 7)

# create E2
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move E2 to left
netedit.moveElement(match, 120, 250, 50, 250)

# move back
netedit.moveElement(match, 50, 250, 120, 250)

# move E2 to right
netedit.moveElement(match, 120, 250, 250, 250)

# move back
netedit.moveElement(match, 250, 250, 120, 250)

# move E2 to left overpassing lane
netedit.moveElement(match, 120, 250, -150, 250)

# move back
netedit.moveElement(match, -100, 250, 120, 250)
Ejemplo n.º 12
0
netedit.leftClick(match, 100, 100)

# block POI
netedit.modifyBoolAttribute(14)

# inspect second POI
netedit.leftClick(match, 100, 350)

# block POI
netedit.modifyBoolAttribute(14)

# go to move mode
netedit.moveMode()

# try to move first POI to left down
netedit.moveElement(match, -78, 50, 200, 60)

# try to move second POI to left up
netedit.moveElement(match, -78, 385, 200, 300)

# go to inspect mode again
netedit.inspectMode()

# inspect first POI
netedit.leftClick(match, 100, 100)

# unblock POI
netedit.modifyBoolAttribute(14)

# inspect first POI
netedit.leftClick(match, 100, 350)
Ejemplo n.º 13
0
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select chargingStation
netedit.changeAdditional(comboboxAdditional, 2)

# change reference to center
netedit.modifyStoppingPlaceReference(comboboxAdditional, 7, 2)

# create chargingStation in mode "reference center"
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move chargingStation to left
netedit.moveElement(match, 150, 250, 50, 250)

# move back
netedit.moveElement(match, 50, 250, 150, 250)

# move chargingStation to right
netedit.moveElement(match, 150, 250, 250, 250)

# move back
netedit.moveElement(match, 250, 250, 150, 250)

# move chargingStation to left overpassing lane
netedit.moveElement(match, 150, 250, -100, 250)

# move back
netedit.moveElement(match, 0, 250, 150, 250)
Ejemplo n.º 14
0
netedit.leftClick(match, 250, 250)

# select space
netedit.changeAdditional("space")

# select parent
netedit.selectAdditionalChild(9, 0)

# create space
netedit.leftClick(match, 250, 120)

# change to move mode
netedit.moveMode()

# move space
netedit.moveElement(match, 100, 20, 330, 100)

# go to inspect mode
netedit.inspectMode()

# inspect parkingArea
netedit.leftClick(match, 410, 110)

# block space
netedit.modifyBoolAttribute(8)

# change to move mode
netedit.moveMode()

# try to move space
netedit.moveElement(match, 330, 80, 100, 40)
Ejemplo n.º 15
0
# create E3
netedit.leftClick(match, 250, 50)

# select entry detector
netedit.changeAdditional("detEntry")

# Create Entry detector
netedit.selectAdditionalChild(6, 0)
netedit.leftClick(match, 100, 200)

# change to move mode
netedit.moveMode()

# move Entry to right
netedit.moveElement(match, -75, 190, 150, 190)

# go to inspect mode
netedit.inspectMode()

# inspect Entry
netedit.leftClick(match, 275, 190)

# block additional
netedit.modifyBoolAttribute(5)

# change to move mode
netedit.moveMode()

# try to move Entry to right (must be blocked)
netedit.moveElement(match, 140, 190, 300, 190)
Ejemplo n.º 16
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)

# Rebuild network
netedit.rebuildNetwork()

# zoom in central node
netedit.setZoom("50", "50", "100")

# go to delete mode
netedit.moveMode()

# move back to another different position of initial
netedit.moveElement(match, -25, 225, 25, 350)

# check undo redo
netedit.undo(match, 1)
netedit.redo(match, 1)

# save newtork
netedit.saveNetwork()

# quit netedit
netedit.quit(neteditProcess)
Ejemplo n.º 17
0
# zoom in central node
netedit.setZoom("100", "0", "200")

# Change to create edge mode
netedit.createEdgeMode()

# Create one way edge
netedit.leftClick(match, -30, 230)
netedit.leftClick(match, 430, 230)

# change to move mode
netedit.moveMode()

# Try to move to origin position
netedit.moveElement(match, 215, 232, -40, 232)

# Now move to top
netedit.moveElement(match, 215, 232, 215, 432)

# rebuild network
netedit.rebuildNetwork()

# Check undo and redo
netedit.undo(match, 3)
netedit.redo(match, 3)

# save newtork
netedit.saveNetwork()

# quit netedit
Ejemplo n.º 18
0
# create E3
netedit.leftClick(match, 250, 250)

# select entry detector
netedit.changeAdditional("detEntry")

# Create Entry detector E3 (for saving)
netedit.selectAdditionalChild(6, 0)
netedit.leftClick(match, 400, 250)

# change to move mode
netedit.moveMode()

# move E3 to up
netedit.moveElement(match, 120, 250, 120, 50)

# go to inspect mode
netedit.inspectMode()

# inspect E3
netedit.leftClick(match, 250, 100)

# block additional
netedit.modifyBoolAttribute(8)

# change to move mode
netedit.moveMode()

# try to move E3 to right (must be blocked)
netedit.moveElement(match, 120, 50, 300, 50)
Ejemplo n.º 19
0
Archivo: test.py Proyecto: ikriz/sumo
netedit.additionalMode()

# select chargingStation
netedit.changeAdditional("chargingStation")

# change reference to center
netedit.modifyAdditionalDefaultValue(9, "reference center")

# create chargingStation in mode "reference center"
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move chargingStation to left
netedit.moveElement(match, 150, 260, 50, 260)

# move back
netedit.moveElement(match, 50, 260, 150, 260)

# move chargingStation to right
netedit.moveElement(match, 150, 260, 250, 260)

# move back
netedit.moveElement(match, 250, 260, 150, 260)

# move chargingStation to left overpassing lane
netedit.moveElement(match, 150, 260, -100, 260)

# move back
netedit.moveElement(match, -90, 260, 150, 260)
Ejemplo n.º 20
0
# create E3
netedit.leftClick(match, 250, 50)

# select exit detector
netedit.changeAdditional("detExit")

# Create Exit detector
netedit.selectAdditionalChild(6, 0)
netedit.leftClick(match, 100, 200)

# change to move mode
netedit.moveMode()

# move Exit to right
netedit.moveElement(match, 15, 200, 150, 200)

# go to inspect mode
netedit.inspectMode()

# inspect Exit
netedit.leftClick(match, 200, 200)

# block additional
netedit.modifyBoolAttribute(3)

# change to move mode
netedit.moveMode()

# try to move Exit to right (must be blocked)
netedit.moveElement(match, 150, 200, 300, 200)
Ejemplo n.º 21
0
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select E1
netedit.changeAdditional("e1Detector")

# create E1
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move E1 to left
netedit.moveElement(match, 120, 250, 50, 250)

# move back
netedit.moveElement(match, 50, 250, 120, 250)

# move E1 to right
netedit.moveElement(match, 120, 250, 250, 250)

# move back
netedit.moveElement(match, 250, 250, 120, 250)

# move E1 to left overpassing lane
netedit.moveElement(match, 120, 250, -150, 250)

# move back
netedit.moveElement(match, -100, 250, 120, 250)
Ejemplo n.º 22
0
# select entry detector
netedit.changeAdditional("detEntry")

# Create Entry detector
netedit.selectAdditionalChild(6, 0)
netedit.leftClick(match, 100, 200)

# apply zoom out
netedit.setZoom("25", "0", "70")

# change to move mode
netedit.moveMode()

# move Entry to left
netedit.moveElement(match, 110, 200, 50, 200)

# move back
netedit.moveElement(match, 50, 200, 120, 200)

# move Entry to right
netedit.moveElement(match, 120, 200, 250, 200)

# move back
netedit.moveElement(match, 250, 200, 120, 200)

# move Entry to left overpassing lane
netedit.moveElement(match, 120, 200, -150, 200)

# move back
netedit.moveElement(match, -105, 200, 120, 200)
Ejemplo n.º 23
0
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select busStop
netedit.changeAdditional(comboboxAdditional, 0)

# change reference to center
netedit.modifyStoppingPlaceReference(comboboxAdditional, 8, 2)

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

# change to move mode
netedit.moveMode()

# move busStop to right
netedit.moveElement(match, 150, 275, 250, 275)

# Change to inspect mode
netedit.inspectMode()

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

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

# block additional
netedit.changeBlockAdditional(comboboxAdditional, 5)

# change to move mode
netedit.moveMode()
Ejemplo n.º 24
0
netedit.leftClick(match, 50, 200)

# go to inspect mode
netedit.inspectMode()

# inspect Access
netedit.leftClick(match, 46, 181)

# Change block movement
netedit.modifyBoolAttribute(5)

# go to move mode
netedit.moveMode()

# try to move Acces
netedit.moveElement(match, -147, 163, 100, 163)

# go to inspect mode
netedit.inspectMode()

# inspect Access
netedit.leftClick(match, 46, 181)

# Change block movement
netedit.modifyBoolAttribute(5)

# go to move mode
netedit.moveMode()

# move Acces
netedit.moveElement(match, -147, 163, 100, 163)