Package models.vehicle.spatialq
Class MesoLaneGroup
- java.lang.Object
-
- core.AbstractLaneGroup
-
- models.vehicle.VehicleLaneGroup
-
- models.vehicle.spatialq.MesoLaneGroup
-
- All Implemented Interfaces:
InterfaceTarget
,InterfaceLaneGroup
,Comparable<core.AbstractLaneGroup>
public class MesoLaneGroup extends VehicleLaneGroup
-
-
Field Summary
Fields Modifier and Type Field Description float
nom_saturation_flow_rate_vps
float
nom_transit_time_sec
double
saturation_flow_rate_vps
Queue
transit_queue
float
transit_time_sec
Queue
waiting_queue
-
Fields inherited from class models.vehicle.VehicleLaneGroup
max_vehicles
-
-
Constructor Summary
Constructors Constructor Description MesoLaneGroup(Link link, Side side, float length, int num_lanes, int start_lane, Set<RoadConnection> out_rcs, Roadparam rp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add_vehicle_packet(float timestamp, PacketLaneGroup vp, Long next_link_id)
A core.packet arrives at this lanegroup.void
allocate_state()
Double
get_upstream_vehicle_position()
void
initialize(Scenario scenario, float start_time)
void
release_vehicle_packets(float timestamp)
An event signals an opportunity to release a vehicle.void
set_actuator_allow_comm(boolean allow, Long commid)
void
set_actuator_capacity_vps(double rate_vps)
void
set_actuator_speed_mps(double speed_mps)
void
set_road_params(Roadparam r)
void
set_to_nominal_capacity()
void
update_long_supply()
void
validate_post_init(OTMErrorLog errorLog)
float
vehs_dwn_for_comm(Long c)
-
Methods inherited from class models.vehicle.VehicleLaneGroup
get_lat_supply, get_max_vehicles, vehs_in_for_comm, vehs_out_for_comm
-
Methods inherited from class core.AbstractLaneGroup
compareTo, delete, get_dn_lanes, get_length, get_link, get_long_supply, get_maneuvers_for_state, get_maneuvprob_for_state, get_model, get_neighbor_in, get_neighbor_out, get_num_lanes, get_out_links, get_rc_for_outlink, get_rc_for_state, get_road_params, get_side, get_side_with_respect_to_lg, get_start_lane_dn, get_start_lane_up, get_supply_per_lane, get_total_vehicles, get_total_vehicles_for_commodity, get_up_lanes, getId, getIdAsTarget, getTypeAsTarget, register_actuator, request_flow_accumulator, toString, update_flow_accummulators
-
-
-
-
Field Detail
-
transit_queue
public Queue transit_queue
-
waiting_queue
public Queue waiting_queue
-
nom_transit_time_sec
public float nom_transit_time_sec
-
nom_saturation_flow_rate_vps
public float nom_saturation_flow_rate_vps
-
transit_time_sec
public float transit_time_sec
-
saturation_flow_rate_vps
public double saturation_flow_rate_vps
-
-
Constructor Detail
-
MesoLaneGroup
public MesoLaneGroup(Link link, Side side, float length, int num_lanes, int start_lane, Set<RoadConnection> out_rcs, Roadparam rp)
-
-
Method Detail
-
validate_post_init
public void validate_post_init(OTMErrorLog errorLog)
-
initialize
public void initialize(Scenario scenario, float start_time) throws OTMException
- Overrides:
initialize
in classcore.AbstractLaneGroup
- Throws:
OTMException
-
set_road_params
public void set_road_params(Roadparam r)
- Overrides:
set_road_params
in classVehicleLaneGroup
-
set_actuator_capacity_vps
public void set_actuator_capacity_vps(double rate_vps)
-
set_to_nominal_capacity
public void set_to_nominal_capacity()
-
set_actuator_speed_mps
public void set_actuator_speed_mps(double speed_mps)
-
set_actuator_allow_comm
public void set_actuator_allow_comm(boolean allow, Long commid) throws OTMException
- Specified by:
set_actuator_allow_comm
in interfaceInterfaceLaneGroup
- Overrides:
set_actuator_allow_comm
in classcore.AbstractLaneGroup
- Throws:
OTMException
-
allocate_state
public void allocate_state()
-
update_long_supply
public void update_long_supply()
-
get_upstream_vehicle_position
public Double get_upstream_vehicle_position()
-
add_vehicle_packet
public void add_vehicle_packet(float timestamp, PacketLaneGroup vp, Long next_link_id) throws OTMException
A core.packet arrives at this lanegroup. Vehicles do not know their next_link. It is assumed that the core.packet fits in this lanegroup. 1. convert the core.packet to models.fluid.ctm.micro, models.fluid.ctm.pq, or models.fluid.ctm. This involves memory kept in the lanegroup. 2. tag it with next_link and target lanegroups. 3. add the core.packet to this lanegroup.- Throws:
OTMException
-
release_vehicle_packets
public void release_vehicle_packets(float timestamp) throws OTMException
An event signals an opportunity to release a vehicle. The lanegroup must, 1. construct packets to be released to each of the lanegroups reached by each of it's road connections. 2. check what portion of each of these packets will be accepted. Reduce the packets if necessary. 3. call add_vehicle_packet for each reduces core.packet. 4. remove the vehicle packets from this lanegroup.- Throws:
OTMException
-
vehs_dwn_for_comm
public float vehs_dwn_for_comm(Long c)
-
-