Class NetworksModel

    • Constructor Detail

      • NetworksModel

        public NetworksModel​(org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator)
        Parameters:
        simulator - OTSSimulatorInterface; the simulator for this model
    • Method Detail

      • makeTemplate

        LaneBasedTemplateGTUType makeTemplate​(StreamInterface randStream,
                                              Lane lane,
                                              org.opentrafficsim.core.units.distributions.ContinuousDistDoubleScalar.Rel<Length,​LengthUnit> lengthDistribution,
                                              org.opentrafficsim.core.units.distributions.ContinuousDistDoubleScalar.Rel<Length,​LengthUnit> widthDistribution,
                                              org.opentrafficsim.core.units.distributions.ContinuousDistDoubleScalar.Rel<Speed,​SpeedUnit> maximumSpeedDistribution,
                                              Set<DirectedLanePosition> initialPositions,
                                              LaneBasedStrategicalPlannerFactory<LaneBasedStrategicalPlanner> strategicalPlannerFactory)
                                       throws org.opentrafficsim.core.gtu.GTUException
        Parameters:
        randStream - StreamInterface; the random stream to use
        lane - Lane; reference lane to generate GTUs on
        lengthDistribution - ContinuousDistDoubleScalar.Rel<Length,LengthUnit>; distribution of the GTU length
        widthDistribution - ContinuousDistDoubleScalar.Rel<Length,LengthUnit>; distribution of the GTU width
        maximumSpeedDistribution - ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit>; distribution of the GTU's maximum speed
        initialPositions - Set<DirectedLanePosition>; initial position(s) of the GTU on the Lane(s)
        strategicalPlannerFactory - LaneBasedStrategicalPlannerFactory<LaneBasedStrategicalPlanner>; factory to generate the strategical planner for the GTU
        Returns:
        template for a GTU
        Throws:
        org.opentrafficsim.core.gtu.GTUException - when characteristics cannot be initialized
      • getNetwork

        public OTSRoadNetwork getNetwork()
        Specified by:
        getNetwork in interface org.opentrafficsim.core.dsol.OTSModelInterface
      • getPath

        public final List<Lane> getPath​(int index)
        Parameters:
        index - int; the rank number of the path
        Returns:
        List<Lane>; the set of lanes for the specified index
      • pathCount

        public final int pathCount()
        Return the number of paths that can be used to show graphs.
        Returns:
        int; the number of paths that can be used to show graphs
      • getMinimumDistance

        public final Length getMinimumDistance()
        Returns:
        minimumDistance
      • getMaximumDistance

        public final Length getMaximumDistance()
        Returns:
        maximumDistance