Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 ( If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 565f900f authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

use the default values of AttributesFloorField for generating a distance...

use the default values of AttributesFloorField for generating a distance function if there is no attribute defined in the json file, i.e. a grid resolution of 0.1.
parent 769f50b3
Pipeline #267246 passed with stages
in 143 minutes and 51 seconds
......@@ -4,16 +4,19 @@ import org.vadere.simulator.models.DynamicElementFactory;
import org.vadere.simulator.models.Model;
import org.vadere.simulator.projects.Domain;
import org.vadere.state.attributes.Attributes;
import org.vadere.state.attributes.exceptions.AttributesNotFoundException;
import org.vadere.state.attributes.models.AttributesFloorField;
import org.vadere.state.attributes.models.AttributesPotentialCompactSoftshell;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.Topography;
import org.vadere.util.logging.Logger;
import java.util.List;
import java.util.Random;
public class TopographyController extends OfflineTopographyController {
private static Logger logger = Logger.getLogger(TopographyController.class);
private final Domain domain;
private final DynamicElementFactory dynamicElementFactory;
......@@ -28,7 +31,16 @@ public class TopographyController extends OfflineTopographyController {
public void preLoop(double simTimeInSec, List<Attributes> attributesList) {
prepareTopography(Model.findAttributes(attributesList, AttributesFloorField.class));
// If there is no background mesh these attributes are used to constrcut a distance function by using a cellgrid of size defined by AttributesFloorField.
AttributesFloorField attributesFloorField;
try {
attributesFloorField = Model.findAttributes(attributesList, AttributesFloorField.class);
} catch (AttributesNotFoundException ex) {
logger.warn("no " + AttributesFloorField.class.getName() + " found, the default values are used instead.");
// if there is none use the default values.
attributesFloorField = new AttributesFloorField();
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