Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 2369669d authored by Marion Goedel's avatar Marion Goedel
Browse files

Issue #138 : Update only if there are still pedestrians in the scenario and...

Issue #138 : Update only if there are still pedestrians in the scenario and /or still pedestrians to be spawned.
parent d67d3808
Pipeline #99358 passed with stages
in 120 minutes and 40 seconds
......@@ -24,6 +24,7 @@ import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
public class Simulation {
......@@ -319,10 +320,17 @@ public class Simulation {
cognitionLayer.prioritizeEventsForPedestrians(events, pedestrians);
for (Model m : models) {
m.update(simTimeInSec);
if (topography.isRecomputeCells()){
// rebuild CellGrid if model does not manage the CellGrid state while updating
topographyController.update(simTimeInSec); //rebuild CellGrid
List<SourceController> stillSpawningSource = this.sourceControllers.stream().filter(s -> !s.isSourceFinished(simTimeInSec)).collect(Collectors.toList());
int pedestriansInSimulation = this.simulationState.getTopography().getPedestrianDynamicElements().getElements().size();
// Only update until there are pedestrians in the scenario or pedestrian to spawn
if (!stillSpawningSource.isEmpty() || pedestriansInSimulation > 0 ) {
m.update(simTimeInSec);
if (topography.isRecomputeCells()) {
// rebuild CellGrid if model does not manage the CellGrid state while updating
topographyController.update(simTimeInSec); //rebuild CellGrid
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment