Commit 0d0a4a27 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

resolve merge conflicts with master branch.

parents 1c5e5874 7c87c7cd
......@@ -2,6 +2,7 @@
target/
*.out
*.preferences.xml
swing-inspector-linux-1.2.3/
#Tools and build utils
bin/
......
......@@ -43,7 +43,7 @@ unit_tests_with_coverage:
script:
- Documentation/version-control/git-hook-vadere-software
- mvn clean
- mvn -Dtest=!TestConvolution,!TestBitonicSort,!TestCLLinkedList test
- mvn -Dtest=!TestConvolution,!TestBitonicSort,!TestCLLinkedList,!TestCLOptimalStepsModel test
- python3 Tools/ContinuousIntegration/collect_line_and_branch_coverage.py
run_scenario_files:
......
**Note:** Before writing into this file, read the guidelines in [Writing Changelog Entries.md](Documentation/contributing/Writing Changelog Entries.md).
# In Progress: v0.7
# In Progress: v0.7
## Added
- Two new outputprocessors - mainly for the BHM - to evaluaet queueWidth
(QueueWidthProcessor) and behavior (PedestrianBehaviorProcessor)
- In package `org.vadere.simulator.utils`, added `TopographyChecker` to show
user if the current topography contains problems. The `TopographyChecker`
will check for overlapping `ScenarioElements` and check for inconsistence
settings such as missing TargetIDs for sources or inconsistenct speed ranges
for pedestrians. See this
[table](Documentation/changelLogImages/TopographyCheckerMessages.md) for
supported warnings and erros as well as this
[picture](Documentation/changelLogImages/TopographyChecker.png) to see which
kind of overlap produces erros or warnings.
- Add `--output-dir [on, off]` (default: `on`) switch to `scenario-run`
sub-command. This will will turn the ScenarioChecker on or off for the command
line. If the Checker detects an error the simulation will not be executed.
# v0.6 (2018-09-07)
......@@ -12,7 +30,7 @@
- VadereConsole.jar migrate will migrate all scenario files within the specified directory and all child directories. (37fde165: Simulator)
* To exclude specific sub-trees or only specific directories the igonoreDirs List can be expanded.
* DO_NOT_MIGRATE or .DO_NOT_MIGRATE: Ignore current directory but continue with existing child directories.
* DO_NOT_MIGRATE_TREE or .DO_NOT_MIGRATE_TREE: Ignore the directories and the complete sub-tree.
* DO_NOT_MIGRATE_TREE or .DO_NOT_MIGRATE_TREE: Ignore the directories and the complete sub-tree.
- Added a new OutputProcessor, NumberOverlapsProcessor. This processor saves the number of overlaps that occurred during a simulation run. It needs the PedestrianOverlapProcessor. (57d90e93: Simulator, State)
- Added sub commands to "VadereConsole": project-run, scenario-run, suq, migrate (c7e0538c: GUI)
- In the onlinevisualization it is now possible to display the target potential field of a selected pedestrian. (123457aa: GUI)
......
# TopographyChecker Messages
## Overlapping ScenarioElements
|Type of Elemetns | TotalOvelrap/ contained in | PartialOverlap |
|--------------------|:----------------:|:----------------:|
|Obstacle / Obstacle | WARN | ./. |
|Obstacle / Source | ERROR | ERROR |
|Obstacle / Target | ERROR | WARN |
|Obstacle / Stairs | ERROR | WARN |
|Obstacle / Ped. | ERROR | ERROR |
|Source / Source | WARN | WARN |
|Source / Target | WARN | WARN |
|Source / Stairs | WARN | WARN |
|Target / Target | WARN | WARN |
|Target / Stairs | WARN | WARN |
|Stairs / Stairs | ERROR | ERROR |
Legend:
WARN Warning but simulation is possible
ERROR Error and simulation is not possible
./. Nothing to do all good
## Misc Tests
### Errors
- A Source has no targetId set but is setup to spawn pedestrians. Solution: Set targetId
- A Source has a targetId set but the target does not exist. Solution: Create target or remove unused targetId from Source.
- If the SpeedDistributionMean of a pedestrian ist not between min/max speed.
### Warnings
- A Source has no targetId set and does not spawn pedestrians. Solution: Possible error
- A Target is never used by any Source. Solution: Possible error and this will cost performance.
- The Stairs model only works for 'normal' one-step-stairs. If the tread is outside of
the range of 10cm < x < 35cm. The simulation does not make sense.
- If the speed setup of a pedestrian is bigger then 12.0 m/s (world record). This is possible an error.
......@@ -47,7 +47,7 @@ For this project, GPGPU with OpenCL is used to speed up some computations. There
### Run the Application
1. Get the Source: Run `git clone https://gitlab.lrz.de/vadere/vadere.git`.
2. Build the Application: Go to the project directory and run `mvn clean package` (or `mvn clean package -DskipTests` if you want to skip the unit tests). This will build `vadere.jar`and `postvis.jar`.
2. Build the Application: Go to the project directory and run `mvn clean package` (or `mvn clean package -Dmaven.test.skip` if you want to skip the unit tests). This will build `vadere.jar`and `postvis.jar`.
3. Start the Application: After building the application, you can start Vadere by running `java -jar VadereGui/target/vadere.jar`.
4. (If you only want to use the Postvisualization-Tool you can do so by running `java -jar VadereGui/target/postvis.jar`).
......@@ -77,6 +77,9 @@ Follow the **installation instructions** above i.e. install all required softwar
- select `pom.xml` > *Next* > *Next* > *Next* > *Finish*
- open *VadereGui (gui)* > *src* > *org.vadere.gui.projectview* > `VadereApplication`
- click the *run*-icon next to the `main` method
- edit the run configuration for `VadereApplication` to build the project using Maven instead of IntelliJ's internal builder to avoid compilation errors:
* click *Edit Configurations* (in dropdown menu next to the play/debug button)
* under *Before launch*, add *Run Maven Goal* and use the Maven goal `compile`
Alternatively, run `mvn eclipse:eclipse` using the [Maven Eclipse Plugin](http://maven.apache.org/plugins/maven-eclipse-plugin/usage.html) or `mvn idea:idea` using the [Maven IntelliJ Plugin](http://maven.apache.org/plugins/maven-idea-plugin/).
......
......@@ -34,7 +34,7 @@ def find_scenario_files(path="VadereModelTests", scenario_search_pattern = "*.sc
return sorted(scenario_files)
def run_scenario_files_with_vadere_console(scenario_files, vadere_console="VadereGui/target/vadere-console.jar", scenario_timeout_in_sec=60):
def run_scenario_files_with_vadere_console(scenario_files, vadere_console="VadereSimulator/target/vadere-console.jar", scenario_timeout_in_sec=60):
output_dir = "output"
if not os.path.exists(output_dir):
......
......@@ -594,7 +594,7 @@ public class UniformRefinementTriangulatorSFC<P extends IPoint, V extends IVerte
F twin = getMesh().getTwinFace(edge);
VTriangle triangle = getMesh().toTriangle(face);
return (!triangle.intersect(bbox) && (getMesh().isBoundary(twin) || !getMesh().toTriangle(twin).intersect(bbox)));
return (!triangle.intersects(bbox) && (getMesh().isBoundary(twin) || !getMesh().toTriangle(twin).intersects(bbox)));
}
/**
......
......@@ -208,7 +208,7 @@ public class UniformSFCTriangulator<P extends IPoint, V extends IVertex<P>, E ex
VLine line = mesh.toLine(edge);
return (line.length() <= lenFunc.apply(line.midPoint()) && random.nextDouble() < 0.96)
|| (!triangle.intersect(bbox) && (mesh.isBoundary(twin) || !mesh.toTriangle(twin).intersect(bbox)))
|| (!triangle.intersects(bbox) && (mesh.isBoundary(twin) || !mesh.toTriangle(twin).intersects(bbox)))
|| boundary.stream().anyMatch(shape -> shape.contains(triangle.getBounds2D()) || (!mesh.isBoundary(twin) && shape.contains(mesh.toTriangle(twin).getBounds2D())));
}
......
......@@ -262,11 +262,6 @@ public class VCircle implements VShape, ICircleSector {
return ShapeType.CIRCLE;
}
@Override
public boolean intersect(final VShape shape) {
throw new UnsupportedOperationException("not yet implemented");
}
@Override
public List<VPoint> getPath() {
// approximate the circle!
......@@ -280,4 +275,15 @@ public class VCircle implements VShape, ICircleSector {
}
return points;
}
@Override
public boolean intersects(VShape shape) {
if(shape instanceof VCircle) {
VCircle otherCircle = (VCircle)shape;
return otherCircle.getCenter().distance(this.getCenter()) < (otherCircle.getRadius() + this.getRadius());
}
else {
return VShape.super.intersects(shape);
}
}
}
......@@ -479,7 +479,7 @@ public class VPolygon extends Path2D.Double implements VShape {
}
@Override
public boolean intersect(final VShape shape) {
public boolean intersects(final VShape shape) {
if(shape instanceof VPolygon) {
return intersects((VPolygon) shape);
}
......@@ -487,7 +487,7 @@ public class VPolygon extends Path2D.Double implements VShape {
return intersects(((VRectangle)shape));
}
else {
throw new UnsupportedOperationException("not yet implemented");
return VShape.super.intersects(shape);
}
}
......
......@@ -95,18 +95,18 @@ public class VRectangle extends Rectangle2D.Double implements VShape {
}
@Override
public VShape translatePrecise(final IPoint vector) {
public VRectangle translatePrecise(final IPoint vector) {
VPoint dp = VPoint.addPrecise(vector, new VPoint(getX(), getY()));
return new VRectangle(dp.getX(), dp.getY(), getWidth(), getHeight());
}
@Override
public VShape translate(final IPoint vector) {
public VRectangle translate(final IPoint vector) {
return new VRectangle(getX() + vector.getX(), getY() + vector.getY(), getWidth(), getHeight());
}
@Override
public VShape scale(final double scalar) {
public VRectangle scale(final double scalar) {
return new VRectangle(getX() * scalar, getY() * scalar, getWidth() * scalar, getHeight() * scalar);
}
......@@ -134,12 +134,12 @@ public class VRectangle extends Rectangle2D.Double implements VShape {
}
@Override
public boolean intersect(final VShape shape) {
public boolean intersects(final VShape shape) {
if(shape instanceof VRectangle){
return super.intersects(((VRectangle)shape));
}
else if(shape instanceof VPolygon) {
return shape.intersect(this);
return ((VPolygon)shape).intersects(this);
}
else {
throw new UnsupportedOperationException("not yet implemented");
......
......@@ -221,7 +221,7 @@ public class VRing implements VShape {
}
@Override
public boolean intersect(VShape shape) {
public boolean intersects(VShape shape) {
throw new UnsupportedOperationException("not yet implemented.");
}
......
......@@ -31,7 +31,20 @@ public interface VShape extends Shape, Cloneable {
ShapeType getType();
boolean intersect(VShape shape);
default boolean sameArea(VShape shape){
Area thisShape = new Area(this);
Area otherShape = new Area(shape);
thisShape.subtract(otherShape);
return thisShape.isEmpty();
}
default boolean containsShape(VShape otherShape){
Area thisArea = new Area(this);
Area otherArea = new Area(otherShape);
thisArea.intersect(otherArea);
return thisArea.equals(otherArea);
}
/**
* Returns a list of points (p1, p2, ..., pn) such that the line (p1,p2) is part of the boundary
......
......@@ -73,25 +73,6 @@
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>build-vadere-console</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>org.vadere.simulator.entrypoints.VadereConsole</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>vadere-console</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>build-vadere</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
......
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