Class DefaultRunEnvironmentBuilder

  • All Implemented Interfaces:
    RunEnvironmentBuilder

    public class DefaultRunEnvironmentBuilder
    extends Object
    implements RunEnvironmentBuilder
    Builder for creating a RunEnvironment object. The user can customize the RunEnv used for each run using this object.
    Author:
    Nick Collier
    • Constructor Detail

      • DefaultRunEnvironmentBuilder

        public DefaultRunEnvironmentBuilder​(Runner runner,
                                            boolean isBatch)
        Creates a RunEnvironmentBuilder that will use the specified schedule runner to run each run of the simulation.
        Parameters:
        runner -
        isBatch - whether or not this is operating in batch mode.
    • Method Detail

      • getScheduleRunner

        public Runner getScheduleRunner()
        Gets the schedule runner used to run each run of the simulation.
        Specified by:
        getScheduleRunner in interface RunEnvironmentBuilder
        Returns:
        the schedule runner used to run each run of the simulation.
      • getScheduleFactory

        public IScheduleFactory getScheduleFactory()
        Gets the schedule factory used to create the schedule for simulation runs.
        Specified by:
        getScheduleFactory in interface RunEnvironmentBuilder
        Returns:
        the schedule factory used to create the schedule for simulation runs.
      • setScheduleFactory

        public void setScheduleFactory​(IScheduleFactory scheduleFactory)
        Sets the schedule factory used to create the schedule for simulation runs.
        Specified by:
        setScheduleFactory in interface RunEnvironmentBuilder
        Parameters:
        scheduleFactory - the new schedule factory
      • getParameters

        public Parameters getParameters()
        Gets the parameters to be used in the next simulation run.
        Specified by:
        getParameters in interface RunEnvironmentBuilder
        Returns:
        the parameters to be used in the next simulation run.
      • setParameters

        public void setParameters​(Parameters parameters)
        Sets the parameters to be used in the next simulation run.
        Specified by:
        setParameters in interface RunEnvironmentBuilder
        Parameters:
        parameters - the parameters to be used in the next simulation run.
      • createRunEnvironment

        public RunEnvironment createRunEnvironment()
        Creates the Runtime to be used for the next simulation run. Each simulation run gets a new runtime.
        Specified by:
        createRunEnvironment in interface RunEnvironmentBuilder
        Returns:
        the Runtime to be used for the next simulation run.