Class DefaultRunEnvironmentBuilder
- java.lang.Object
-
- repast.simphony.engine.environment.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 Summary
Constructors Constructor Description DefaultRunEnvironmentBuilder(Runner runner, boolean isBatch)
Creates a RunEnvironmentBuilder that will use the specified schedule runner to run each run of the simulation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RunEnvironment
createRunEnvironment()
Creates the Runtime to be used for the next simulation run.Parameters
getParameters()
Gets the parameters to be used in the next simulation run.IScheduleFactory
getScheduleFactory()
Gets the schedule factory used to create the schedule for simulation runs.Runner
getScheduleRunner()
Gets the schedule runner used to run each run of the simulation.void
setParameters(Parameters parameters)
Sets the parameters to be used in the next simulation run.void
setScheduleFactory(IScheduleFactory scheduleFactory)
Sets the schedule factory used to create the schedule for simulation runs.
-
-
-
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 interfaceRunEnvironmentBuilder
- 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 interfaceRunEnvironmentBuilder
- 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 interfaceRunEnvironmentBuilder
- 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 interfaceRunEnvironmentBuilder
- 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 interfaceRunEnvironmentBuilder
- 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 interfaceRunEnvironmentBuilder
- Returns:
- the Runtime to be used for the next simulation run.
-
-