Skip to content

Assigning Journeys to Groups with Specific Waypoints and Exits #1424

Answered by chraibi
K99-JDG asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
You work with an array of simulations simulations[number], which is ok.
However, in this cell you add the journeys in simulation, not in simulations[number]. This is why you get the error.

Maybe you can wrap this cell in a function init_journeys(simulation) and return the journeys.

Maybe like this:

def init_journeys(simulation):
    waypoint_ids = [
        simulation.add_waypoint_stage([3.0125, 24.75], 0.45),
        simulation.add_waypoint_stage([3.0125, 4.95], 0.45),
    ]
    exit_ids = [
        simulation.add_exit_stage(exit_train),
        simulation.add_exit_stage(exit_platform),
    ]

    switch_id = simulation.add_waypoint_stage(switch_point, distance_to_switch)


    jour…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@K99-JDG
Comment options

Answer selected by K99-JDG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants