org.gcn.plinguaplugin.simulator
Class StepsAndTimeOutStrategySimulator

java.lang.Object
  extended by org.gcn.plinguaplugin.simulator.StrategySimulator
      extended by org.gcn.plinguaplugin.simulator.StepsAndTimeOutStrategySimulator

 class StepsAndTimeOutStrategySimulator
extends StrategySimulator

This class runs the simulator thread limiting both the number of steps and the time out

Author:
Manuel Garcia-Quismondo-Fernandez

Constructor Summary
StepsAndTimeOutStrategySimulator(int steps, long timeOut, SimulatorDisplayer simulatorDisplayer)
          Creates a new StepsAndTimeOutStrategySimulator instance which runs the SimulatorDisplayer instance simulator limiting both the number of steps and the time out
 
Method Summary
 void run()
          Executes a simulation according to the specific parameters from the SimulatorDisplayer instance
 
Methods inherited from class org.gcn.plinguaplugin.simulator.StrategySimulator
getSimulator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StepsAndTimeOutStrategySimulator

public StepsAndTimeOutStrategySimulator(int steps,
                                        long timeOut,
                                        SimulatorDisplayer simulatorDisplayer)
Creates a new StepsAndTimeOutStrategySimulator instance which runs the SimulatorDisplayer instance simulator limiting both the number of steps and the time out

Parameters:
steps - the maximum number of steps the simulation will take
timeOut - the time out for the simulation
simulatorDisplayer - the SimulatorDisplayer instance which the newly created instance belongs to
Method Detail

run

public void run()
         throws org.gcn.plinguacore.util.PlinguaCoreException
Description copied from class: StrategySimulator
Executes a simulation according to the specific parameters from the SimulatorDisplayer instance

Specified by:
run in class StrategySimulator
Throws:
org.gcn.plinguacore.util.PlinguaCoreException - if the simulation execution couldn't be performed
See Also:
StrategySimulator.run()