Package core

Class Link

  • All Implemented Interfaces:
    actuator.InterfaceTarget, core.InterfaceScenarioElement

    public class Link
    extends Object
    implements core.InterfaceScenarioElement, actuator.InterfaceTarget
    A segment of road in the network.
    • Field Detail

      • alt_next_link

        public Long alt_next_link
      • road_param_full

        public final jaxb.Roadparam road_param_full
      • states

        public Set<core.State> states
      • unique_acts_flowToLinks

        public Set<actuator.ActuatorFlowToLinks> unique_acts_flowToLinks
      • acts_flowToLinks

        public Map<Long,​Map<Long,​actuator.ActuatorFlowToLinks>> acts_flowToLinks
      • link_tt

        public traveltime.LinkTravelTimer link_tt
    • Constructor Detail

      • Link

        public Link​(Network network,
                    jaxb.Roadparam rp,
                    long id,
                    float length,
                    int full_lanes,
                    Node start_node,
                    Node end_node,
                    core.geometry.RoadGeometry rg,
                    Link.RoadType rt,
                    jaxb.Points jpoints,
                    Long alt_next_link)
             throws error.OTMException
        Throws:
        error.OTMException
    • Method Detail

      • allocate_splits

        public void allocate_splits​(Set<Long> pathless_comms)
      • add_state

        public void add_state​(long comm_id,
                              Long path_id,
                              Long next_link_id,
                              boolean ispathfull)
      • getTypeAsTarget

        public String getTypeAsTarget()
        Specified by:
        getTypeAsTarget in interface actuator.InterfaceTarget
      • getIdAsTarget

        public long getIdAsTarget()
        Specified by:
        getIdAsTarget in interface actuator.InterfaceTarget
      • register_actuator

        public void register_actuator​(Set<Long> commids,
                                      AbstractActuator act,
                                      boolean override)
                               throws error.OTMException
        Specified by:
        register_actuator in interface actuator.InterfaceTarget
        Throws:
        error.OTMException
      • getId

        public final Long getId()
        Specified by:
        getId in interface core.InterfaceScenarioElement
      • getSEType

        public final core.ScenarioElementType getSEType()
        Specified by:
        getSEType in interface core.InterfaceScenarioElement
      • validate_pre_init

        public void validate_pre_init​(error.OTMErrorLog errorLog)
      • validate_post_init

        public void validate_post_init​(error.OTMErrorLog errorLog)
      • initialize

        public void initialize​(Scenario scenario,
                               float start_time)
                        throws error.OTMException
        Throws:
        error.OTMException
      • to_jaxb

        public jaxb.Link to_jaxb()
        Specified by:
        to_jaxb in interface core.InterfaceScenarioElement
      • set_lanegroups

        public void set_lanegroups​(List<core.AbstractLaneGroup> newlgs)
      • get_max_vehicles

        public double get_max_vehicles()
      • split_packet

        public Map<Long,​core.packet.PacketLaneGroup> split_packet​(core.packet.PacketLink vp)
      • sample_next_link

        public Long sample_next_link​(Long comm_id)
      • get_splits_for_commodity

        public Map<Long,​Double> get_splits_for_commodity​(Long comm_id)
      • get_roadconnections_leaving

        public Set<RoadConnection> get_roadconnections_leaving()
      • get_roadconnections_entering

        public Set<RoadConnection> get_roadconnections_entering()
      • get_split_profile

        public profiles.SplitMatrixProfile get_split_profile​(long commid)
      • remove_split_profile

        public void remove_split_profile​(long commid)
      • have_split_for_commodity

        public boolean have_split_for_commodity​(long commid)
      • set_split_profile

        public void set_split_profile​(long commid,
                                      profiles.SplitMatrixProfile smp)
      • get_veh

        public double get_veh()
      • get_veh_for_commodity

        public double get_veh_for_commodity​(Long commodity_id)
      • get_scenario

        public Scenario get_scenario()
      • get_network

        public Network get_network()
      • get_full_lanes

        public int get_full_lanes()
      • get_full_length

        public float get_full_length()
      • get_start_node

        public Node get_start_node()
      • get_end_node

        public Node get_end_node()
      • is_model_source_link

        public boolean is_model_source_link()
      • get_model

        public AbstractModel get_model()
        Specified by:
        get_model in interface actuator.InterfaceTarget
      • is_source

        public boolean is_source()
      • is_sink

        public boolean is_sink()
      • get_num_dn_in_lanes

        public int get_num_dn_in_lanes()
      • get_num_dn_out_lanes

        public int get_num_dn_out_lanes()
      • get_num_up_in_lanes

        public int get_num_up_in_lanes()
      • get_num_up_out_lanes

        public int get_num_up_out_lanes()
      • get_num_dn_lanes

        public int get_num_dn_lanes()
      • get_num_up_lanes

        public int get_num_up_lanes()
      • get_side_for_dn_lane

        public core.geometry.Side get_side_for_dn_lane​(int lane)
      • get_unique_lanegroups_for_dn_lanes

        public Set<core.AbstractLaneGroup> get_unique_lanegroups_for_dn_lanes​(int from_lane,
                                                                              int to_lane)
      • get_lanegroup_for_dn_lane

        public core.AbstractLaneGroup get_lanegroup_for_dn_lane​(int lane)
      • get_lanegroup_for_up_lane

        public core.AbstractLaneGroup get_lanegroup_for_up_lane​(int lane)
      • get_inner_full_lanegroup

        public core.AbstractLaneGroup get_inner_full_lanegroup()
      • get_outer_full_lanegroup

        public core.AbstractLaneGroup get_outer_full_lanegroup()
      • get_lgs

        public List<core.AbstractLaneGroup> get_lgs()
      • get_in_barriers

        public Set<core.Barrier> get_in_barriers()
      • get_out_barriers

        public Set<core.Barrier> get_out_barriers()
      • get_next_link_in_path

        public Link get_next_link_in_path​(long pathid)
      • get_lanegroups_for_outlink

        public Set<core.AbstractLaneGroup> get_lanegroups_for_outlink​(long linkid)
      • has_demands

        public boolean has_demands()
      • get_demandGenerators

        public Set<core.AbstractDemandGenerator> get_demandGenerators()