Package jadex.simulation.impl
Class SlaveSimulationFeature
java.lang.Object
jadex.execution.impl.ExecutionFeature
jadex.simulation.impl.SlaveSimulationFeature
- All Implemented Interfaces:
jadex.execution.IExecutionFeature
,jadex.execution.impl.IInternalExecutionFeature
,ISimulationFeature
public class SlaveSimulationFeature
extends jadex.execution.impl.ExecutionFeature
implements ISimulationFeature
-
Nested Class Summary
Nested classes/interfaces inherited from class jadex.execution.impl.ExecutionFeature
jadex.execution.impl.ExecutionFeature.ComponentSuspendable, jadex.execution.impl.ExecutionFeature.ThreadRunner
-
Field Summary
FieldsFields inherited from class jadex.execution.impl.ExecutionFeature
do_switch, endfuture, endstep, entries, executing, listeners, LOCAL, runner, self, steps, terminated, threads
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
busy()
protected MasterSimulationFeature
Get the appropriate master for this component.long
getTime()
protected void
idle()
void
void
setTime
(long millis) Set the current time.void
start()
Start the simulation.jadex.future.IFuture
<Void> stop()
Stop the simulation.jadex.future.ITerminableFuture
<Void> waitForDelay
(long millis) Methods inherited from class jadex.execution.impl.ExecutionFeature
addStepListener, afterBlock, afterStep, beforeBlock, beforeStep, doRun, executeEndStep, getComponent, isComponentThread, removeStepListener, restart, saveEndStep, scheduleStep, scheduleStep, scheduleStep, terminate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jadex.execution.IExecutionFeature
getComponent, isComponentThread, scheduleStep, scheduleStep, scheduleStep
-
Field Details
-
master
-
parallel
public static boolean parallel
-
-
Constructor Details
-
SlaveSimulationFeature
public SlaveSimulationFeature()
-
-
Method Details
-
getMaster
Get the appropriate master for this component. -
getTime
public long getTime()- Specified by:
getTime
in interfacejadex.execution.IExecutionFeature
- Overrides:
getTime
in classjadex.execution.impl.ExecutionFeature
-
setTime
public void setTime(long millis) Description copied from interface:ISimulationFeature
Set the current time. Time entries older than the given time will be executed when the simulation is running, but receive the new current time inIExecutionFeature.getTime()
- Specified by:
setTime
in interfaceISimulationFeature
- Parameters:
millis
- The time in milliseconds.
-
scheduleStep
- Specified by:
scheduleStep
in interfacejadex.execution.IExecutionFeature
- Overrides:
scheduleStep
in classjadex.execution.impl.ExecutionFeature
-
waitForDelay
- Specified by:
waitForDelay
in interfacejadex.execution.IExecutionFeature
- Overrides:
waitForDelay
in classjadex.execution.impl.ExecutionFeature
-
start
public void start()Description copied from interface:ISimulationFeature
Start the simulation. Used to resume a simulation after it was stopped.- Specified by:
start
in interfaceISimulationFeature
-
stop
Description copied from interface:ISimulationFeature
Stop the simulation. Stops scheduling of due time entries, i.e., the time will no longer advance. Note, that components will continue to execute as long as they have activities for the current time.- Specified by:
stop
in interfaceISimulationFeature
- Returns:
- A future to indicate that simulation has stopped, i.e., all components have finished their activities.
-
busy
protected void busy()- Overrides:
busy
in classjadex.execution.impl.ExecutionFeature
-
idle
protected void idle()- Overrides:
idle
in classjadex.execution.impl.ExecutionFeature
-