pub struct LinkProperties {
pub free_flow_speed: f64,
pub capacity: f64,
pub lanes: u32,
pub jam_density: f64,
pub diagram: FundamentalDiagram,
}Expand description
Transport-specific physical properties of a link.
This type stores the transport behavior parameters attached to a
LinkSpace<LinkProperties> link.
The associated constructors such as LinkProperties::urban,
LinkProperties::freeway, and LinkProperties::pedestrian are
convenience presets for common real-world link types. They are not
a fixed catalog enforced by the engine - users can either use these
helpers as starting points or construct/customize values directly.
Fields§
§free_flow_speed: f64Free-flow speed in m/s.
capacity: f64Capacity in units/hour across all lanes.
lanes: u32Number of lanes or effective parallel channels.
jam_density: f64Jam density in units/km/lane.
diagram: FundamentalDiagramSpeed-density relationship applied to the link.
Implementations§
Source§impl LinkProperties
impl LinkProperties
Sourcepub fn urban(
length: f64,
speed_kmh: f64,
lanes: u32,
) -> Result<(LinkGeometry, Self), LinkGeometryError>
pub fn urban( length: f64, speed_kmh: f64, lanes: u32, ) -> Result<(LinkGeometry, Self), LinkGeometryError>
Convenience preset for a typical urban road segment.
Returns (LinkGeometry, LinkProperties) so the result can be passed
directly into LinkSpace<LinkProperties>::add_link(...).
Arguments:
length: link length in metersspeed_kmh: free-flow speed in km/hlanes: number of lanes
This is an example/default profile, not a mandatory schema.
Sourcepub fn freeway(
length: f64,
speed_kmh: f64,
lanes: u32,
) -> Result<(LinkGeometry, Self), LinkGeometryError>
pub fn freeway( length: f64, speed_kmh: f64, lanes: u32, ) -> Result<(LinkGeometry, Self), LinkGeometryError>
Convenience preset for a typical freeway segment.
Returns (LinkGeometry, LinkProperties) so the result can be passed
directly into LinkSpace<LinkProperties>::add_link(...).
Arguments:
length: link length in metersspeed_kmh: free-flow speed in km/hlanes: number of lanes
This is an example/default profile, not a mandatory schema.
Sourcepub fn pedestrian(
length: f64,
width: f64,
) -> Result<(LinkGeometry, Self), LinkGeometryError>
pub fn pedestrian( length: f64, width: f64, ) -> Result<(LinkGeometry, Self), LinkGeometryError>
Convenience preset for a pedestrian corridor or walkway.
Returns (LinkGeometry, LinkProperties) so the result can be passed
directly into LinkSpace<LinkProperties>::add_link(...).
Arguments:
length: link length in meterswidth: effective corridor width in meters
Width is converted into an approximate number of parallel channels. This is an example/default profile, not a mandatory schema.
Trait Implementations§
Source§impl Clone for LinkProperties
impl Clone for LinkProperties
Source§fn clone(&self) -> LinkProperties
fn clone(&self) -> LinkProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more