public class BusSchedule extends Route
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
BusSchedule(String id,
List<Node> nodes,
String line) |
BusSchedule(String id,
String line) |
Modifier and Type | Method and Description |
---|---|
void |
addBusStop(String busStopId,
Time departureTime,
Duration dwellTime,
boolean forceSchedule)
Adds a stop to the schedule.
|
Time |
getActualDepartureBusStop(String busStopId)
Return the actual departure time.
|
Time |
getActualDepartureConflict(String conflictId)
Return the actual departure time.
|
Time |
getDepartureTime(String busStopId)
Returns departure time for the given bus stop.
|
Duration |
getDwellTime(String busStopId)
Returns dwell time for the given bus stop.
|
String |
getLine() |
boolean |
isForceSchedule(String busStopId)
Returns whether the departure time is enforced.
|
boolean |
isLineStop(String busStopId,
Time time)
Whether the bus of this line should stop for this bus stop.
|
void |
setActualDeparture(String busStopId,
Set<String> conflictIds,
Time time)
Set actual departure time.
|
String |
toString() |
public BusSchedule(String id, List<Node> nodes, String line)
id
- idnodes
- nodesline
- line of the bus schedulepublic final void addBusStop(String busStopId, Time departureTime, Duration dwellTime, boolean forceSchedule)
busStopId
- bus stop iddepartureTime
- departure timedwellTime
- dwell timeforceSchedule
- whether to wait until departure timepublic final boolean isLineStop(String busStopId, Time time)
busStopId
- id of bus stoptime
- time to checkpublic final Time getDepartureTime(String busStopId)
busStopId
- id of bus stoppublic final Duration getDwellTime(String busStopId)
busStopId
- id of bus stoppublic final boolean isForceSchedule(String busStopId)
busStopId
- id of bus stoppublic final void setActualDeparture(String busStopId, Set<String> conflictIds, Time time)
busStopId
- bus stop idconflictIds
- conflicts downstream of the bus stoptime
- actual departure timepublic final Time getActualDepartureBusStop(String busStopId)
busStopId
- bus stop idnull
if not givenpublic final Time getActualDepartureConflict(String conflictId)
conflictId
- conflict idnull
if not givenpublic final String getLine()
Copyright © 2014–2018 Delft University of Technology. All rights reserved.