Class OTSLoggingAnimator

    • Constructor Detail

      • OTSLoggingAnimator

        public OTSLoggingAnimator​(String path,
                                  Serializable simulatorId)
        Construct an OTSAnimator.
        Parameters:
        path - path for logging
        simulatorId - the id of the simulator to use in remote communication
    • Method Detail

      • initialize

        public void initialize​(Time startTime,
                               Duration warmupPeriod,
                               Duration runLength,
                               OTSModelInterface model)
                        throws SimRuntimeException,
                               NamingException
        Initialize a simulation engine without animation; the easy way. PauseOnError is set to true;
        Specified by:
        initialize in interface OTSSimulatorInterface
        Overrides:
        initialize in class OTSAnimator
        Parameters:
        startTime - Time; the start time of the simulation
        warmupPeriod - Duration; the warm up period of the simulation (use new Duration(0, SECOND) if you don't know what this is)
        runLength - Duration; the duration of the simulation
        model - OTSModelInterface; the simulation to execute
        Throws:
        SimRuntimeException - when e.g., warmupPeriod is larger than runLength
        NamingException - when the context for the replication cannot be created
      • initialize

        public void initialize​(Time startTime,
                               Duration warmupPeriod,
                               Duration runLength,
                               OTSModelInterface model,
                               Map<String,​StreamInterface> streams)
                        throws SimRuntimeException,
                               NamingException
        Initialize a simulation engine without animation; the easy way. PauseOnError is set to true;
        Overrides:
        initialize in class OTSAnimator
        Parameters:
        startTime - Time; the start time of the simulation
        warmupPeriod - Duration; the warm up period of the simulation (use new Duration(0, SECOND) if you don't know what this is)
        runLength - Duration; the duration of the simulation
        model - OTSModelInterface; the simulation to execute
        streams - Map<String, StreamInterface>; streams
        Throws:
        SimRuntimeException - when e.g., warmupPeriod is larger than runLength
        NamingException - when the context for the replication cannot be created
      • initialize

        public void initialize​(Time startTime,
                               Duration warmupPeriod,
                               Duration runLength,
                               OTSModelInterface model,
                               int replicationnr)
                        throws SimRuntimeException,
                               NamingException
        Initialize a simulation engine without animation and prescribed replication number; the easy way. PauseOnError is set to true;
        Specified by:
        initialize in interface OTSSimulatorInterface
        Overrides:
        initialize in class OTSAnimator
        Parameters:
        startTime - Time; the start time of the simulation
        warmupPeriod - Duration; the warm up period of the simulation (use new Duration(0, SECOND) if you don't know what this is)
        runLength - Duration; the duration of the simulation
        model - OTSModelInterface; the simulation to execute
        replicationnr - int; the replication number
        Throws:
        SimRuntimeException - when e.g., warmupPeriod is larger than runLength
        NamingException - when context for the animation cannot be created