Class MacroscopicModePropertiesFactory
- java.lang.Object
-
- org.planit.network.macroscopic.physical.MacroscopicModePropertiesFactory
-
public class MacroscopicModePropertiesFactory extends Object
Create Mode specific properties for the macroscopic perspective on the supply side, i.e. on a link segment of a particular type- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description MacroscopicModePropertiesFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MacroscopicModeProperties
create()
factory method adopting default valuesstatic MacroscopicModeProperties
create(double maxSpeedKmH)
factory method adopting default value for critical speedstatic MacroscopicModeProperties
create(double maxSpeedKmH, double criticalSpeedKmH)
factory methodstatic void
createOnLinkSegmentType(MacroscopicLinkSegmentType linkSegmentType, Collection<Mode> modesToAdd, double maxSpeedKmH)
add mode properties for the passed in modes to the passed in link segment type where we cap the max and critical speed based on the minimum of the mode's maximum speed and the osmway type's maximum speedstatic void
createOnLinkSegmentType(MacroscopicLinkSegmentType linkSegmentType, Mode modeToAdd, double maxSpeedKmH)
add mode properties for the passed in modes to the passed in link segment type where we cap the max and critical speed based on the minimum of the mode's maximum speed and the osmway type's maximum speed
-
-
-
Method Detail
-
create
public static MacroscopicModeProperties create(double maxSpeedKmH, double criticalSpeedKmH)
factory method- Parameters:
maxSpeedKmH
- maximum speed for this mode in this contextcriticalSpeedKmH
- critical speed for this mode in this context- Returns:
- created properties
-
create
public static MacroscopicModeProperties create(double maxSpeedKmH)
factory method adopting default value for critical speed- Parameters:
maxSpeedKmH
- maximum speed for this mode in this context- Returns:
- created properties
-
create
public static MacroscopicModeProperties create()
factory method adopting default values- Returns:
- created properties
-
createOnLinkSegmentType
public static void createOnLinkSegmentType(MacroscopicLinkSegmentType linkSegmentType, Collection<Mode> modesToAdd, double maxSpeedKmH)
add mode properties for the passed in modes to the passed in link segment type where we cap the max and critical speed based on the minimum of the mode's maximum speed and the osmway type's maximum speed- Parameters:
linkSegmentType
- to populate formodesToAdd
- to addmaxSpeedKmH
- maxSpeed to set
-
createOnLinkSegmentType
public static void createOnLinkSegmentType(MacroscopicLinkSegmentType linkSegmentType, Mode modeToAdd, double maxSpeedKmH)
add mode properties for the passed in modes to the passed in link segment type where we cap the max and critical speed based on the minimum of the mode's maximum speed and the osmway type's maximum speed- Parameters:
linkSegmentType
- to populate formodeToAdd
- to addmaxSpeedKmH
- maxSpeed to set
-
-