コード例 #1
0
    JunctionModel,
)

scenario_path = str(Path(__file__).parent)

sv_num = 30
seed = 42

# generate agent missions
gen_missions(
    scenario_path,
    [
        # start line and end line should be the same
        t.LapMission(
            t.Route(
                begin=("edge1", 0, 10), via=("edge0",), end=("edge1", (0, 1, 2), 10)
            ),
            num_laps=1,
        ),
    ],
    overwrite=True,
)

print(f"generate lap mission finished")

# generate social agent routes

impatient_car = TrafficActor(
    name="car",
    speed=Distribution(sigma=0.2, mean=0.5),
    lane_changing_model=LaneChangingModel(impatience=1, cooperative=0.25),
    junction_model=JunctionModel(
コード例 #2
0
    JunctionModel,
)

scenario_path = str(Path(__file__).parent)

sv_num = 13
seed = 345

# generate agent missions
gen_missions(
    scenario_path,
    [
        t.LapMission(
            t.Route(
                begin=("gneE9", 0, 10),
                via=("gneE5", "gneE7.141"),
                end=("gneE9", (0, 1), 10),
            ),
            num_laps=1,
        ),
    ],
    overwrite=True,
)

print(f"generate lap mission finished")

# generate social agent routes

impatient_car = TrafficActor(
    name="patient_car",
    speed=Distribution(sigma=0.2, mean=0.5),
    lane_changing_model=LaneChangingModel(impatience=1, cooperative=0.25),
コード例 #3
0
    JunctionModel,
)

scenario_path = str(Path(__file__).parent)

sv_num = 30
seed = 42

# generate agent missions
gen_missions(
    scenario_path,
    [
        t.LapMission(
            t.Route(
                begin=("gneE14", 0, 10),
                via=("edge-east-EN", "gneE48"),
                end=("gneE14", (0, 1), 10),
            ),
            num_laps=1,
        ),
    ],
    overwrite=True,
)

print(f"generate lap mission finished")

# generate social agent routes

impatient_car = TrafficActor(
    name="car",
    speed=Distribution(sigma=0.2, mean=0.5),
    lane_changing_model=LaneChangingModel(impatience=1, cooperative=0.25),
コード例 #4
0
    JunctionModel,
)

scenario_path = str(Path(__file__).parent)

sv_num = 30
seed = 42

# generate agent missions
gen_missions(
    scenario_path,
    [
        t.LapMission(
            t.Route(
                begin=("gneE92", 0, 10),
                via=("edge-south-SE", "gneE82", "gneE93"),
                end=("gneE92", (0,), 10),
            ),
            num_laps=1,
        ),
    ],
    overwrite=True,
)


print(f"generate lap mission finished")

# generate social agent routes

impatient_car = TrafficActor(
    name="car",
    speed=Distribution(sigma=0.2, mean=0.5),
コード例 #5
0
    JunctionModel,
)

scenario_path = str(Path(__file__).parent)

sv_num = 18
seed = 675

# generate agent missions
gen_missions(
    scenario_path,
    [
        t.LapMission(
            t.Route(
                begin=("gneE78", 0, 10),
                via=("edge-west-WS", "gneE61"),
                end=("gneE78", (0, 1), 10),
            ),
            num_laps=1,
        ),
    ],
    overwrite=True,
)

print(f"generate lap mission finished")

# generate social agent routes

impatient_car = TrafficActor(
    name="patient_car",
    speed=Distribution(sigma=0.2, mean=0.5),
    lane_changing_model=LaneChangingModel(impatience=1, cooperative=0.25),
コード例 #6
0
    JunctionModel,
)

scenario_path = str(Path(__file__).parent)

sv_num = 30
seed = 42

# generate agent missions
gen_missions(
    scenario_path,
    [
        t.LapMission(
            t.Route(
                begin=("gneE110", 0, 10),
                via=("gneE111", "gneE93"),
                end=("gneE110", (0, ), 10),
            ),
            num_laps=1,
        ),
    ],
    overwrite=True,
)

print(f"generate lap mission finished")

# generate social agent routes

impatient_car = TrafficActor(
    name="car",
    speed=Distribution(sigma=0.2, mean=0.5),
    lane_changing_model=LaneChangingModel(impatience=1, cooperative=0.25),
コード例 #7
0
    JunctionModel,
)

scenario_path = str(Path(__file__).parent)

sv_num = 20
seed = 111

# generate agent missions
gen_missions(
    scenario_path,
    [
        t.LapMission(
            t.Route(
                begin=("gneE9", 0, 60),
                via=("gneE11", ),
                end=("gneE9", (0, 1), 60),
            ),
            num_laps=1,
        ),
    ],
    overwrite=True,
)

print(f"generate lap mission finished")

# generate social agent routes
impatient_car = TrafficActor(
    name="patient_car",
    speed=Distribution(sigma=0.2, mean=0.5),
    lane_changing_model=LaneChangingModel(impatience=1, cooperative=0.25),
    junction_model=JunctionModel(drive_after_red_time=1.5,
コード例 #8
0
scenario_path = str(Path(__file__).parent)

sv_num = 22
seed = 104

# generate agent missions
gen_missions(
    scenario_path,
    [
        t.LapMission(
            t.Route(
                begin=("edge-west-WS", 0, 10),
                via=(
                    "gneE145",
                    "gneE162",
                    "gneE124.71",
                    "gneE140",
                ),
                end=("edge-west-WS", (0, 1), 10),
            ),
            num_laps=1,
        ),
    ],
    overwrite=True,
)

print(f"generate lap mission finished")

# generate social agent routes

impatient_car = TrafficActor(