Package microsim.engine
Class MultiRun
java.lang.Object
java.lang.Thread
microsim.engine.MultiRun
- All Implemented Interfaces:
- Runnable,- EngineListener,- ExperimentBuilder
MultiRun is a template abstract class useful to guide the modeller to build an automatic simulation launcher, able
 to change interactively parameters on the basis of the last run.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.ThreadThread.State, Thread.UncaughtExceptionHandler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static booleanSets whether to copy the input files into a new input folder within a new output folder for each simulation runprotected intprotected SimulationEngineprotected booleanprotected booleanFields inherited from class java.lang.ThreadMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddParameterDomain(@NonNull ParameterDomain parameterDomain) getConfiguration(int counter) intvoidgo()The go method starts the multi-run simulation.abstract booleanWhen a SIMULATION_END signal is sent to JAS by one of the running models, simulation is stopped and this method is called.voidonEngineEvent(@NonNull SystemEventType event) This method monitors theSystemEventType.Endsignal.voidrun()MultiRun is an independent thread.abstract StringMethods inherited from class java.lang.ThreadactiveCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yieldMethods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface microsim.engine.ExperimentBuilderbuildExperiment
- 
Field Details- 
copyInputFolderStructureprotected static boolean copyInputFolderStructureSets whether to copy the input files into a new input folder within a new output folder for each simulation run
- 
engine
- 
counterprotected int counter
- 
executionActiveprotected boolean executionActive
- 
toBeContinuedprotected boolean toBeContinued
 
- 
- 
Constructor Details- 
MultiRunpublic MultiRun()Create a new multi run session.
 
- 
- 
Method Details- 
nextModelpublic abstract boolean nextModel()When a SIMULATION_END signal is sent to JAS by one of the running models, simulation is stopped and this method is called. If it returns true the multi run will continue with the next run, otherwise the program will exit.- Returns:
- a value deciding if simulation is to be continued.
 
- 
setupRunLabel
- 
runpublic void run()MultiRun is an independent thread. The run method controls the sequence of simulations.
- 
gopublic void go()The go method starts the multi-run simulation.
- 
onEngineEventThis method monitors theSystemEventType.Endsignal. When it is raised the MultiRun class stops current run and invokes thenextModel()method.- Specified by:
- onEngineEventin interface- EngineListener
- Parameters:
- event- A- SystemEventTypeevent.
 
- 
addParameterDomain
- 
getMaxConfigurationspublic int getMaxConfigurations()
- 
getConfiguration
 
-