Package core
Class Link
- java.lang.Object
-
- core.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Link.RoadType
-
Field Summary
Fields Modifier and Type Field Description Map<Long,Map<Long,actuator.ActuatorFlowToLinks>>
acts_flowToLinks
Long
alt_next_link
traveltime.LinkTravelTimer
link_tt
jaxb.Roadparam
road_param_full
Set<core.State>
states
Set<actuator.ActuatorFlowToLinks>
unique_acts_flowToLinks
-
Method Summary
-
-
-
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
-
getTypeAsTarget
public String getTypeAsTarget()
- Specified by:
getTypeAsTarget
in interfaceactuator.InterfaceTarget
-
getIdAsTarget
public long getIdAsTarget()
- Specified by:
getIdAsTarget
in interfaceactuator.InterfaceTarget
-
register_actuator
public void register_actuator(Set<Long> commids, AbstractActuator act, boolean override) throws error.OTMException
- Specified by:
register_actuator
in interfaceactuator.InterfaceTarget
- Throws:
error.OTMException
-
getId
public final Long getId()
- Specified by:
getId
in interfacecore.InterfaceScenarioElement
-
getSEType
public final core.ScenarioElementType getSEType()
- Specified by:
getSEType
in interfacecore.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 interfacecore.InterfaceScenarioElement
-
set_lanegroups
public void set_lanegroups(List<core.AbstractLaneGroup> newlgs)
-
get_max_vehicles
public double get_max_vehicles()
-
get_previous_links
public Collection<Link> get_previous_links()
-
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 interfaceactuator.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_road_type
public Link.RoadType get_road_type()
-
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)
-
get_outlink_ids
public Collection<Long> get_outlink_ids()
-
has_demands
public boolean has_demands()
-
get_demandGenerators
public Set<core.AbstractDemandGenerator> get_demandGenerators()
-
-