com.yobotics.simulationconstructionset.util.simulationRunner
Class SimulationRewindabilityVerifier
java.lang.Object
com.yobotics.simulationconstructionset.util.simulationRunner.SimulationRewindabilityVerifier
public class SimulationRewindabilityVerifier
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimulationRewindabilityVerifier
public SimulationRewindabilityVerifier(SimulationConstructionSet simulationOne,
SimulationConstructionSet simulationTwo,
java.util.ArrayList<java.lang.String> exceptions)
SimulationRewindabilityVerifier
public SimulationRewindabilityVerifier(SimulationConstructionSet[] simulations,
java.util.ArrayList<java.lang.String> exceptions)
verifySimulationsAreSameToStart
public java.util.ArrayList<VariableDifference> verifySimulationsAreSameToStart()
checkRewindabilityWithSimpleMethod
public java.util.ArrayList<VariableDifference> checkRewindabilityWithSimpleMethod(int numTicksToTest,
double maxDifferenceAllowed)
throws UnreasonableAccelerationException
- Throws:
UnreasonableAccelerationException
checkRewindabilityWithSimpleMethod
public java.util.ArrayList<VariableDifference> checkRewindabilityWithSimpleMethod(int numTicksToStartComparingAt,
int numTicksToTest,
double maxDifferenceAllowed)
throws UnreasonableAccelerationException
- This is a simple rewindability checker. For the first simulation it ticks it ahead one tick at a time.
For the second simulation it ticks it ahead a tick, backs up a tick, and ticks ahead another tick.
Then it compares the two simulations. It repeats this for the indicated number of times.
Any differences are put in the returned ArrayList.
- Throws:
UnreasonableAccelerationException
checkRewindabilityWithRigorousMethod
public java.util.ArrayList<VariableDifference> checkRewindabilityWithRigorousMethod(int numTicksToTest,
int numTicksToSimulateAhead,
double maxDifferenceAllowed)
throws UnreasonableAccelerationException
- This is a more rigorous rewindability checker. For the first simulation it ticks it ahead one tick at a time.
For the second simulation it ticks it ahead numTicksToSimulateAhead ticks, rewinds it to where it had started,
and ticks ahead another tick.
Then it compares the two simulations. It repeats this for the indicated number of numTicksToTest.
Any differences are put in the returned ArrayList.
- Throws:
UnreasonableAccelerationException