Move recovery device check to simulation startup. It doesn't need to be checked on every iteration.
This commit is contained in:
parent
b42acb5416
commit
9d24cecbef
@ -73,6 +73,14 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
||||
}
|
||||
|
||||
currentStatus = new SimulationStatus(simulationConfig, simulationConditions);
|
||||
|
||||
// Sanity checks on design and configuration
|
||||
|
||||
// No recovery device
|
||||
if (!currentStatus.getConfiguration().hasRecoveryDevice()) {
|
||||
currentStatus.getWarnings().add(Warning.NO_RECOVERY_DEVICE);
|
||||
}
|
||||
|
||||
currentStatus.getEventQueue().add(new FlightEvent(FlightEvent.Type.LAUNCH, 0, simulationConditions.getRocket()));
|
||||
{
|
||||
// main simulation branch
|
||||
@ -341,11 +349,6 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
||||
event.getTime() + Math.max(0.001, deployConfig.getDeployDelay()), c));
|
||||
}
|
||||
}
|
||||
|
||||
// Add a warning if there is no recovery device defined.
|
||||
if (!currentStatus.getConfiguration().hasRecoveryDevice()) {
|
||||
currentStatus.getWarnings().add(Warning.NO_RECOVERY_DEVICE);
|
||||
}
|
||||
|
||||
// Handle event
|
||||
log.trace("Handling event " + event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user