Class TrajPlace


  • public class TrajPlace
    extends PlaceAbstract
    It contains none, one or multiple Trajectory object(s) and symbolize a track portion

    Place class diagram

    • Constructor Detail

      • TrajPlace

        public TrajPlace​(String name,
                         int number,
                         float distance,
                         float headway)
    • Method Detail

      • createTrajectory

        public boolean createTrajectory​(Sampler sampler)
        create a simple trajectory (one segment) and add it to the content
      • addTrajectory

        public void addTrajectory​(Trajectory trajectoryToAdd)
        add a trajectory to the content by checking if there is no blocking trajectories and update it if there are, so that the place is headway-consistent
      • removeTrajectory

        public boolean removeTrajectory()
        remove the trajectory which is a single point shape
      • usableTrajectory

        public Trajectory usableTrajectory()
        get a usable trajectory if there is one which means that it go to the final point <0,0>
      • availableForNewPlace

        public boolean availableForNewPlace()
        check if it is possible to add a new trajectory if the max ordinates of the segments of the trajectories is less than the distance minus the headway
      • refactor

        public void refactor()
        correct the trajectories if there is some crossings