コード例 #1
0
ファイル: entry.py プロジェクト: fgrandhomme/pylayers
            yield hold, self, 7


if __name__ == "__main__":
    initialize()

    rail_draw(30.0, 0.0)

    # PRT segments
    psm1 = PRTStationManager(3)
    activate(psm1, psm1.check(), 0.0)
    psm2 = PRTStationManager(3)
    activate(psm2, psm2.check(), 0.0)

    rsm = RailStationManager()
    rsm.destination_x = 30.0
    activate(rsm, rsm.check(), 0.0)

    pg = PersonGenerator(psm1, psm2, rsm)
    activate(pg, pg.generate(), 0.0)

    s1 = Straight((70.0, -30.0), (70.0, 5.0))
    s1.next, last_left, last_right, length = station((70.0, 5.0), PRT.max_speed, "right", 3, psm1)
    last_left.next = last_right.next = s2 = Straight((70.0, 5.0 + length), (70.0, 125.0))
    psm1.mainline = last_left
    s2.next, last_left, last_right, length = station((70.0, 125.0), PRT.max_speed, "right", 3, psm2)
    last_left.next = last_right.next = s7 = Straight((70.0, 125.0 + length), (70.0, 10000.0))
    psm2.mainline = last_left
    prt_draw(s1, 70.0, -31.0)
    pg.destination1 = vec3(s1.next.destinations[0].x + 2.2, s1.next.destinations[0].y)
    pg.destination2 = vec3(s2.next.destinations[0].x + 2.2, s2.next.destinations[0].y)