public class BusSchedule
extends org.opentrafficsim.core.network.route.Route
Copyright (c) 2013-2017 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<org.opentrafficsim.core.network.Node> nodes,
String line) |
BusSchedule(String id,
String line) |
Modifier and Type | Method and Description |
---|---|
void |
addBusStop(String busStopId,
org.djunits.value.vdouble.scalar.Time departureTime,
org.djunits.value.vdouble.scalar.Duration dwellTime,
boolean forceSchedule)
Adds a stop to the schedule.
|
org.djunits.value.vdouble.scalar.Time |
getActualDepartureBusStop(String busStopId)
Return the actual departure time.
|
org.djunits.value.vdouble.scalar.Time |
getActualDepartureConflict(String conflictId)
Return the actual departure time.
|
org.djunits.value.vdouble.scalar.Time |
getDepartureTime(String busStopId)
Returns departure time for the given bus stop.
|
org.djunits.value.vdouble.scalar.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,
org.djunits.value.vdouble.scalar.Time time)
Whether the bus of this line should stop for this bus stop.
|
void |
setActualDeparture(String busStopId,
Set<String> conflictIds,
org.djunits.value.vdouble.scalar.Time time)
Set actual departure time.
|
String |
toString() |
public BusSchedule(String id, List<org.opentrafficsim.core.network.Node> nodes, String line)
id
- idnodes
- nodesline
- line of the bus schedulepublic final void addBusStop(String busStopId, org.djunits.value.vdouble.scalar.Time departureTime, org.djunits.value.vdouble.scalar.Duration dwellTime, boolean forceSchedule)
busStopId
- bus stop iddepartureTime
- departure timedwellTime
- dwell timeforceSchedule
- whether to wait until departure timepublic final boolean isLineStop(String busStopId, org.djunits.value.vdouble.scalar.Time time)
busStopId
- id of bus stoptime
- time to checkpublic final org.djunits.value.vdouble.scalar.Time getDepartureTime(String busStopId)
busStopId
- id of bus stoppublic final org.djunits.value.vdouble.scalar.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, org.djunits.value.vdouble.scalar.Time time)
busStopId
- bus stop idconflictIds
- conflicts downstream of the bus stoptime
- actual departure timepublic final org.djunits.value.vdouble.scalar.Time getActualDepartureBusStop(String busStopId)
busStopId
- bus stop idnull
if not givenpublic final org.djunits.value.vdouble.scalar.Time getActualDepartureConflict(String conflictId)
conflictId
- conflict idnull
if not givenpublic String getLine()
public final String toString()
toString
in class org.opentrafficsim.core.network.route.Route
Copyright © 2014–2017 Delft University of Technology. All rights reserved.