RoutingRequest.optimize

112 views
Skip to first unread message

David K.

unread,
Jul 12, 2014, 5:32:28 AM7/12/14
to opentripp...@googlegroups.com
(Hope that someone could help me even @WE)

I am testing in (Debug) GraphVisualizer:
walkCheckBox.setSelected(true);
bikeCheckBox.setEnabled(false);
trainCheckBox.setEnabled(false);
busCheckBox.setEnabled(false);
ferryCheckBox.setEnabled(false);
transitCheckBox.setEnabled(false);
carCheckBox.setEnabled(false);
cmvCheckBox.setEnabled(false);

everything else is "default"

RoutingRequest options = new RoutingRequest(modeSet);
...
options.setOptimize(getSelectedOptimizeType());
options.setMaxWalkDistance(Integer.parseInt(maxWalkField.getText()));
...
options.setBikeSpeed(Float.parseFloat(bikeSpeed.getText()));
...
options.setSoftWalkLimiting(softWalkLimiting.isSelected());
options.setSoftWalkPenalty(Float.parseFloat(softWalkPenalty.getText()));
options.setSoftWalkOverageRate(Float.parseFloat(this.softWalkOverageRate.getText()));
options.numItineraries = 1;

As where "Modes: TraverseMode (WALK)" is printed in cmd everythings seems best.


But why do I get different ways, if I Play with:
OptimizeType.QUICK;
OptimizeType.SAFE
???

Only CodeLines of Interest I could find are @PlainStreetEdge.doTraverse(State, RoutingRequest, TraverseMode){
....
....
    else if (traverseMode.equals(TraverseMode.BICYCLE)) {
time = elevationProfileSegment.getSlopeSpeedEffectiveLength() / speed;
switch (options.optimize) {...}
    }
....
}

But I am at TraverseMode.WALK !!!
Where is the Line tinkering in the Routing providing different results for OptimizeType.?
I just wand NON optimisation, and IF I want to create my own one.


Greatings Oekel
Screenshot 2014-07-12 11.31.46.png

David K.

unread,
Jul 12, 2014, 5:37:37 AM7/12/14
to opentripp...@googlegroups.com
Just another Pic...
Screenshot 2014-07-12 11.36.36.png

Marko Burjek

unread,
Jul 26, 2014, 8:37:43 AM7/26/14
to opentripp...@googlegroups.com
Maybe you have similar problem as here:
https://github.com/opentripplanner/OpenTripPlanner/issues/1437

Where you have a CAR mode but somewhere during a request BICYCLE and WALK mode appears and routing is wrong.

If you use eclipse/netbeans you can try to debug it.
You can create new file with name otp-dev next to otp file in Opentripplanner directory with content:
#!/bin/sh
# Run OTP in standalone mode with the supplied arguments.
# Standalone OTP can build a graph, visualize a graph, run an OTP API server,
# or any combination of these.
DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=1044"
java $DEBUG_OPTS -Xmx6G -jar `dirname $0`/target/otp.jar "$@"

Meaning of parameters:
http://wiki.netbeans.org/FaqDebuggingRemote
Now when you start otp-dev (with same parameters as before) it will wait for you to connect with eclipse or netbeans. After that you can add breakpoints look at variables and everything you want. If you do not want for it to wait you can change suspend=y to suspend=n. address is port name you have to provide in eclipse/netbeans.
Path after dirname must be the same as in otp file.

On Saturday, 12 July 2014 11:37:37 UTC+2, David K. wrote:
Just another Pic...
Reply all
Reply to author
Forward
0 new messages