Examples of addBikeRentalStation()


Examples of org.opentripplanner.routing.bike_rental.BikeRentalStationService.addBikeRentalStation()

        station.y = 45.513084;
        station.bikesAvailable = 5;
        station.spacesAvailable = 4;
        station.id = "1";
        station.name = "bike rental station";
        service.addBikeRentalStation(station);
    }

    private Graph makeSimpleGraph() {
        Graph graph = new Graph();
        StreetVertex tl = new IntersectionVertex(graph, "tl", -80.01, 40.01, "top and left");
View Full Code Here

Examples of org.opentripplanner.routing.bike_rental.BikeRentalStationService.addBikeRentalStation()

                // Also, for the degenerate case of capacity=1, we should have 1
                // bike available, not 0.
                station.spacesAvailable = capacity / 2;
                station.bikesAvailable = capacity - station.spacesAvailable;
                station.realTimeData = false;
                bikeRentalService.addBikeRentalStation(station);
                BikeRentalStationVertex stationVertex = new BikeRentalStationVertex(graph, station);
                new RentABikeOnEdge(stationVertex, stationVertex, networkSet);
                new RentABikeOffEdge(stationVertex, stationVertex, networkSet);
            }
            LOG.info("Created " + n + " bike rental stations.");
View Full Code Here

Examples of org.opentripplanner.routing.bike_rental.BikeRentalStationService.addBikeRentalStation()

            return;
        }
        Collection<BikeRentalStation> stations = dataSource.getStations();

        for (BikeRentalStation station : stations) {
            service.addBikeRentalStation(station);
            BikeRentalStationVertex vertex = new BikeRentalStationVertex(graph, station);
            new RentABikeOnEdge(vertex, vertex, station.networks);
            if (station.allowDropoff)
                new RentABikeOffEdge(vertex, vertex, station.networks);
        }
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.