Examples of incrementWeight()


Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

            s1.incrementWeight(transferPenalty);

            // when reverse optimizing, the board cost needs to be applied on
            // alight to prevent state domination due to free alights
            if (options.reverseOptimizing) {
                s1.incrementWeight(wait_cost);
            } else {
                s1.incrementWeight(wait_cost + options.getBoardCost(s0.getNonTransitMode()));
            }
           
            // On-the-fly reverse optimization
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

            // when reverse optimizing, the board cost needs to be applied on
            // alight to prevent state domination due to free alights
            if (options.reverseOptimizing) {
                s1.incrementWeight(wait_cost);
            } else {
                s1.incrementWeight(wait_cost + options.getBoardCost(s0.getNonTransitMode()));
            }
           
            // On-the-fly reverse optimization
            // determine if this needs to be reverse-optimized.
            // The last alight can be moved forward by bestWait (but no further) without
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

        StateEditor s1 = state0.edit(this);
        s1.incrementTimeInSeconds(dwellTime);
        s1.setTripId(newTrip.getId()); // TODO check meaning
        s1.setPreviousTrip(oldTrip);   // TODO check meaning
        s1.setTripTimes(newTripTimes);
        s1.incrementWeight(dwellTime);
        // Mode should not change.
        return s1.makeState();
    }

    @Override
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

        }

        StateEditor s1 = s0.edit(this);
        //assume bike rental stations are more-or-less on-street
        s1.incrementTimeInSeconds(1);
        s1.incrementWeight(1);
        s1.setBackMode(s0.getNonTransitMode());
        return s1.makeState();
    }

    @Override
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

    }
   
    @Override
    public State traverse(State s0) {
        StateEditor s1 = s0.edit(this);
        s1.incrementWeight(1);
        s1.setBackMode(TraverseMode.WALK);
        return s1.makeState();
    }

    @Override
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

            return null;
        }

        StateEditor s1 = s0.edit(this);
        s1.setBackMode(TraverseMode.WALK);
        s1.incrementWeight(options.elevatorHopCost);
        s1.incrementTimeInSeconds(options.elevatorHopTime);
        return s1.makeState();
    }

    @Override
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

    }

    @Override
    public State traverse(State s0) {
        StateEditor s1 = s0.edit(this);
        s1.incrementWeight(1);
        s1.setBackMode(TraverseMode.WALK);
        return s1.makeState();
    }

    @Override
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

        if (mode == TraverseMode.WALK) {
            // Walking
            double walkTime = linkDistance * WALK_OBSTRUCTION_FACTOR
                    / s0.getOptions().walkSpeed;
            s1.incrementTimeInSeconds((int) Math.round(walkTime));
            s1.incrementWeight(walkTime);
            s1.incrementWalkDistance(linkDistance);
            s1.setBackMode(TraverseMode.WALK);
        } else if (mode == TraverseMode.CAR) {
            // Driving
            double driveTime = linkDistance * DRIVE_OBSTRUCTION_FACTOR / DRIVE_SPEED_MS;
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

            s1.setBackMode(TraverseMode.WALK);
        } else if (mode == TraverseMode.CAR) {
            // Driving
            double driveTime = linkDistance * DRIVE_OBSTRUCTION_FACTOR / DRIVE_SPEED_MS;
            s1.incrementTimeInSeconds((int) Math.round(driveTime));
            s1.incrementWeight(driveTime);
            s1.setBackMode(TraverseMode.CAR);
        } else {
            // Can't cycle in/out a P+R.
            return null;
        }
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.incrementWeight()

            }
            time = wheelchairTraversalTime;
        }
        StateEditor s1 = s0.edit(this);
        s1.incrementTimeInSeconds(time);
        s1.incrementWeight(time);
        s1.setBackMode(getMode());
        return s1.makeState();
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.