Skip to content

Error java.lang.RuntimeException: Found a trip with multiple legs and no routingMode. #1230

Closed Answered by kainagel
Wenhua-Jiang asked this question in Q&A
Discussion options

You must be logged in to vote

In

        plan.addActivity(homeAct);
        // Walk from home to PT stop
        Leg legWalkToPT = f.createLeg("walk");
        plan.addLeg(legWalkToPT);
        // Public transport leg to work
        Leg legPTToWork = f.createLeg("pt");
        plan.addLeg(legPTToWork);

        // Walk from PT stop to work location
        Leg legWalkFromPT = f.createLeg("walk");
        plan.addLeg(legWalkFromPT);
        ...
        plan.addActivity(workAct);

You will have to put "pt interaction activities" in between your legs. I have never done that at this stage; it would probably be easier to not put in the walk legs ... MATSim will do this automatically. So I would try something like

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@paulheinr
Comment options

@Wenhua-Jiang
Comment options

@Wenhua-Jiang
Comment options

@paulheinr
Comment options

@Wenhua-Jiang
Comment options

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