Esempio n. 1
0
def sessionStartWestGoingNoerrebrogade():
    global sesh

    # Clear the data somehow...

    sesh = Session('Noerrebrogade Going West',
                   Bicycle('b01', Location(0, 0), 0, 0), Route('r01'))

    sesh.loadRouteGPX('./gpx/dronninglouisesbro-frederikssundvej.gpx')

    sesh.calcRouteIntxnsAndSignals(sim)

    # Return nothing
    return ('', 204)
Esempio n. 2
0
sim = Simulation()

sim.loadIntersections(data)

# ------------------------------------------------------------------------------
# Setup Initial 'Noerrebrogade Going West' Session
# ------------------------------------------------------------------------------

sesh = Session('Noerrebrogade Going West', Bicycle('b01', Location(0, 0), 0,
                                                   0), Route('r01'))

sesh.loadRouteGPX('./gpx/dronninglouisesbro-frederikssundvej.gpx')
# sesh.loadRouteGPX('./gpx/frederikssundvej-dronninglouisesbro.gpx')

sesh.calcRouteIntxnsAndSignals(sim)

# ------------------------------------------------------------------------------
# Run a few tests...
# ------------------------------------------------------------------------------

now = ms()

print("\n# ---------------------------------------------------------------")
print("# Run a few tests...")
print("# ---------------------------------------------------------------")

sesh.bicycle.setUpdated(0)
sesh.bicycle.setLocation(Location(55.683634, 12.571796))  # Nørreport
# sesh.bicycle.setLocation(Location(55.659941, 12.626550)) # Øresund Metro