Class TrajectoryGroup<G extends GtuData>

    • Constructor Detail

      • TrajectoryGroup

        public TrajectoryGroup​(Time startTime,
                               LaneData lane)
        Constructor without length specification. The complete lane will be used.
        Parameters:
        startTime - Time; start time of trajectories
        lane - LaneData; lane
      • TrajectoryGroup

        public TrajectoryGroup​(Time startTime,
                               Length startPosition,
                               Length endPosition,
                               LaneData lane)
        Parameters:
        startTime - Time; start time of trajectory group
        startPosition - Length; start position
        endPosition - Length; end position
        lane - LaneData; the lane
    • Method Detail

      • addTrajectory

        public final void addTrajectory​(Trajectory<G> trajectory)
        Add trajectory.
        Parameters:
        trajectory - Trajectory<G>; trajectory to add
      • getStartTime

        public final Time getStartTime()
        Returns:
        startTime.
      • getLength

        public final Length getLength()
        Returns:
        length.
      • contains

        public final boolean contains​(Trajectory<?> trajectory)
        Whether this TrajectoryGroup holds the given trajectory. Note that this is false if the given trajectory is derived from a trajectory in this TrajectoryGroup.
        Parameters:
        trajectory - Trajectory<?>; trajectory
        Returns:
        whether this TrajectoryGroup holds the given trajectory.
      • size

        public final int size()
        Returns the number of trajectories in this group.
        Returns:
        number of trajectories in this group
      • getTrajectories

        public final List<Trajectory<G>> getTrajectories()
        Returns a list of trajectories.
        Returns:
        list of trajectories
      • getTrajectoryGroup

        public final TrajectoryGroup<G> getTrajectoryGroup​(Length x0,
                                                           Length x1)
        Returns trajectory group between two locations.
        Parameters:
        x0 - Length; start length
        x1 - Length; end length
        Returns:
        list of trajectories
      • getTrajectoryGroup

        public final TrajectoryGroup<G> getTrajectoryGroup​(Time t0,
                                                           Time t1)
        Returns trajectory group between two times.
        Parameters:
        t0 - Time; start time
        t1 - Time; end time
        Returns:
        list of trajectories
      • getTrajectoryGroup

        public final TrajectoryGroup<G> getTrajectoryGroup​(Length x0,
                                                           Length x1,
                                                           Time t0,
                                                           Time t1)
        Returns trajectory group between two locations and between two times.
        Parameters:
        x0 - Length; start length
        x1 - Length; end length
        t0 - Time; start time
        t1 - Time; end time
        Returns:
        list of trajectories
      • getLane

        public final LaneData getLane()
        Returns the lane.
        Returns:
        lane
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object