Class OTSWebServer

    • Constructor Detail

      • OTSWebServer

        public OTSWebServer​(String title,
                            org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator,
                            Bounds2d extent)
                     throws Exception
        Parameters:
        title - String; the title for the model window
        simulator - OTSSimulatorInterface; the simulator
        extent - Bounds2d; the extent to use for the graphics (min/max coordinates)
        Throws:
        Exception - in case jetty crashes
    • Method Detail

      • getTitle

        public final String getTitle()
        Returns:
        title
      • getSimulator

        public final org.opentrafficsim.core.dsol.OTSSimulatorInterface getSimulator()
        Returns:
        simulator
      • getAnimationPanel

        public final HTMLAnimationPanel getAnimationPanel()
        Returns:
        animationPanel
      • startSimulator

        protected boolean startSimulator()
        Try to start the simulator, and return whether the simulator has been started.
        Returns:
        whether the simulator has been started or not
      • stopSimulator

        protected boolean stopSimulator()
        Try to stop the simulator, and return whether the simulator has been stopped.
        Returns:
        whether the simulator has been stopped or not
      • setSpeedFactor

        protected void setSpeedFactor​(double speedFactor)
        Parameters:
        speedFactor - double; the new speed factor